Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/msgqlib_8h_source.html
changeset 6 43e37759235e
equal deleted inserted replaced
5:f345bda72bc4 6:43e37759235e
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     2 <html xmlns="http://www.w3.org/1999/xhtml">
       
     3 <head>
       
     4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
       
     5 <title>TB9.2 Example Applications: examples/PIPS/opencmessagequeuelibraryex/engine/inc/msgqlib.h Source File</title>
       
     6 <link href="tabs.css" rel="stylesheet" type="text/css"/>
       
     7 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
       
     8 </head>
       
     9 <body>
       
    10 <!-- Generated by Doxygen 1.6.2 -->
       
    11 <h1>examples/PIPS/opencmessagequeuelibraryex/engine/inc/msgqlib.h</h1><a href="msgqlib_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
       
    12 <a name="l00010"></a>00010 <span class="preprocessor">#ifndef MSGQLIB_H</span>
       
    13 <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define MSGQLIB_H</span>
       
    14 <a name="l00012"></a>00012 <span class="preprocessor"></span>
       
    15 <a name="l00013"></a>00013 <span class="preprocessor">#include &lt;_ansi.h&gt;</span>
       
    16 <a name="l00014"></a>00014 
       
    17 <a name="l00015"></a>00015 <span class="preprocessor">#ifdef __cplusplus</span>
       
    18 <a name="l00016"></a>00016 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
       
    19 <a name="l00017"></a>00017 <span class="preprocessor">#endif</span>
       
    20 <a name="l00018"></a>00018 <span class="preprocessor"></span>
       
    21 <a name="l00019"></a>00019 <span class="comment">/* MsgQLib sizes */</span>
       
    22 <a name="l00020"></a>00020 <span class="preprocessor">#define  MAX_MSG_LEN       2048 </span>
       
    23 <a name="l00021"></a>00021 <span class="preprocessor"></span>
       
    24 <a name="l00022"></a>00022 <span class="comment">/* hash table parameters - table size must be a prime number  */</span>
       
    25 <a name="l00023"></a>00023 <span class="preprocessor">#define  MSGQ_TBL_SZ       101</span>
       
    26 <a name="l00024"></a>00024 <span class="preprocessor"></span>
       
    27 <a name="l00025"></a>00025 <span class="comment">/* message send states */</span>
       
    28 <a name="l00026"></a>00026 <span class="preprocessor">#define MSG_Q_READY        0</span>
       
    29 <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define MSG_Q_CLEANING     1</span>
       
    30 <a name="l00028"></a>00028 <span class="preprocessor"></span>
       
    31 <a name="l00029"></a>00029 
       
    32 <a name="l00030"></a>00030 <span class="preprocessor">#define NO_WAIT                         0</span>
       
    33 <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define WAIT_FOREVER            0xFFFF</span>
       
    34 <a name="l00032"></a>00032 <span class="preprocessor"></span>
       
    35 <a name="l00033"></a>00033 <span class="preprocessor">#ifndef NULL</span>
       
    36 <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define NULL                            0</span>
       
    37 <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* NULL */</span>
       
    38 <a name="l00036"></a>00036 
       
    39 <a name="l00037"></a>00037 <span class="comment">/* errors */</span>
       
    40 <a name="l00038"></a>00038 <span class="preprocessor">#define KMsgQLibErr                             0x100</span>
       
    41 <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define KMsgQLibNoMemoryErr     (KMsgQLibErr | 1) </span><span class="comment">/* out of memory */</span>
       
    42 <a name="l00040"></a>00040 <span class="preprocessor">#define KMsgQLibQIdErr                  (KMsgQLibErr | 2) </span><span class="comment">/* queue already in use or invalid */</span>
       
    43 <a name="l00041"></a>00041 <span class="preprocessor">#define KMsgQLibParamErr        (KMsgQLibErr | 3) </span><span class="comment">/* illegal parm(s)/val(s) */</span>
       
    44 <a name="l00042"></a>00042 <span class="preprocessor">#define KMsgQLibQFlushErr       (KMsgQLibErr | 4) </span><span class="comment">/* queue being flushed */</span>
       
    45 <a name="l00043"></a>00043 <span class="preprocessor">#define KMsgQLibQShortErr       (KMsgQLibErr | 5) </span><span class="comment">/* internal error:  inconsistency between #of msgs*/</span>
       
    46 <a name="l00044"></a>00044 
       
    47 <a name="l00045"></a>00045 <span class="preprocessor">#define  MSG_Q_FIFO       1</span>
       
    48 <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define  MSG_Q_PRIORITY   2</span>
       
    49 <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define  MSG_PRI_NORMAL   3</span>
       
    50 <a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define  MSG_PRI_URGENT   4</span>
       
    51 <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define  SEM_Q_FIFO       5</span>
       
    52 <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define  SEM_Q_PRIORITY   6</span>
       
    53 <a name="l00051"></a>00051 <span class="preprocessor"></span>
       
    54 <a name="l00052"></a>00052 <span class="preprocessor">#define  OK               0</span>
       
    55 <a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define  ERROR           -1  </span>
       
    56 <a name="l00054"></a>00054 <span class="preprocessor"></span>
       
    57 <a name="l00055"></a>00055 <span class="keyword">typedef</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>    ULONG ;
       
    58 <a name="l00056"></a>00056 <span class="keyword">typedef</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>   ushort_t;
       
    59 <a name="l00057"></a>00057 
       
    60 <a name="l00071"></a>00071 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#acc58bf2bd8d3b904069d8d604ccea5b1">MsgQCreate</a> (ULONG qName, ULONG maxMsgs, ULONG qOptions, <span class="keywordtype">int</span>* err);
       
    61 <a name="l00072"></a>00072 
       
    62 <a name="l00082"></a>00082 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#ae9435d91016cacef90a4d92db16a6fe1">MsgQDelete</a> (ULONG qName, <span class="keywordtype">int</span>* err);
       
    63 <a name="l00083"></a>00083 
       
    64 <a name="l00098"></a>00098 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#a5272782967b922604e4f47e8bc67a468">MsgQSend</a> (ULONG qName, <span class="keywordtype">char</span>* msg, ULONG nBytes, ULONG priority, <span class="keywordtype">int</span> timeout, <span class="keywordtype">int</span>* err);
       
    65 <a name="l00099"></a>00099 
       
    66 <a name="l00113"></a>00113 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#a92645de66865355158589ff1dd7bc28d">MsgQReceive</a> (ULONG qName, <span class="keywordtype">char</span>* msg, ULONG maxNBytes, <span class="keywordtype">int</span> timeout, <span class="keywordtype">int</span>* err);
       
    67 <a name="l00114"></a>00114 
       
    68 <a name="l00124"></a>00124 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#a6539cca974e31b9571caae1a93576b21">MsgQCheck</a> (ULONG qName, <span class="keywordtype">int</span>* err);
       
    69 <a name="l00125"></a>00125 
       
    70 <a name="l00134"></a>00134 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#ac3714b7e3c9e3eafb7375ca1fe5d5ad7">MsgQMaxCheck</a> (ULONG qName, <span class="keywordtype">int</span>* err);
       
    71 <a name="l00135"></a>00135 
       
    72 <a name="l00145"></a>00145 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="msgqlib_8h.html#af100b3206a8771a0b599a1ba5a4c8cb8">MsgQClean</a> (ULONG qName, <span class="keywordtype">int</span>* err);
       
    73 <a name="l00146"></a>00146 
       
    74 <a name="l00147"></a>00147 <span class="preprocessor">#ifdef __cplusplus</span>
       
    75 <a name="l00148"></a>00148 <span class="preprocessor"></span>}
       
    76 <a name="l00149"></a>00149 <span class="preprocessor">#endif</span>
       
    77 <a name="l00150"></a>00150 <span class="preprocessor"></span>
       
    78 <a name="l00151"></a>00151 <span class="preprocessor">#endif </span><span class="comment">/* MSGQLIB_H */</span>
       
    79 </pre></div></div>
       
    80 <hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
       
    81 <a href="http://www.doxygen.org/index.html">
       
    82 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
       
    83 </body>
       
    84 </html>