<html> <head> <title>MAPIClientLibraries 0.9 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.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data 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="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>libmapi/IMAPISession.c File Reference</h1> </div> </div> <div class="contents"> <p>Session initialization options. <a href="#_details">More...</a></p> <code>#include <<a class="el" href="libmapi_8h.html">libmapi/libmapi.h</a>></code><br/> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS </td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISession_8c.html#a4fdd3c5db64deb2173a9bc921aee2dfd">OpenMsgStore</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_store)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS </td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISession_8c.html#ad878c431f446bd697010fab197cfe5ef">OpenPublicFolder</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_store)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS </td><td class="memItemRight" valign="bottom"><a class="el" href="IMAPISession_8c.html#a4dfac72df5e1bafaf43c4218286ae2c9">OpenUserMailbox</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, const char *username, <a class="el" href="structmapi__object.html">mapi_object_t</a> *obj_store)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Session initialization options. </p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a4fdd3c5db64deb2173a9bc921aee2dfd"></a><!-- doxytag: member="IMAPISession.c::OpenMsgStore" ref="a4fdd3c5db64deb2173a9bc921aee2dfd" args="(struct mapi_session *session, mapi_object_t *obj_store)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS OpenMsgStore </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmapi__session.html">mapi_session</a> * </td> <td class="paramname"> <em>session</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> * </td> <td class="paramname"> <em>obj_store</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open the Message Store</p> <p>This function opens the main message store. This allows access to the normal user folders.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>pointer to the MAPI session context </td></tr> <tr><td valign="top"></td><td valign="top"><em>obj_store</em> </td><td>the result of opening the store</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl> <dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">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"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#ab293406ab51b9d0f5271a930480b2eec">MAPIInitialize</a> which is required before opening the store </dd> <dd> <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> to check the result of a failed call, if necessary </dd> <dd> <a class="el" href="proto_8h.html#ac27ee071a1b0d8344bb0320a4a647f54">OpenPublicFolder</a> if you need access to the public folders </dd></dl> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="fetchappointment_8c-example.html#a7">fetchappointment.c</a>, and <a class="el" href="fetchmail_8c-example.html#a7">fetchmail.c</a>.</dd> </dl> <p>References <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="IMAPISession_8c.html#a4dfac72df5e1bafaf43c4218286ae2c9">OpenUserMailbox()</a>, <a class="el" href="structmapi__session.html#aaf43b41f2628347b7944827c49334a5a">mapi_session::profile</a>, and <a class="el" href="structmapi__profile.html#aa59e563eab407a53f80ac3841650bfc2">mapi_profile::username</a>.</p> </div> </div> <a class="anchor" id="ad878c431f446bd697010fab197cfe5ef"></a><!-- doxytag: member="IMAPISession.c::OpenPublicFolder" ref="ad878c431f446bd697010fab197cfe5ef" args="(struct mapi_session *session, mapi_object_t *obj_store)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS OpenPublicFolder </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmapi__session.html">mapi_session</a> * </td> <td class="paramname"> <em>session</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> * </td> <td class="paramname"> <em>obj_store</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open the Public Folder store</p> <p>This function opens the public folder store. This allows access to the public folders.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>obj_store</em> </td><td>the result of opening the store </td></tr> <tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>pointer to the MAPI session context</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl> <dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">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"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#ab293406ab51b9d0f5271a930480b2eec">MAPIInitialize</a> which is required before opening the store </dd> <dd> <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> to check the result of a failed call, if necessary </dd> <dd> <a class="el" href="proto_8h.html#af3ccf6c1f83aa3659f7c04a4fcd1cf5f">OpenMsgStore</a> if you need access to the message store folders </dd></dl> <p>References <a class="el" href="structmapi__obj__store.html#a661e229a8f1b4f1f3fea0af5714bb4bc">mapi_obj_store::cached_mailbox_fid</a>, <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="structmapi__obj__store.html#a334881b7902eec733783c59937b7bd01">mapi_obj_store::fid_pf_EFormsRegistry</a>, <a class="el" href="structmapi__obj__store.html#aa9200cf18a3bf331922ffa6c59c3ef7a">mapi_obj_store::fid_pf_EFormsRegistryRoot</a>, <a class="el" href="structmapi__obj__store.html#a691d1367f757d70fce677a18eccc0194">mapi_obj_store::fid_pf_FreeBusyRoot</a>, <a class="el" href="structmapi__obj__store.html#abed43770849938e6fb75a03f6085ee09">mapi_obj_store::fid_pf_ipm_subtree</a>, <a class="el" href="structmapi__obj__store.html#aa5d33a51b6549ad34d27e46d9d1a3bf8">mapi_obj_store::fid_pf_LocalSiteFreeBusy</a>, <a class="el" href="structmapi__obj__store.html#a672ed54c78afc9c6c1211bd023008c44">mapi_obj_store::fid_pf_LocalSiteOfflineAB</a>, <a class="el" href="structmapi__obj__store.html#aa3ff2980e63cca25dbe6c65f4634d2f6">mapi_obj_store::fid_pf_NNTPArticle</a>, <a class="el" href="structmapi__obj__store.html#af6db30ca93d582b8d738e329b57ff780">mapi_obj_store::fid_pf_non_ipm_subtree</a>, <a class="el" href="structmapi__obj__store.html#adc927e46cd6d293aadeee38cdb7c548d">mapi_obj_store::fid_pf_OfflineAB</a>, <a class="el" href="structmapi__obj__store.html#a221d1d43844d3f826025a8ca1fcb780b">mapi_obj_store::fid_pf_public_root</a>, <a class="el" href="IMSProvider_8c.html#a8cf4e89cef4e43d2364ef6f4d2002130">GetNewLogonId()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a5ae14832b40db995554d07a2bbdb59fd">mapi_object_set_logon_store()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="structmapi__object.html#af33195293d914107863508deadcfba80">mapi_object::private_data</a>, and <a class="el" href="structmapi__session.html#aaf43b41f2628347b7944827c49334a5a">mapi_session::profile</a>.</p> </div> </div> <a class="anchor" id="a4dfac72df5e1bafaf43c4218286ae2c9"></a><!-- doxytag: member="IMAPISession.c::OpenUserMailbox" ref="a4dfac72df5e1bafaf43c4218286ae2c9" args="(struct mapi_session *session, const char *username, mapi_object_t *obj_store)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS OpenUserMailbox </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmapi__session.html">mapi_session</a> * </td> <td class="paramname"> <em>session</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>username</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmapi__object.html">mapi_object_t</a> * </td> <td class="paramname"> <em>obj_store</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open another user mailbox</p> <p>This function opens the main message store. This allows access to the normal user folders.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>pointer to the MAPI session context </td></tr> <tr><td valign="top"></td><td valign="top"><em>username</em> </td><td>name of the user's mailbox to open </td></tr> <tr><td valign="top"></td><td valign="top"><em>obj_store</em> </td><td>the result of opening the store</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error.</dd></dl> <dl class="note"><dt><b>Note:</b></dt><dd>Developers may also call <a class="el" href="IUnknown_8c.html#a8237c7fc76377cb07f3f55920d6f20de">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"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#ab293406ab51b9d0f5271a930480b2eec">MAPIInitialize</a> which is required before opening the store </dd> <dd> <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> to check the result of a failed call, if necessary </dd> <dd> <a class="el" href="proto_8h.html#ac27ee071a1b0d8344bb0320a4a647f54">OpenPublicFolder</a> if you need access to the public folders </dd></dl> <p>References <a class="el" href="structmapi__obj__store.html#a661e229a8f1b4f1f3fea0af5714bb4bc">mapi_obj_store::cached_mailbox_fid</a>, <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="structmapi__session.html#a0d032340047573649b7527e660cac594">mapi_session::emsmdb</a>, <a class="el" href="emsmdb_8c.html#ae07f13624739ffff34e89ed3003a354e">emsmdb_transaction()</a>, <a class="el" href="structmapi__obj__store.html#ad9eb061e94397fb376d7b9319519f7dd">mapi_obj_store::fid_common_views</a>, <a class="el" href="structmapi__obj__store.html#a5dd9776cef62a24dde04bdbc97cb390e">mapi_obj_store::fid_deferred_actions</a>, <a class="el" href="structmapi__obj__store.html#a53488f1547d3479315be14868aa333c1">mapi_obj_store::fid_deleted_items</a>, <a class="el" href="structmapi__obj__store.html#a7df17d77c596ed420bdacde67df0090e">mapi_obj_store::fid_inbox</a>, <a class="el" href="structmapi__obj__store.html#a352c3c89cc3fe1cab5b91cba5045233f">mapi_obj_store::fid_mailbox_root</a>, <a class="el" href="structmapi__obj__store.html#a609576092e99a5f8dead00ed8db7d12b">mapi_obj_store::fid_outbox</a>, <a class="el" href="structmapi__obj__store.html#a69d624b50ef344dadf1bc4300cf079b8">mapi_obj_store::fid_schedule</a>, <a class="el" href="structmapi__obj__store.html#a643f0140faafe086b4ca4aefeda85389">mapi_obj_store::fid_search</a>, <a class="el" href="structmapi__obj__store.html#a7e91c6b4ec2ed35fd828ba4fa6edcbe8">mapi_obj_store::fid_sent_items</a>, <a class="el" href="structmapi__obj__store.html#a8920ef00a31a0821a58d9369b236517e">mapi_obj_store::fid_shortcuts</a>, <a class="el" href="structmapi__obj__store.html#add4bfba702119887165964dc9bcf6aad">mapi_obj_store::fid_spooler_queue</a>, <a class="el" href="structmapi__obj__store.html#a316d6a9100c3823ae062fbae51b58eb7">mapi_obj_store::fid_top_information_store</a>, <a class="el" href="structmapi__obj__store.html#a8c410f57af7e0485d70b3d4e303a5ddd">mapi_obj_store::fid_views</a>, <a class="el" href="IMSProvider_8c.html#a8cf4e89cef4e43d2364ef6f4d2002130">GetNewLogonId()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__profile.html#a0d22fa4885a0b8584a3ddaa13de4738a">mapi_profile::mailbox</a>, <a class="el" href="mapi__object_8c.html#a6cad283dc5a1228734e816adb30aa53c">mapi_object_set_handle()</a>, <a class="el" href="mapi__object_8c.html#a845af67422945480121797b8a44ab14d">mapi_object_set_logon_id()</a>, <a class="el" href="mapi__object_8c.html#a5ae14832b40db995554d07a2bbdb59fd">mapi_object_set_logon_store()</a>, <a class="el" href="mapi__object_8c.html#a373e9bd46155ea22e816fa66944f22a6">mapi_object_set_session()</a>, <a class="el" href="mapicode_8h.html#a53da6d1258f2abd902930b6af1134d1c">OPENCHANGE_CHECK_NOTIFICATION</a>, <a class="el" href="mapicode_8h.html#a8bcc2c03dc8b6ed0c9f58e6e6ea9f171">OPENCHANGE_RETVAL_CALL_IF</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="structmapi__profile.html#ab8b1676b07c9f8184560aeb89369858e">mapi_profile::org</a>, <a class="el" href="structmapi__profile.html#a8037149561570e1f5d7c832bb4472f3d">mapi_profile::ou</a>, <a class="el" href="structmapi__object.html#af33195293d914107863508deadcfba80">mapi_object::private_data</a>, and <a class="el" href="structmapi__session.html#aaf43b41f2628347b7944827c49334a5a">mapi_session::profile</a>.</p> <p>Referenced by <a class="el" href="proto_8h.html#af3ccf6c1f83aa3659f7c04a4fcd1cf5f">OpenMsgStore()</a>.</p> </div> </div> </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>