Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > 967d2ab22510ea682c2fd6fd5faeacb3 > files > 205

munipack-1.2.10-2.fc15.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html><head>
<link rel="stylesheet" type="text/css" href="cmunipack.css">
<title>Console related functions. </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body><div class="main_head"><p class="head"><a href="index.html">C-Munipack 1.2</a> / <a href="node014.html">Application programming interface</a> / <a href="node020.html">API reference</a></p><h1>Console related functions. </h1></div><h2>cmpack_console.h</h2><h3>Enumerations</h3><table><tr><td>CmpackOutputLevel</td><td>Verbosity level. </td></tr></table><h3>Type definitions</h3><table><tr><td>CmpackCallbackType</td><td>Callback procedure. </td></tr><tr><td>CmpackConsole</td><td>Console context. </td></tr></table><h3>Functions</h3><table><tr><td>cmpack_con_init</td><td>Create a new console context that prints all output to stderr stream. </td></tr><tr><td>cmpack_con_init_cb</td><td>Create a new console context that uses a user-defined function to print messages. </td></tr><tr><td>cmpack_con_set_level</td><td>Set the debug level. </td></tr></table><h3>Description</h3><p>C-Munipack functions use a console as an output device for output and debug messages. By default, all messages are thrown away. If you want to print them to standard error stream or process them in a user defined callback, make a console and attach it to an object using cmpack_*_set_console function.</p><h2>CmpackCallbackType (data type)</h2><p>Callback procedure.</p><h3>Synopsis</h3><p>typedef void CmpackCallbackType(const char *text, void *user_data)</p><h3>Description</h3><p>Prototype for custom callback procedures. The procedure receives the pointer to message string. It points to internal memory buffer, the callee must not free or modify it. The second parameter contains callback registration data.</p><h2>CmpackConsole (data type)</h2><p>Console context.</p><h3>Synopsis</h3><p>typedef struct _CmpackConsole CmpackConsole</p><h3>Description</h3><p>This private structure holds the console parameters</p><h2>CmpackOutputLevel (enumeration)</h2><p>Verbosity level.</p><h3>Synopsis</h3><p class="synopsis">enum CmpackOutputLevel<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_LEVEL_QUIET,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_LEVEL_NORMAL,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_LEVEL_DEBUG<br>};<h3>Enumerators</h3><table><tr><td>CMPACK_LEVEL_QUIET</td><td>Be quiet, suppress all messages. </td></tr><tr><td>CMPACK_LEVEL_NORMAL</td><td>Print messages, suppress debug output (default). </td></tr><tr><td>CMPACK_LEVEL_DEBUG</td><td>Be verbose, print all messages including debug ones. </td></tr></table><h2>cmpack_con_init (function)</h2><p>Create a new console context that prints all output to stderr stream.</p><h3>Synopsis</h3><p class="synopsis">CmpackConsole * cmpack_con_init (void)</p><h3>Return value</h3><p>pointer to context of zero if failed</p><h2>cmpack_con_init_cb (function)</h2><p>Create a new console context that uses a user-defined function to print messages.</p><h3>Synopsis</h3><p class="synopsis">CmpackConsole * cmpack_con_init_cb (CmpackCallbackType * cbproc, void * cbdata)</p><h3>Return value</h3><p>pointer to context of zero if failed</p><h2>cmpack_con_set_level (function)</h2><p>Set the debug level.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_con_set_level (CmpackConsole * ctx, CmpackOutputLevel level)</p><h3>Parameters</h3><table><tr><td>ctx</td><td><tt>[in]</tt>&nbsp;</td><td>any context </td></tr><tr><td>level</td><td><tt>[in]</tt>&nbsp;</td><td>verbosity level (see CMPACK_LEVEL_xxx constants) </td></tr></table></body></html>