<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/IABContainer.c File Reference</h1> </div> </div> <div class="contents"> <p>Provides access to address book containers -- Used to perform name resolution. <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="IABContainer_8c.html#ad936e550d73780a978a726d9ce213562">GetABRecipientInfo</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, const char *username, struct SPropTagArray *pPropTags, struct SRowSet **ppRowSet)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS </td><td class="memItemRight" valign="bottom"><a class="el" href="IABContainer_8c.html#a73b59ff764022e1b5116a51c6f735c3d">GetGALTable</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, struct SPropTagArray *SPropTagArray, struct SRowSet **SRowSet, uint32_t count, uint8_t ulFlags)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS </td><td class="memItemRight" valign="bottom"><a class="el" href="IABContainer_8c.html#a983fbb1c5d57401c0141770b48f6e533">ResolveNames</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, const char **usernames, struct SPropTagArray *props, struct SRowSet **rowset, struct SPropTagArray **flaglist, uint32_t flags)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Provides access to address book containers -- Used to perform name resolution. </p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ad936e550d73780a978a726d9ce213562"></a><!-- doxytag: member="IABContainer.c::GetABRecipientInfo" ref="ad936e550d73780a978a726d9ce213562" args="(struct mapi_session *session, const char *username, struct SPropTagArray *pPropTags, struct SRowSet **ppRowSet)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS GetABRecipientInfo </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">struct SPropTagArray * </td> <td class="paramname"> <em>pPropTags</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct SRowSet ** </td> <td class="paramname"> <em>ppRowSet</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieve Address Book information for a given recipient</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>pointer to the username to retrieve information from </td></tr> <tr><td valign="top"></td><td valign="top"><em>pPropTags</em> </td><td>pointer to the property tags array to lookup </td></tr> <tr><td valign="top"></td><td valign="top"><em>ppRowSet</em> </td><td>pointer on pointer to the results</td></tr> </table> </dd> </dl> <p>Note that if pPropTags is NULL, then GetABNameInfo will fetch the following default property tags:</p> <ol type="1"> <li>PR_ADDRTYPE_UNICODE</li> <li>PR_EMAIL_ADDRESS_UNICODE</li> <li>PR_DISPLAY_NAME_UNICODE</li> <li>PR_OBJECT_TYPE</li> </ol> <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:<ol type="1"> <li>MAPI_E_NOT_INITIALIZED if MAPI subsystem is not initialized</li> <li>MAPI_E_SESSION_LIMIT if the NSPI session is unavailable</li> <li>MAPI_E_INVALID_PARAMETER if a function parameter is invalid</li> <li>MAPI_E_NOT_FOUND if the username to lookup doesn't match any records</li> </ol> </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#ac44db53ff1f28d242bb4f0b6e3cbc836">nspi_DNToMId</a>, <a class="el" href="proto_8h.html#ab813bb5c587840236787282f291792f4">nspi_GetProps</a> </dd></dl> <p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="property_8c.html#ab9674052880bd788820b7748cef584e5">get_SPropValue_SRowSet_data()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapidefs_8h.html#a76eb88752de458ec4dd418f274b02c5d">MAPI_RESOLVED</a>, <a class="el" href="mapidefs_8h.html#a1cb4e3df7b73c2c92cb1498e680d49de">MAPI_UNICODE</a>, <a class="el" href="IUnknown_8c.html#a52246b3bbc755db550d9d13e772dd479">MAPIFreeBuffer()</a>, <a class="el" href="structnspi__context.html#ab0ea00b8f33ae482293ececfb09379d8">nspi_context::mem_ctx</a>, <a class="el" href="structmapi__session.html#aebb5866afb67faf42642afd736740366">mapi_session::nspi</a>, <a class="el" href="nspi_8c.html#a5b0c9c5645deecbcfb4965b650d92a86">nspi_DNToMId()</a>, <a class="el" href="nspi_8c.html#a8b26051bc4c2f98753b06af449ba6e60">nspi_GetProps()</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="mapitags_8h.html#acca09ad57e82ba12e75a6689acc07210">PR_7BIT_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#ad35726974f2fbd4ee587202b6f797d31">PR_ADDRTYPE_UNICODE</a>, <a class="el" href="mapitags_8h.html#ab7d3fe498c2e4eda89459be027bbef3b">PR_DISPLAY_NAME_UNICODE</a>, <a class="el" href="mapitags_8h.html#a41478412a3693c05ca0d0bd204f7bafd">PR_DISPLAY_TYPE</a>, <a class="el" href="mapitags_8h.html#a781db3191ae7007b8158d305b80ee2af">PR_EMAIL_ADDRESS_UNICODE</a>, <a class="el" href="mapitags_8h.html#a5930bac942504b6a4e0f80089137ccf3">PR_ENTRYID</a>, <a class="el" href="mapitags_8h.html#ac11591a14cfccfa520b68c5a9d2eb062">PR_OBJECT_TYPE</a>, <a class="el" href="mapitags_8h.html#ac38862d007cc5a22c6f8abf2d1acaa96">PR_SEARCH_KEY</a>, <a class="el" href="mapitags_8h.html#a09353df3dd54a714e4b3999beee232c2">PR_SEND_INTERNET_ENCODING</a>, <a class="el" href="mapitags_8h.html#addbb6ceee6d65aa21a8204bbf1f21e00">PR_SEND_RICH_INFO</a>, <a class="el" href="mapitags_8h.html#a63eca157e115f1d786578eb9b15b2cc6">PR_SMTP_ADDRESS_UNICODE</a>, <a class="el" href="mapitags_8h.html#abc09a95bcb33e97bef21478b0a5857c8">PR_TRANSMITTABLE_DISPLAY_NAME_UNICODE</a>, <a class="el" href="structmapi__session.html#aaf43b41f2628347b7944827c49334a5a">mapi_session::profile</a>, <a class="el" href="IABContainer_8c.html#a983fbb1c5d57401c0141770b48f6e533">ResolveNames()</a>, and <a class="el" href="property_8c.html#a08d81a8e5a6ec970d5ff891e325de402">set_SPropTagArray()</a>.</p> <p>Referenced by <a class="el" href="proto_8h.html#a51ddeca55f13055917a8b43d28a5f11f">GetUserFreeBusyData()</a>.</p> </div> </div> <a class="anchor" id="a73b59ff764022e1b5116a51c6f735c3d"></a><!-- doxytag: member="IABContainer.c::GetGALTable" ref="a73b59ff764022e1b5116a51c6f735c3d" args="(struct mapi_session *session, struct SPropTagArray *SPropTagArray, struct SRowSet **SRowSet, uint32_t count, uint8_t ulFlags)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS GetGALTable </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">struct SPropTagArray * </td> <td class="paramname"> <em>SPropTagArray</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct SRowSet ** </td> <td class="paramname"> <em>SRowSet</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint8_t </td> <td class="paramname"> <em>ulFlags</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieve the global address list</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>SPropTagArray</em> </td><td>pointer on an array of MAPI properties we want to fetch </td></tr> <tr><td valign="top"></td><td valign="top"><em>SRowSet</em> </td><td>pointer on the rows returned </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>the number of rows we want to fetch </td></tr> <tr><td valign="top"></td><td valign="top"><em>ulFlags</em> </td><td>specify the table cursor location</td></tr> </table> </dd> </dl> <p>Possible value for ulFlags:</p> <ol type="1"> <li>TABLE_START: Fetch rows from the beginning of the table</li> <li>TABLE_CUR: Fetch rows from current table location</li> </ol> <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:<ol type="1"> <li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li> <li>MAPI_E_SESSION_LIMIT: No session has been opened on the provider</li> <li>MAPI_E_INVALID_PARAMETER: if a function parameter is invalid</li> <li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li> </ol> </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#af2ff4c585dd8f2ab9b3ced2a3d2771c3">MapiLogonEx</a>, <a class="el" href="proto_8h.html#a0491efca1915d6709062bcd31b26cadf">MapiLogonProvider</a> </dd></dl> <p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structnspi__context.html#ab0ea00b8f33ae482293ececfb09379d8">nspi_context::mem_ctx</a>, <a class="el" href="structmapi__session.html#aebb5866afb67faf42642afd736740366">mapi_session::nspi</a>, <a class="el" href="nspi_8c.html#a21f3016a6ca9b04ca4e5f8d7fcea2cb3">nspi_QueryRows()</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="structnspi__context.html#abcd28a9c718ececf9f5ad53e9c44fe4f">nspi_context::pStat</a>, and <a class="el" href="mapidefs_8h.html#a88ab849a6a18e4ad161b17747e4c15d0">TABLE_START</a>.</p> </div> </div> <a class="anchor" id="a983fbb1c5d57401c0141770b48f6e533"></a><!-- doxytag: member="IABContainer.c::ResolveNames" ref="a983fbb1c5d57401c0141770b48f6e533" args="(struct mapi_session *session, const char **usernames, struct SPropTagArray *props, struct SRowSet **rowset, struct SPropTagArray **flaglist, uint32_t flags)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_PUBLIC_ enum MAPISTATUS ResolveNames </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>usernames</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct SPropTagArray * </td> <td class="paramname"> <em>props</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct SRowSet ** </td> <td class="paramname"> <em>rowset</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct SPropTagArray ** </td> <td class="paramname"> <em>flaglist</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>flags</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Resolve user names against the Windows Address Book Provider</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>usernames</em> </td><td>list of user names to resolve </td></tr> <tr><td valign="top"></td><td valign="top"><em>rowset</em> </td><td>resulting list of user details </td></tr> <tr><td valign="top"></td><td valign="top"><em>props</em> </td><td>resulting list of resolved names </td></tr> <tr><td valign="top"></td><td valign="top"><em>flaglist</em> </td><td>resulting list of resolution status (see below) </td></tr> <tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>if set to MAPI_UNICODE then UNICODE MAPITAGS can be used, otherwise only UTF8 encoded fields may be returned.</td></tr> </table> </dd> </dl> <p>Possible flaglist values are:</p> <ol type="1"> <li>MAPI_UNRESOLVED: could not be resolved</li> <li>MAPI_AMBIGUOUS: resolution match more than one entry</li> <li>MAPI_RESOLVED: resolution matched a single entry</li> </ol> <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:<ol type="1"> <li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized</li> <li>MAPI_E_SESSION_LIMIT: No session has been opened on the provider</li> <li>MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate the necessary resources to operate properly</li> <li>MAPI_E_NOT_FOUND: No suitable profile database was found in the path pointed by profiledb</li> <li>MAPI_E_CALL_FAILED: A network problem was encountered during the transaction</li> </ol> </dd></dl> <p>It is the developer responsability to call MAPIFreeBuffer on rowset and flaglist once they have finished to use them.</p> <dl class="see"><dt><b>See also:</b></dt><dd>MAPILogonProvider, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl> <p>References <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="mapidefs_8h.html#a1cb4e3df7b73c2c92cb1498e680d49de">MAPI_UNICODE</a>, <a class="el" href="structnspi__context.html#ab0ea00b8f33ae482293ececfb09379d8">nspi_context::mem_ctx</a>, <a class="el" href="structmapi__session.html#aebb5866afb67faf42642afd736740366">mapi_session::nspi</a>, <a class="el" href="nspi_8c.html#abdfc028c5e330e5cb39bf562a6d9f768">nspi_ResolveNames()</a>, <a class="el" href="nspi_8c.html#a9a4002a0dcf6dd87172b5fc6dc2afdaa">nspi_ResolveNamesW()</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p> <p>Referenced by <a class="el" href="simple__mapi_8c.html#a2445fb102be62563bdd8d24025f3be2b">AddUserPermission()</a>, <a class="el" href="proto_8h.html#adfba66f98839bc597c0a09803a30ff24">GetABRecipientInfo()</a>, <a class="el" href="simple__mapi_8c.html#a9cb54788ad5b18ab5e714405a043b049">ModifyUserPermission()</a>, and <a class="el" href="simple__mapi_8c.html#a6b974921b0a3421b48933e564230d664">RemoveUserPermission()</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>