Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > d4a6745d7fbd92dfb64dce5e91e08f80 > files > 114

lib64meanwhile1-doc-1.0.2-1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>meanwhile: mw_srvc_store.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>mw_srvc_store.h</h1><a href="mw__srvc__store_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment">  Meanwhile - Unofficial Lotus Sametime Community Client Library</span>
<a name="l00004"></a>00004 <span class="comment">  Copyright (C) 2004  Christopher (siege) O'Brien</span>
<a name="l00005"></a>00005 <span class="comment">  </span>
<a name="l00006"></a>00006 <span class="comment">  This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment">  modify it under the terms of the GNU Library General Public</span>
<a name="l00008"></a>00008 <span class="comment">  License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment">  version 2 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment">  </span>
<a name="l00011"></a>00011 <span class="comment">  This library is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment">  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00014"></a>00014 <span class="comment">  Library General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment">  </span>
<a name="l00016"></a>00016 <span class="comment">  You should have received a copy of the GNU Library General Public</span>
<a name="l00017"></a>00017 <span class="comment">  License along with this library; if not, write to the Free</span>
<a name="l00018"></a>00018 <span class="comment">  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef _MW_SRVC_STORE_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define _MW_SRVC_STORE_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;glib.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="mw__common_8h.html" title="Common data types and functions for handling those types.">mw_common.h</a>"</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 
<a name="l00035"></a><a class="code" href="mw__srvc__store_8h.html#25f65d69ffed33ef673c8e152106549b">00035</a> <span class="preprocessor">#define mwService_STORAGE  0x00000018</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 
<a name="l00042"></a><a class="code" href="structmwStorage.html">00042</a> <span class="keyword">struct </span><a class="code" href="structmwServiceStorage.html" title="mwServiceStorage_new">mwServiceStorage</a>;
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 
<a name="l00049"></a>00049 <span class="keyword">struct </span>mwStorageUnit;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00053"></a><a class="code" href="mw__srvc__store_8h.html#8bc869f420049a0bd5d0b1c2de7cc89e">00053</a> <span class="preprocessor">#define LOTUS_RESERVED_LIMIT  0x186a0</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="mw__srvc__store_8h.html#6befc88185dd58cc16e704e4c4c78322">00057</a> <span class="preprocessor">#define KEY_IS_LOTUS_RESERVED(key) \</span>
<a name="l00058"></a>00058 <span class="preprocessor">  (((guint32) key) &lt;= (LOTUS_RESERVED_LIMIT))</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a>00060 
<a name="l00064"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88">00064</a> <span class="keyword">enum</span> <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88" title="Some common keys storage keys.">mwStorageKey</a> {
<a name="l00065"></a>00065 
<a name="l00067"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f888f07f37098cbd1582954f3b060dd13ab">00067</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f888f07f37098cbd1582954f3b060dd13ab" title="The buddy list, in the Sametime .dat file format.">mwStore_AWARE_LIST</a>      = 0x00000000,
<a name="l00068"></a>00068 
<a name="l00070"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f8876cfbb82cc77f969260bf3ee1ab93950">00070</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f8876cfbb82cc77f969260bf3ee1ab93950" title="Default text for chat invitations.">mwStore_INVITE_CHAT</a>     = 0x00000006,
<a name="l00071"></a>00071 
<a name="l00073"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88d97fb6917035f4ed4ca6576d8671b2d6">00073</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88d97fb6917035f4ed4ca6576d8671b2d6" title="Default text for meeting invitations.">mwStore_INVITE_MEETING</a>  = 0x0000000e,
<a name="l00074"></a>00074 
<a name="l00076"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f888a037320a3eaff77120fee66eae5445b">00076</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f888a037320a3eaff77120fee66eae5445b" title="Last five Away messages, separated by semicolon.">mwStore_AWAY_MESSAGES</a>   = 0x00000050,
<a name="l00077"></a>00077 
<a name="l00079"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f882b1d1f0de29ac8b4f309bff5c58735f1">00079</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f882b1d1f0de29ac8b4f309bff5c58735f1" title="Last five Busy (DND) messages, separated by semicolon.">mwStore_BUSY_MESSAGES</a>   = 0x0000005a,
<a name="l00080"></a>00080 
<a name="l00082"></a><a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88c3697e70cff492cbcbd2aca8fbc82f84">00082</a>   <a class="code" href="mw__srvc__store_8h.html#b490c5f87cc36273720570b9bb2b3f88c3697e70cff492cbcbd2aca8fbc82f84" title="Last five Active messages, separated by semicolon.">mwStore_ACTIVE_MESSAGES</a> = 0x00000064,
<a name="l00083"></a>00083 };
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 
<a name="l00092"></a>00092 <span class="keyword">typedef</span> void (*<a class="code" href="mw__srvc__store_8h.html#5cebb99048ee65b6f3fd98c3eaf82021" title="Appropriate function type for load and store callbacks.">mwStorageCallback</a>)
<a name="l00093"></a><a class="code" href="mw__srvc__store_8h.html#5cebb99048ee65b6f3fd98c3eaf82021">00093</a>      (<span class="keyword">struct </span><a class="code" href="structmwServiceStorage.html" title="mwServiceStorage_new">mwServiceStorage</a> *srvc,
<a name="l00094"></a>00094       guint32 result, <span class="keyword">struct </span>mwStorageUnit *item,
<a name="l00095"></a>00095       gpointer data);
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 
<a name="l00100"></a>00100 <span class="keyword">struct </span><a class="code" href="structmwServiceStorage.html" title="mwServiceStorage_new">mwServiceStorage</a> *<a class="code" href="mw__srvc__store_8h.html#8f9571a1e27918cc057606600dd2cf25" title="Allocates and initializes a storage service instance for use on the passed session...">mwServiceStorage_new</a>(<span class="keyword">struct</span> <a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a> *);
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 
<a name="l00104"></a>00104 <span class="keyword">struct </span>mwStorageUnit *<a class="code" href="mw__srvc__store_8h.html#319e221738360e4c784c2cb18df37f25" title="create an empty storage unit">mwStorageUnit_new</a>(guint32 key);
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 
<a name="l00108"></a>00108 <span class="keyword">struct </span>mwStorageUnit *<a class="code" href="mw__srvc__store_8h.html#0c11cfb40fc2a756241e3d8a642ef2c0" title="creates a storage unit with the passed key, and a copy of data.">mwStorageUnit_newOpaque</a>(guint32 key,
<a name="l00109"></a>00109                                               <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *data);
<a name="l00110"></a>00110 
<a name="l00111"></a>00111 
<a name="l00114"></a>00114 <span class="keyword">struct </span>mwStorageUnit *<a class="code" href="mw__srvc__store_8h.html#e2b9db3a516a5057949f7318eb32ab62" title="creates a storage unit with the passed key, and an encapsulated boolean value">mwStorageUnit_newBoolean</a>(guint32 key,
<a name="l00115"></a>00115                                                gboolean val);
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 <span class="keyword">struct </span>mwStorageUnit *<a class="code" href="mw__srvc__store_8h.html#3c11b0a807b72ff23a829a9f4bc26be8">mwStorageUnit_newInteger</a>(guint32 key,
<a name="l00119"></a>00119                                                guint32 val);
<a name="l00120"></a>00120 
<a name="l00121"></a>00121 
<a name="l00124"></a>00124 <span class="keyword">struct </span>mwStorageUnit *<a class="code" href="mw__srvc__store_8h.html#97270b9020bd5185ad17a803fbf8f91a" title="creates a storage unit with the passed key, and an encapsulated string value.">mwStorageUnit_newString</a>(guint32 key,
<a name="l00125"></a>00125                                               <span class="keyword">const</span> <span class="keywordtype">char</span> *str);
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 
<a name="l00129"></a>00129 guint32 <a class="code" href="mw__srvc__store_8h.html#3bb73476fc749ff3a4e8ab0c327a83ba" title="get the key for the given storage unit">mwStorageUnit_getKey</a>(<span class="keyword">struct</span> mwStorageUnit *);
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 
<a name="l00135"></a>00135 gboolean <a class="code" href="mw__srvc__store_8h.html#f622a55188af247d9b15ba52fbc29e79" title="attempts to obtain a boolean value from a storage unit.">mwStorageUnit_asBoolean</a>(<span class="keyword">struct</span> mwStorageUnit *, gboolean val);
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 
<a name="l00141"></a>00141 guint32 <a class="code" href="mw__srvc__store_8h.html#34f62dceef1c6ea21b0561335c8a6abb" title="attempts to obtain a guint32 value from a storage unit.">mwStorageUnit_asInteger</a>(<span class="keyword">struct</span> mwStorageUnit *, guint32 val);
<a name="l00142"></a>00142 
<a name="l00143"></a>00143 
<a name="l00148"></a>00148 <span class="keywordtype">char</span> *<a class="code" href="mw__srvc__store_8h.html#8c05a957993e34a0434052e3fced36b3" title="attempts to obtain a string value from a storage unit.">mwStorageUnit_asString</a>(<span class="keyword">struct</span> mwStorageUnit *);
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 
<a name="l00152"></a>00152 <span class="keyword">struct </span><a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *<a class="code" href="mw__srvc__store_8h.html#c565c58bfa3b3a5094136abe38fbdaf6" title="direct access to the opaque data backing the storage unit">mwStorageUnit_asOpaque</a>(<span class="keyword">struct</span> mwStorageUnit *);
<a name="l00153"></a>00153 
<a name="l00154"></a>00154 
<a name="l00156"></a>00156 <span class="keywordtype">void</span> <a class="code" href="mw__srvc__store_8h.html#e9acfeda591578400ae5defcce84010c" title="clears and frees a storage unit">mwStorageUnit_free</a>(<span class="keyword">struct</span> mwStorageUnit *);
<a name="l00157"></a>00157 
<a name="l00158"></a>00158       
<a name="l00169"></a>00169 <span class="keywordtype">void</span> <a class="code" href="mw__srvc__store_8h.html#8e323cfbdf1f9d3af18d7d27df3b603f" title="Initiates a load call to the storage service.">mwServiceStorage_load</a>(<span class="keyword">struct</span> <a class="code" href="structmwServiceStorage.html" title="mwServiceStorage_new">mwServiceStorage</a> *srvc,
<a name="l00170"></a>00170                            <span class="keyword">struct</span> mwStorageUnit *item,
<a name="l00171"></a>00171                            <a class="code" href="mw__srvc__store_8h.html#5cebb99048ee65b6f3fd98c3eaf82021" title="Appropriate function type for load and store callbacks.">mwStorageCallback</a> cb,
<a name="l00172"></a>00172                            gpointer <a class="code" href="structmwOpaque.html#5b825ce89e8c20605d70ad593f57684e" title="data, normally with no NULL termination">data</a>, GDestroyNotify data_free);
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 
<a name="l00185"></a>00185 <span class="keywordtype">void</span> <a class="code" href="mw__srvc__store_8h.html#43dafaf7dd5d09e4a1c92ec44bd5a842" title="Initiates a store call to the storage service.">mwServiceStorage_save</a>(<span class="keyword">struct</span> <a class="code" href="structmwServiceStorage.html" title="mwServiceStorage_new">mwServiceStorage</a> *srvc,
<a name="l00186"></a>00186                            <span class="keyword">struct</span> mwStorageUnit *item,
<a name="l00187"></a>00187                            <a class="code" href="mw__srvc__store_8h.html#5cebb99048ee65b6f3fd98c3eaf82021" title="Appropriate function type for load and store callbacks.">mwStorageCallback</a> cb,
<a name="l00188"></a>00188                            gpointer <a class="code" href="structmwOpaque.html#5b825ce89e8c20605d70ad593f57684e" title="data, normally with no NULL termination">data</a>, GDestroyNotify data_free);
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00192"></a>00192 <span class="preprocessor"></span>}
<a name="l00193"></a>00193 <span class="preprocessor">#endif</span>
<a name="l00194"></a>00194 <span class="preprocessor"></span>
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 <span class="preprocessor">#endif </span><span class="comment">/* _MW_SRVC_STORE_H */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 19 09:10:34 2007 for meanwhile by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>