Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 943b1476818e5ec34d7058ed3b879448 > files > 83

libmapi-devel-0.8.2-1.1481.3mdv2010.0.i586.rpm

<html>
  <head>
    <title>MAPIClientLibraries 0.8 API Documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css"/>
    <link href="apidocs.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    <div id="website">
    <div class="header"></div>
      <div id="middle_side">
	<div id="right_side_home">
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>libmapi/IMAPISupport.c File Reference</h1>MAPI notifications functions.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;libmapi/libmapi.h&gt;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISupport_8c.html#dc7b00c3f0c5f688ff6eb96228e98191">DispatchNotifications</a> (struct mapi_session *session)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISupport_8c.html#2da23c67d2c39273f6bcadde06d8fb4d">MonitorNotification</a> (struct mapi_session *session, void *private_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe</a> (mapi_object_t *obj, uint32_t *connection, uint16_t NotificationFlags, bool WholeStore, mapi_notify_callback_t notify_callback, void *private_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISupport_8c.html#35355b1cdd5ef508f1f57a41842f8bd9">Unsubscribe</a> (struct mapi_session *session, uint32_t ulConnection)</td></tr>

</table>
<hr><h2>Detailed Description</h2>
MAPI notifications functions. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="dc7b00c3f0c5f688ff6eb96228e98191"></a><!-- doxytag: member="IMAPISupport.c::DispatchNotifications" ref="dc7b00c3f0c5f688ff6eb96228e98191" args="(struct mapi_session *session)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS DispatchNotifications           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_session *&nbsp;</td>
          <td class="paramname"> <em>session</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Force notification of pending events<p>
This function force the server to send any pending notificaion and process them. These MAPI notifications are next compared to the registered ones and the callback specified in <a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe()</a> called if it matches.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IMSProvider_8c.html#accd9111c24e9aac689edf4e614b20a1">RegisterNotification</a>, <a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe</a>, <a class="el" href="IMAPISupport_8c.html#35355b1cdd5ef508f1f57a41842f8bd9">Unsubscribe</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="emsmdb_8c_source.html#l00214">emsmdb_transaction_null()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2da23c67d2c39273f6bcadde06d8fb4d"></a><!-- doxytag: member="IMAPISupport.c::MonitorNotification" ref="2da23c67d2c39273f6bcadde06d8fb4d" args="(struct mapi_session *session, void *private_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS MonitorNotification           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_session *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>private_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait for notifications and process them<p>
This function indefinively waits for notifications on the UDP port and generates the traffic needed to receive MAPI notifications. These MAPI notifications are next compared to the registered ones and the callback specified in <a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe()</a> called if it matches.<p>
Note that the function will loop indefinitively until an error occurs.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IMSProvider_8c.html#accd9111c24e9aac689edf4e614b20a1">RegisterNotification</a>, <a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe</a>, <a class="el" href="IMAPISupport_8c.html#35355b1cdd5ef508f1f57a41842f8bd9">Unsubscribe</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a></dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This code is experimental. The current implementation is non-threaded, only supports fnevNewmail and fnevCreatedObject notifications and will block your process until you send a signal. </dd></dl>

<p>References <a class="el" href="emsmdb_8c_source.html#l00214">emsmdb_transaction_null()</a>.</p>

</div>
</div><p>
<a class="anchor" name="30f5d03776a9e432af19d6803ee5784e"></a><!-- doxytag: member="IMAPISupport.c::Subscribe" ref="30f5d03776a9e432af19d6803ee5784e" args="(mapi_object_t *obj, uint32_t *connection, uint16_t NotificationFlags, bool WholeStore, mapi_notify_callback_t notify_callback, void *private_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS Subscribe           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&nbsp;</td>
          <td class="paramname"> <em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>NotificationFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>WholeStore</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mapi_notify_callback_t&nbsp;</td>
          <td class="paramname"> <em>notify_callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>private_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Register an object to receive notifications<p>
This function registers notifications on the Exchange server for an object. The function holds the notifications intended to be monitored in as a bitmask.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>the object to get notifications for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>connection</em>&nbsp;</td><td>connection identifier for callabck function </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>NotificationFlags</em>&nbsp;</td><td>mask for events to provide notifications for (see below) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>WholeStore</em>&nbsp;</td><td>whether the scope for this notification is whole database </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>notify_callback</em>&nbsp;</td><td>notification callback function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>private_data</em>&nbsp;</td><td>the data to be passed at the callback function when invoked</td></tr>
  </table>
</dl>
The Notification Flags can take the following values:<ul>
<li>fnevCriticalError</li><li>fnevNewMail</li><li>fnevObjectCreated</li><li>fnevObjectDeleted</li><li>fnevObjectModified</li><li>fnevObjectMoved</li><li>fnevObjectCopied</li><li>fnevSearchComplete</li><li>fnevTableModified</li><li>fnevStatusObjectModified</li><li>fnevReservedForMapi</li><li>fnevExtended</li></ul>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IMSProvider_8c.html#accd9111c24e9aac689edf4e614b20a1">RegisterNotification</a>, <a class="el" href="IMAPISupport_8c.html#35355b1cdd5ef508f1f57a41842f8bd9">Unsubscribe</a>, <a class="el" href="IMAPISupport_8c.html#2da23c67d2c39273f6bcadde06d8fb4d">MonitorNotification</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="emsmdb_8c_source.html#l00283">emsmdb_transaction()</a>, <a class="el" href="mapi__object_8c_source.html#l00264">mapi_object_get_handle()</a>, <a class="el" href="mapi__object_8c_source.html#l00197">mapi_object_get_id()</a>, <a class="el" href="mapi__object_8c_source.html#l00238">mapi_object_get_logon_id()</a>, <a class="el" href="mapi__object_8c_source.html#l00165">mapi_object_get_session()</a>, <a class="el" href="mapi__object_8c_source.html#l00072">mapi_object_init()</a>, <a class="el" href="mapi__object_8c_source.html#l00276">mapi_object_set_handle()</a>, and <a class="el" href="mapi__object_8c_source.html#l00181">mapi_object_set_session()</a>.</p>

</div>
</div><p>
<a class="anchor" name="35355b1cdd5ef508f1f57a41842f8bd9"></a><!-- doxytag: member="IMAPISupport.c::Unsubscribe" ref="35355b1cdd5ef508f1f57a41842f8bd9" args="(struct mapi_session *session, uint32_t ulConnection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS Unsubscribe           </td>
          <td>(</td>
          <td class="paramtype">struct mapi_session *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>ulConnection</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unregister notifications on a given object.<p>
Cancel any notification registrations associated with the notify object. This function unregisters notifications on the Exchange server for the object specified with its connection number ulConnection. The function will releases the notification on the Exchange server and remove the entry from the internal notifications list.<p>
The function takes a callback to execute when such notification occurs and returns the ulConnection identifier we can use in further management.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a> to retrieve the last MAPI error code. Possible MAPI error codes are:<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li><li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IMSProvider_8c.html#accd9111c24e9aac689edf4e614b20a1">RegisterNotification</a>, <a class="el" href="IMAPISupport_8c.html#30f5d03776a9e432af19d6803ee5784e">Subscribe</a>, <a class="el" href="IMAPISupport_8c.html#2da23c67d2c39273f6bcadde06d8fb4d">MonitorNotification</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IUnknown_8c_source.html#l00112">Release()</a>.</p>

</div>
</div><p>
</div>
</div>
<br/>
<table style="clear:both; margin: 0.5em auto; width:80%; text-align: center; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;">
<tr>
<td> 
  <img alt="Creative Commons License" src="CC_SomeRightsReserved.png" width="90" height="30" border="0" /><br />
  <img alt="Creative Commons Attribution icon" src="24px-Cc-by_white.svg.png" width="24" height="24" border="0" />
  <img alt="Creative Commons Share Alike icon" src="24px-Cc-sa_white.svg.png" width="24" height="24" border="0" />
</td>
<td> <i><strong class="selflink">This content</strong> is licensed under the Creative Commons<br />
Attribution ShareAlike License v. 3.0:<br />
<a href="http://creativecommons.org/licenses/by-sa/3.0/" class="external free" title="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow">http://creativecommons.org/licenses/by-sa/3.0/</a></i>
</td></tr></table>
<br/>
</div>
</div>
</body>
</html>