Sophie

Sophie

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

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/simple_mapi.c File Reference</h1>Convenience 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="simple__mapi_8c.html#2445fb102be62563bdd8d24025f3be2b">AddUserPermission</a> (mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)</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="simple__mapi_8c.html#c77ec981ccaa328f0fd1c9cdc03ae153">GetBestBody</a> (mapi_object_t *obj_message, uint8_t *format)</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="simple__mapi_8c.html#fd821395dac16d9491e8cecd9743ff95">GetDefaultFolder</a> (mapi_object_t *obj_store, uint64_t *folder, const uint32_t id)</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="simple__mapi_8c.html#7bc03d63237c2f807fe8f272a1e5c0f2">GetDefaultPublicFolder</a> (mapi_object_t *obj_store, uint64_t *folder, const uint32_t id)</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="simple__mapi_8c.html#7b3fc634875a5d59ea50a4b8f0b11074">GetFolderItemsCount</a> (mapi_object_t *obj_folder, uint32_t *unread, uint32_t *total)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">_PUBLIC_ bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="simple__mapi_8c.html#498db9fabc50af64a4c72d324a8f7a1e">IsMailboxFolder</a> (mapi_object_t *obj_store, uint64_t fid, uint32_t *olFolder)</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="simple__mapi_8c.html#9cb54788ad5b18ab5e714405a043b049">ModifyUserPermission</a> (mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)</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="simple__mapi_8c.html#6b974921b0a3421b48933e564230d664">RemoveUserPermission</a> (mapi_object_t *obj_folder, const char *username)</td></tr>

</table>
<hr><h2>Detailed Description</h2>
Convenience functions. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="2445fb102be62563bdd8d24025f3be2b"></a><!-- doxytag: member="simple_mapi.c::AddUserPermission" ref="2445fb102be62563bdd8d24025f3be2b" args="(mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS AddUserPermission           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum ACLRIGHTS&nbsp;</td>
          <td class="paramname"> <em>role</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds permissions for a user on a given folder<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_folder</em>&nbsp;</td><td>the folder we add permission for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the Exchange username we add permissions for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>role</em>&nbsp;</td><td>the permission mask value</td></tr>
  </table>
</dl>
The following permissions and rights are supported:<ul>
<li>RightsNone</li><li>RightsReadItems</li><li>RightsCreateItems</li><li>RightsEditOwn</li><li>RightsDeleteOwn</li><li>RightsEditAll</li><li>RightsDeleteAll</li><li>RightsCreateSubfolders</li><li>RightsFolderOwner</li><li>RightsFolderContact</li><li>RoleNone</li><li>RoleReviewer</li><li>RoleContributor</li><li>RoleNoneditingAuthor</li><li>RoleAuthor</li><li>RoleEditor</li><li>RolePublishAuthor</li><li>RolePublishEditor</li><li>RightsAll</li><li>RoleOwner</li></ul>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: username is NULL</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IABContainer_8c.html#983fbb1c5d57401c0141770b48f6e533">ResolveNames</a>, <a class="el" href="IMAPIContainer_8c.html#cb9fdb29dcfeb55d66053adde281c008">ModifyTable</a> </dd></dl>

<p>References <a class="el" href="mapi__object_8c_source.html#l00165">mapi_object_get_session()</a>, <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>, <a class="el" href="IMAPIContainer_8c_source.html#l00493">ModifyTable()</a>, and <a class="el" href="IABContainer_8c_source.html#l00063">ResolveNames()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c77ec981ccaa328f0fd1c9cdc03ae153"></a><!-- doxytag: member="simple_mapi.c::GetBestBody" ref="c77ec981ccaa328f0fd1c9cdc03ae153" args="(mapi_object_t *obj_message, uint8_t *format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetBestBody           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>format</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Implement the BestBody algorithm and return the best body content type for a given message.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND. If MAPI_E_NOT_FOUND is returned then format is set to 0x0 (undefined). If MAPI_E_SUCCESS is returned, then format can have one of the following values:<ul>
<li>olEditorText: format is plain text</li><li>olEditorHTML: format is HTML</li><li>olEditorRTF: format is RTF</li></ul>
</dd></dl>
<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_message</em>&nbsp;</td><td>the message we find the best body for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>the format - see above. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="IMAPIProp_8c_source.html#l00059">GetProps()</a>, and <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>.</p>

</div>
</div><p>
<a class="anchor" name="fd821395dac16d9491e8cecd9743ff95"></a><!-- doxytag: member="simple_mapi.c::GetDefaultFolder" ref="fd821395dac16d9491e8cecd9743ff95" args="(mapi_object_t *obj_store, uint64_t *folder, const uint32_t id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetDefaultFolder           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_store</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&nbsp;</td>
          <td class="paramname"> <em>folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t&nbsp;</td>
          <td class="paramname"> <em>id</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves the folder id for the specified default folder in a mailbox store<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_store</em>&nbsp;</td><td>the store to search </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>the type of folder to search for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>folder</em>&nbsp;</td><td>the resulting folder reference</td></tr>
  </table>
</dl>
The following types of folders are supported:<ul>
<li>olFolderTopInformationStore</li><li>olFolderDeletedItems</li><li>olFolderOutbox</li><li>olFolderSentMail</li><li>olFolderInbox</li><li>olFolderCommonView</li><li>olFolderCalendar</li><li>olFolderContacts</li><li>olFolderJournal</li><li>olFolderNotes</li><li>olFolderTasks</li><li>olFolderDrafts</li><li>olFolderReminders</li><li>olFolderFinder</li></ul>
<p>
Note that this function will cache FID values for common accessed folders such as calendar, contact, journal, note, task and drafts until the store object got released.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: obj_store is undefined</li><li>MAPI_E_NOT_FOUND: The specified folder could not be found or is not yet supported.</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="cdo__mapi_8c.html#cd55ca55043b2a1c025c370725f1292a">MAPIInitialize</a>, <a class="el" href="IMAPISession_8c.html#4fdd3c5db64deb2173a9bc921aee2dfd">OpenMsgStore</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="fetchappointment_8c-example.html#a5">fetchappointment.c</a>, and <a class="el" href="fetchmail_8c-example.html#a5">fetchmail.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="7bc03d63237c2f807fe8f272a1e5c0f2"></a><!-- doxytag: member="simple_mapi.c::GetDefaultPublicFolder" ref="7bc03d63237c2f807fe8f272a1e5c0f2" args="(mapi_object_t *obj_store, uint64_t *folder, const uint32_t id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetDefaultPublicFolder           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_store</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&nbsp;</td>
          <td class="paramname"> <em>folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t&nbsp;</td>
          <td class="paramname"> <em>id</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the folder id for the specified default folder in a public folder store<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_store</em>&nbsp;</td><td>the store to search </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>the type of folder to search for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>folder</em>&nbsp;</td><td>the resulting folder reference</td></tr>
  </table>
</dl>
The following types of folders are supported:<ul>
<li>olFolderPublicRoot - the parent (directly or indirectly) for the folders below</li><li>olFolderPublicIPMSubtree - Interpersonal Messages (IPM) folders</li><li>olFolderPublicNonIPMSubtree - Non-interpersonal message folders</li><li>olFolderPublicEFormsRoot - EForms Registry Root Folder</li><li>olFolderPublicFreeBusyRoot - Free/busy root folder</li><li>olFolderPublicOfflineAB - Offline address book root folder</li><li>olFolderPublicEFormsRegistry - EForms Registry for the users locale</li><li>olFolderPublicLocalFreeBusy - Site local free/busy folders</li><li>olFolderPublicLocalOfflineAB - Site local Offline address book</li><li>olFolderPublicNNTPArticle - NNTP article index folder</li></ul>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: obj_store is undefined</li><li>MAPI_E_NOT_FOUND: The specified folder could not be found or is not yet supported.</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="cdo__mapi_8c.html#cd55ca55043b2a1c025c370725f1292a">MAPIInitialize</a>, <a class="el" href="IMAPISession_8c.html#d878c431f446bd697010fab197cfe5ef">OpenPublicFolder</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>Referenced by <a class="el" href="freebusy_8c_source.html#l00057">GetUserFreeBusyData()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7b3fc634875a5d59ea50a4b8f0b11074"></a><!-- doxytag: member="simple_mapi.c::GetFolderItemsCount" ref="7b3fc634875a5d59ea50a4b8f0b11074" args="(mapi_object_t *obj_folder, uint32_t *unread, uint32_t *total)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetFolderItemsCount           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&nbsp;</td>
          <td class="paramname"> <em>unread</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&nbsp;</td>
          <td class="paramname"> <em>total</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves the total and unread number of items for a specified folder.<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_folder</em>&nbsp;</td><td>the folder to get item counts for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>unread</em>&nbsp;</td><td>the number of items in the folder (result) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>total</em>&nbsp;</td><td>the number of items in the folder, including unread items (result)</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: obj_folder is undefined</li><li>MAPI_E_NOT_FOUND: The specified folder could not be found or is not yet supported.</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="cdo__mapi_8c.html#cd55ca55043b2a1c025c370725f1292a">MAPIInitialize</a>, <a class="el" href="IMsgStore_8c.html#8b90a95da815aaed2c2728c2599007c1">OpenFolder</a>, <a class="el" href="IUnknown_8c.html#8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IMAPIProp_8c_source.html#l00059">GetProps()</a>, and <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>.</p>

</div>
</div><p>
<a class="anchor" name="498db9fabc50af64a4c72d324a8f7a1e"></a><!-- doxytag: member="simple_mapi.c::IsMailboxFolder" ref="498db9fabc50af64a4c72d324a8f7a1e" args="(mapi_object_t *obj_store, uint64_t fid, uint32_t *olFolder)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ bool IsMailboxFolder           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_store</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&nbsp;</td>
          <td class="paramname"> <em>fid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&nbsp;</td>
          <td class="paramname"> <em>olFolder</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if a given folder identifier matches with a system/default one and optionally returns the olFolder type<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_store</em>&nbsp;</td><td>pointer to the store object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fid</em>&nbsp;</td><td>reference to the folder identifier to check </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>olFolder</em>&nbsp;</td><td>pointer to the returned olFolder</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true on success, otherwise false </dd></dl>

</div>
</div><p>
<a class="anchor" name="9cb54788ad5b18ab5e714405a043b049"></a><!-- doxytag: member="simple_mapi.c::ModifyUserPermission" ref="9cb54788ad5b18ab5e714405a043b049" args="(mapi_object_t *obj_folder, const char *username, enum ACLRIGHTS role)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ModifyUserPermission           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum ACLRIGHTS&nbsp;</td>
          <td class="paramname"> <em>role</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Modify permissions for a user on a given folder<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_folder</em>&nbsp;</td><td>the folder we add permission for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the Exchange username we modify permissions for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>role</em>&nbsp;</td><td>the permission mask value (see AddUserPermission)</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: username is NULL</li><li>MAPI_E_NOT_FOUND: couldn't find or change permissions for the given user</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="simple__mapi_8c.html#2445fb102be62563bdd8d24025f3be2b">AddUserPermission</a>, <a class="el" href="IABContainer_8c.html#983fbb1c5d57401c0141770b48f6e533">ResolveNames</a>, <a class="el" href="IMAPIContainer_8c.html#a4a0b96b29406952c941ab7ac5b47132">GetTable</a>, <a class="el" href="IMAPIContainer_8c.html#cb9fdb29dcfeb55d66053adde281c008">ModifyTable</a> </dd></dl>

<p>References <a class="el" href="IMAPIContainer_8c_source.html#l00303">GetTable()</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#l00092">mapi_object_release()</a>, <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>, <a class="el" href="IMAPIContainer_8c_source.html#l00493">ModifyTable()</a>, <a class="el" href="IMAPITable_8c_source.html#l00147">QueryPosition()</a>, <a class="el" href="IMAPITable_8c_source.html#l00233">QueryRows()</a>, <a class="el" href="IABContainer_8c_source.html#l00063">ResolveNames()</a>, and <a class="el" href="IMAPITable_8c_source.html#l00051">SetColumns()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6b974921b0a3421b48933e564230d664"></a><!-- doxytag: member="simple_mapi.c::RemoveUserPermission" ref="6b974921b0a3421b48933e564230d664" args="(mapi_object_t *obj_folder, const char *username)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS RemoveUserPermission           </td>
          <td>(</td>
          <td class="paramtype">mapi_object_t *&nbsp;</td>
          <td class="paramname"> <em>obj_folder</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>username</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove permissions for a user on a given folder<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_folder</em>&nbsp;</td><td>the folder we add permission for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the Exchange username we remove permissions for</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise a failure code (MAPISTATUS) indicating the 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_INVALID_PARAMETER: username or obj_folder are NULL</li><li>MAPI_E_NOT_FOUND: couldn't find or remove permissions for the given user</li></ul>
</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="IABContainer_8c.html#983fbb1c5d57401c0141770b48f6e533">ResolveNames</a>, <a class="el" href="IMAPIContainer_8c.html#a4a0b96b29406952c941ab7ac5b47132">GetTable</a>, <a class="el" href="IMAPIContainer_8c.html#cb9fdb29dcfeb55d66053adde281c008">ModifyTable</a> </dd></dl>

<p>References <a class="el" href="IMAPIContainer_8c_source.html#l00303">GetTable()</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#l00092">mapi_object_release()</a>, <a class="el" href="IUnknown_8c_source.html#l00082">MAPIFreeBuffer()</a>, <a class="el" href="IMAPIContainer_8c_source.html#l00493">ModifyTable()</a>, <a class="el" href="IMAPITable_8c_source.html#l00147">QueryPosition()</a>, <a class="el" href="IMAPITable_8c_source.html#l00233">QueryRows()</a>, <a class="el" href="IABContainer_8c_source.html#l00063">ResolveNames()</a>, and <a class="el" href="IMAPITable_8c_source.html#l00051">SetColumns()</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>