Sophie

Sophie

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

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 class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="mapiconcepts">MAPI Concepts </a></h1><h2>MAPI objects</h2>
<p>
Almost any MAPI data you access, read or edit is associated with an object. No matter whether you intend to browse mailbox hierarchy, open folders, create tables or access items (messages, appointments, contacts, tasks, notes), you will have to initialize and use MAPI objects: <em>object understanding and manipulation is fundamental</em>.<p>
<ul>
<li>When developing MAPI clients with Microsoft framework, instantiated objects inherit from parent classes. As a matter of fact, developers know which methods they can apply to objects and we suppose it makes their life easier.</li><li>In OpenChange, objects are opaque. They are generic data structures which content is set and accessed through MAPI public functions. Therefore, Linux MAPI developers must know what they are doing.</li></ul>
<p>
An example of MAPI object manipulation is shown below: <div class="fragment"><pre class="fragment">        mapi_object     obj_store;

        [...]

        <a class="code" href="mapi__object_8c.html#f49c3130b8cb47f741ff652fc53c1364">mapi_object_init</a>(&amp;obj_store);
        retval = <a class="code" href="IMAPISession_8c.html#4fdd3c5db64deb2173a9bc921aee2dfd">OpenMsgStore</a>(&amp;obj_store);
        <span class="keywordflow">if</span> (retval != MAPI_E_SUCCESS) {
                mapi_errstr(<span class="stringliteral">"OpenMsgStore"</span>, <a class="code" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a>());
                exit (1);
        }
        <a class="code" href="mapi__object_8c.html#de2b4701fae8a110c476b894834831b9">mapi_object_release</a>(&amp;obj_store);
</pre></div><p>
<h3>MAPI Handles</h3>
<p>
Beyond memory management considerations, understanding MAPI handles role in object manipulation provides a better understanding why <a class="el" href="mapi__object_8c.html#de2b4701fae8a110c476b894834831b9">mapi_object_release()</a> matters.<p>
Handles are temporary identifiers returned by Exchange when you access or create objects on the server. They are used to make reference to a particular object all along its session lifetime. They are stored in unsigned integers, are unique for each object but temporary along MAPI session. Handles are the only links between objects accessed on the client side and efficiently stored on the server side.<p>
Although OpenChange MAPI makes handles manipulation transparent for developers, <a class="el" href="mapi__object_8c.html#de2b4701fae8a110c476b894834831b9">mapi_object_release()</a> frees both the allocated memory for the object on client side, but also releases the object on the server. </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>