Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 1760bbde8794f5b323299b3a051b5bd6 > files > 89

openchange-devel-0.9-11.fc14.x86_64.rpm

<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&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="tabs2">
    <ul class="tablist">
      <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="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>libmapi/IProfAdmin.c File Reference</h1>  </div>
</div>
<div class="contents">

<p>MAPI Profiles interface.  
<a href="#_details">More...</a></p>
<code>#include &lt;<a class="el" href="libmapi_8h.html">libmapi/libmapi.h</a>&gt;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a8f6e0d9d7aecbdf78657eaebfa8d31d3">ChangeProfilePassword</a> (const char *profile, const char *old_password, const char *password)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a12b1fdb6b5964bd9fd24286e9595017a">CreateProfile</a> (const char *profile, const char *username, const char *password, uint32_t flag)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a46de05800a82185a48f4b4ba47f2b782">CreateProfileStore</a> (const char *profiledb, const char *ldif_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a3acba1e05a43df2b64b4a82ec2798082">DeleteProfile</a> (const char *profile)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a9a97b02cad858552d6a24c76cccd49a8">FindProfileAttr</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile, const char *attribute, const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a3e503caa812de7ec2d53f03f53ee4ca1">GetDefaultProfile</a> (char **profname)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a2fa9b75dcb9dc31e38e5ad4c3fdf63d0">GetProfileAttr</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile, const char *attribute, unsigned int *count, char ***value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a80fc75b95aea0e94972f8c780a84565b">GetProfileTable</a> (struct SRowSet *proftable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#af583325ef0be0c104f8a60b3065d5753">LoadProfile</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#aa0451fe01688a57e34d572993732aefe">mapi_profile_add_string_attr</a> (const char *profile, const char *attr, const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#ac87e45d36e8bc277517630659b568123">mapi_profile_delete_string_attr</a> (const char *profname, const char *attr, const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a84ec710b1bf13ea0378ca9e805d49ad9">mapi_profile_get_ldif_path</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#adf945a7a72431c6f603ec0cdf5eff8ee">mapi_profile_modify_string_attr</a> (const char *profname, const char *attr, const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a9f57e997c5abac3ba42a5335cf7221f0">OpenProfile</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile, const char *profname, const char *password)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a3947d9a43012d37deec3235148489f7a">OpenProfileStore</a> (TALLOC_CTX *mem_ctx, struct ldb_context **ldb_ctx, const char *profiledb)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a714fa290608519268427cfda413bb86a">ProcessNetworkProfile</a> (struct <a class="el" href="structmapi__session.html">mapi_session</a> *session, const char *username, <a class="el" href="mapi__profile_8h.html#a3934c820a0c77a09aff071e79651806d">mapi_profile_callback_t</a> callback, const void *private_data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#abd85338f723b5e7fc4bdd040fa4b774b">RenameProfile</a> (const char *old_profile, const char *profile)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a72afe789058f7e6b3be9e7fb537d5445">SetDefaultProfile</a> (const char *profname)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">_PUBLIC_ enum MAPISTATUS&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="IProfAdmin_8c.html#a6b10af8a00a2f32a9d840a3a2e9ce4db">ShutDown</a> (struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *profile)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>MAPI Profiles interface. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a8f6e0d9d7aecbdf78657eaebfa8d31d3"></a><!-- doxytag: member="IProfAdmin.c::ChangeProfilePassword" ref="a8f6e0d9d7aecbdf78657eaebfa8d31d3" args="(const char *profile, const char *old_password, const char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ChangeProfilePassword </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>old_password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Change the profile password of an existing MAPI profile</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to have its password changed </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>old_password</em>&nbsp;</td><td>the old password </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the new password</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_INVALID_PARAMETER: One of the following argument was not set: profile, old_password, password</li>
<li>MAPI_E_NOT_FOUND: The profile was not found in the database</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a494b4286cefe9e170c3f94c905c321fa">CreateProfile</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#a38910e8760dbc1c65edb66f45d3f4cbd">GetProfileAttr</a>, <a class="el" href="proto_8h.html#ada21bf3df5258c0f7febd30ed00bd4ca">ProcessNetworkProfile</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="IProfAdmin_8c.html#adf945a7a72431c6f603ec0cdf5eff8ee">mapi_profile_modify_string_attr()</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a12b1fdb6b5964bd9fd24286e9595017a"></a><!-- doxytag: member="IProfAdmin.c::CreateProfile" ref="a12b1fdb6b5964bd9fd24286e9595017a" args="(const char *profile, const char *username, const char *password, uint32_t flag)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS CreateProfile </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</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">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>flag</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a profile in the MAPI profile database</p>
<p>This function creates a profile named <em>profile</em> in the MAPI profile database and sets the specified username in that profile.</p>
<p>This function may also set the password. If the flags include OC_PROFILE_NOPASSWORD then the password will not be set. Otherwise, the specified password argument will also be saved to the profile.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the username of the profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the password for the profile (if used) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td>the union of the flags.</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. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li>
<li>MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate the necessary resources to operate properly</li>
<li>MAPI_E_NO_SUPPORT: An error was encountered while setting the MAPI profile attributes in the database.</li>
</ul>
</dd>
<dd>
profile information (including the password, if saved to the profile) is stored unencrypted.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a833c3aae4ee37b3f7d6363adbe1d92c5">DeleteProfile</a>, <a class="el" href="proto_8h.html#a248d788a78d8336e96991567ccb56df5">SetDefaultProfile</a>, <a class="el" href="proto_8h.html#a8f5951b6d64365bcbd081cee2c814990">GetDefaultProfile</a>, <a class="el" href="proto_8h.html#a0cf637dfc6304790d550efcb1208b7a2">ChangeProfilePassword</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#ada21bf3df5258c0f7febd30ed00bd4ca">ProcessNetworkProfile</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="IProfAdmin_8c.html#aa0451fe01688a57e34d572993732aefe">mapi_profile_add_string_attr()</a>, <a class="el" href="mapi__profile_8h.html#a73b07f15fd02bb4bcd6c8338d5afc391">OC_PROFILE_NOPASSWORD</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a46de05800a82185a48f4b4ba47f2b782"></a><!-- doxytag: member="IProfAdmin.c::CreateProfileStore" ref="a46de05800a82185a48f4b4ba47f2b782" args="(const char *profiledb, const char *ldif_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS CreateProfileStore </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profiledb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ldif_path</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a profile database</p>
<p>This function creates a new profile database, including doing an initial setup.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profiledb</em>&nbsp;</td><td>the absolute path to the profile database intended to be created </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ldif_path</em>&nbsp;</td><td>the absolute path to the LDIF information to use for initial setup.</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_CALL_FAILED: profiledb or ldif_path is not set</li>
<li>MAPI_E_NOT_ENOUGH_RESOURCES: ldb subsystem initialization failed</li>
<li>MAPI_E_NO_ACCESS: connection or ldif add failed</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a>, <a class="el" href="proto_8h.html#a84ec710b1bf13ea0378ca9e805d49ad9">mapi_profile_get_ldif_path</a> </dd></dl>

<p>References <a class="el" href="mapicode_8h.html#a7a4b9d7d8598946434a984fdb461eddb">OPENCHANGE_RETVAL_ERR</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a3acba1e05a43df2b64b4a82ec2798082"></a><!-- doxytag: member="IProfAdmin.c::DeleteProfile" ref="a3acba1e05a43df2b64b4a82ec2798082" args="(const char *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS DeleteProfile </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete a profile from the MAPI profile database</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to delete</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. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li>
<li>MAPI_E_NOT_FOUND: The profile was not found in the database.</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a494b4286cefe9e170c3f94c905c321fa">CreateProfile</a>, <a class="el" href="proto_8h.html#a0cf637dfc6304790d550efcb1208b7a2">ChangeProfilePassword</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#a38910e8760dbc1c65edb66f45d3f4cbd">GetProfileAttr</a>, <a class="el" href="proto_8h.html#ada21bf3df5258c0f7febd30ed00bd4ca">ProcessNetworkProfile</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a9a97b02cad858552d6a24c76cccd49a8"></a><!-- doxytag: member="IProfAdmin.c::FindProfileAttr" ref="a9a97b02cad858552d6a24c76cccd49a8" args="(struct mapi_profile *profile, const char *attribute, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS FindProfileAttr </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Search the value of an attribute within a given profile </p>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, and <a class="el" href="structmapi__profile.html#ab38537a84feaece54fb50b91623115bf">mapi_profile::profname</a>.</p>

</div>
</div>
<a class="anchor" id="a3e503caa812de7ec2d53f03f53ee4ca1"></a><!-- doxytag: member="IProfAdmin.c::GetDefaultProfile" ref="a3e503caa812de7ec2d53f03f53ee4ca1" args="(char **profname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetDefaultProfile </td>
          <td>(</td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>profname</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the default profile from the database</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the result of the function (name of the default profile)</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_NOT_FOUND: The profile was not found in the database</li>
</ul>
</dd>
<dd>
On success GetDefaultProfile profname string is allocated. It is up to the developer to free it when not needed anymore.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a248d788a78d8336e96991567ccb56df5">SetDefaultProfile</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="fetchappointment_8c-example.html#a4">fetchappointment.c</a>, <a class="el" href="fetchmail_8c-example.html#a4">fetchmail.c</a>, and <a class="el" href="mapi__sample1_8c-example.html#a4">mapi_sample1.c</a>.</dd>
</dl>
<p>References <a class="el" href="property_8c.html#a46eadf970c1d4dd029d7ff447d0b0db5">get_SPropValue_SRow()</a>, <a class="el" href="IProfAdmin_8c.html#a80fc75b95aea0e94972f8c780a84565b">GetProfileTable()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#ada2a491501fdb736ced986fec5ffedc2">mapi_ctx::mem_ctx</a>, <a class="el" href="mapicode_8h.html#a7a4b9d7d8598946434a984fdb461eddb">OPENCHANGE_RETVAL_ERR</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, <a class="el" href="mapitags_8h.html#a984638302f7204b88d5e043e9ed0d4ce">PR_DEFAULT_PROFILE</a>, and <a class="el" href="mapitags_8h.html#a449ee8cc69f5b054e2bc95f64d58322f">PR_DISPLAY_NAME</a>.</p>

</div>
</div>
<a class="anchor" id="a2fa9b75dcb9dc31e38e5ad4c3fdf63d0"></a><!-- doxytag: member="IProfAdmin.c::GetProfileAttr" ref="a2fa9b75dcb9dc31e38e5ad4c3fdf63d0" args="(struct mapi_profile *profile, const char *attribute, unsigned int *count, char ***value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetProfileAttr </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&nbsp;</td>
          <td class="paramname"> <em>value</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 attribute values from a profile</p>
<p>This function retrieves all the attribute values from the given profile. The number of results is stored in <em>count</em> and values are stored in an allocated string array in the <em>value</em> parameter that needs to be free'd using <a class="el" href="IUnknown_8c.html#a52246b3bbc755db550d9d13e772dd479">MAPIFreeBuffer()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the name of the profile to retrieve attributes from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>attribute</em>&nbsp;</td><td>the attribute(s) to search for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>the number of results </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>the resulting values</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_INVALID_PARAMETER: Either profile or attribute was not set properly</li>
<li>MAPI_E_NOT_FOUND: The profile was not found in the database</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a248d788a78d8336e96991567ccb56df5">SetDefaultProfile</a>, <a class="el" href="proto_8h.html#a8f5951b6d64365bcbd081cee2c814990">GetDefaultProfile</a>, <a class="el" href="proto_8h.html#a0a9a3df5d82fc17aacacab424a1c375d">MAPIFreeBuffer</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, and <a class="el" href="structmapi__profile.html#ab38537a84feaece54fb50b91623115bf">mapi_profile::profname</a>.</p>

</div>
</div>
<a class="anchor" id="a80fc75b95aea0e94972f8c780a84565b"></a><!-- doxytag: member="IProfAdmin.c::GetProfileTable" ref="a80fc75b95aea0e94972f8c780a84565b" args="(struct SRowSet *proftable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS GetProfileTable </td>
          <td>(</td>
          <td class="paramtype">struct SRowSet *&nbsp;</td>
          <td class="paramname"> <em>proftable</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the profile table</p>
<p>This function retrieves the profile table. Two fields are returned:</p>
<ul>
<li>PR_DISPLAY_NAME: The profile name stored as a UTF8 string</li>
<li>PR_DEFAULT_PROFILE: Whether the profile is the default one(1) or not(0), stored as an integer</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>proftable</em>&nbsp;</td><td>the result of the call</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_NOT_FOUND: The profile was not found in the database</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a248d788a78d8336e96991567ccb56df5">SetDefaultProfile</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="structmapi__ctx.html#ada2a491501fdb736ced986fec5ffedc2">mapi_ctx::mem_ctx</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a8f5951b6d64365bcbd081cee2c814990">GetDefaultProfile()</a>, and <a class="el" href="proto_8h.html#a228ea4355df5512a92fade1b13a0dbfa">RenameProfile()</a>.</p>

</div>
</div>
<a class="anchor" id="af583325ef0be0c104f8a60b3065d5753"></a><!-- doxytag: member="IProfAdmin.c::LoadProfile" ref="af583325ef0be0c104f8a60b3065d5753" args="(struct mapi_profile *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS LoadProfile </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Load a MAPI Profile and sets its credentials</p>
<p>This function loads a named MAPI profile and sets the MAPI session credentials.</p>
<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_INVALID_PARAMETER: The profile parameter is not initialized</li>
<li>MAPI_E_NOT_ENOUGH_RESOURCES: MAPI subsystem failed to allocate the necessary resources to perform the operation</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a0b0c5711d2495b29a244814fecac3813">OpenProfile</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structmapi__profile.html#a5eba7faf68184dedec3d638ae1658de4">mapi_profile::credentials</a>, <a class="el" href="structmapi__profile.html#ad5f63be5d8882b98ea6761cd536018a7">mapi_profile::domain</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="structmapi__profile.html#ad3834ec92f0fd0e06c66ef658c9a6233">mapi_profile::password</a>, <a class="el" href="structmapi__profile.html#aa481d7d229907188e2bb71580c5f726b">mapi_profile::realm</a>, <a class="el" href="structmapi__ctx.html#a50da7cefdb68d32a38e9a48997e440b5">mapi_ctx::session</a>, <a class="el" href="structmapi__profile.html#aa59e563eab407a53f80ac3841650bfc2">mapi_profile::username</a>, and <a class="el" href="structmapi__profile.html#a27f0cf97714402ebb2e09cb11f5b98aa">mapi_profile::workstation</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a0491efca1915d6709062bcd31b26cadf">MapiLogonProvider()</a>.</p>

</div>
</div>
<a class="anchor" id="aa0451fe01688a57e34d572993732aefe"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_add_string_attr" ref="aa0451fe01688a57e34d572993732aefe" args="(const char *profile, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_add_string_attr </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add an attribute to the profile </p>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a494b4286cefe9e170c3f94c905c321fa">CreateProfile()</a>, and <a class="el" href="proto_8h.html#ada21bf3df5258c0f7febd30ed00bd4ca">ProcessNetworkProfile()</a>.</p>

</div>
</div>
<a class="anchor" id="ac87e45d36e8bc277517630659b568123"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_delete_string_attr" ref="ac87e45d36e8bc277517630659b568123" args="(const char *profname, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_delete_string_attr </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete an attribute </p>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a84ec710b1bf13ea0378ca9e805d49ad9"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_get_ldif_path" ref="a84ec710b1bf13ea0378ca9e805d49ad9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ const char* mapi_profile_get_ldif_path </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get default ldif_path</p>
<p>This function returns the path for the default LDIF files.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a54ff6927c921e90e0643231f0ade628b">CreateProfileStore</a> </dd></dl>

</div>
</div>
<a class="anchor" id="adf945a7a72431c6f603ec0cdf5eff8ee"></a><!-- doxytag: member="IProfAdmin.c::mapi_profile_modify_string_attr" ref="adf945a7a72431c6f603ec0cdf5eff8ee" args="(const char *profname, const char *attr, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS mapi_profile_modify_string_attr </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>value</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 an attribute </p>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a0cf637dfc6304790d550efcb1208b7a2">ChangeProfilePassword()</a>, and <a class="el" href="proto_8h.html#a248d788a78d8336e96991567ccb56df5">SetDefaultProfile()</a>.</p>

</div>
</div>
<a class="anchor" id="a9f57e997c5abac3ba42a5335cf7221f0"></a><!-- doxytag: member="IProfAdmin.c::OpenProfile" ref="a9f57e997c5abac3ba42a5335cf7221f0" args="(struct mapi_profile *profile, const char *profname, const char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS OpenProfile </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Load a profile from the database</p>
<p>This function opens a named profile from the database, and fills the <a class="el" href="structmapi__profile.html">mapi_profile</a> structure with common profile information.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the resulting profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the name of the profile to open </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>the password to use with the profile</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_ENOUGH_RESOURCES: ldb subsystem initialization failed</li>
<li>MAPI_E_NOT_FOUND: the profile was not found in the profile database</li>
<li>MAPI_E_COLLISION: profname matched more than one entry</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#ab293406ab51b9d0f5271a930480b2eec">MAPIInitialize</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, and <a class="el" href="structmapi__ctx.html#a50da7cefdb68d32a38e9a48997e440b5">mapi_ctx::session</a>.</p>

<p>Referenced by <a class="el" href="proto_8h.html#a0491efca1915d6709062bcd31b26cadf">MapiLogonProvider()</a>.</p>

</div>
</div>
<a class="anchor" id="a3947d9a43012d37deec3235148489f7a"></a><!-- doxytag: member="IProfAdmin.c::OpenProfileStore" ref="a3947d9a43012d37deec3235148489f7a" args="(TALLOC_CTX *mem_ctx, struct ldb_context **ldb_ctx, const char *profiledb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum MAPISTATUS OpenProfileStore </td>
          <td>(</td>
          <td class="paramtype">TALLOC_CTX *&nbsp;</td>
          <td class="paramname"> <em>mem_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct ldb_context **&nbsp;</td>
          <td class="paramname"> <em>ldb_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profiledb</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Referenced by <a class="el" href="proto_8h.html#ab293406ab51b9d0f5271a930480b2eec">MAPIInitialize()</a>.</p>

</div>
</div>
<a class="anchor" id="a714fa290608519268427cfda413bb86a"></a><!-- doxytag: member="IProfAdmin.c::ProcessNetworkProfile" ref="a714fa290608519268427cfda413bb86a" args="(struct mapi_session *session, const char *username, mapi_profile_callback_t callback, const void *private_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ProcessNetworkProfile </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__session.html">mapi_session</a> *&nbsp;</td>
          <td class="paramname"> <em>session</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"><a class="el" href="mapi__profile_8h.html#a3934c820a0c77a09aff071e79651806d">mapi_profile_callback_t</a>&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const 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>Process a full and automated MAPI profile creation</p>
<p>This function process a full and automated MAPI profile creation using the <em>username</em> pattern passed as a parameter. The functions takes a callback parameter which will be called when the username checked matches several usernames. Private data needed by the callback can be supplied using the private_data pointer.</p>
<div class="fragment"><pre class="fragment">   <span class="keyword">typedef</span> int (*mapi_callback_t) callback(struct SRowSet *, <span class="keywordtype">void</span> *private_data);
</pre></div><p>The callback returns the SRow element index within the SRowSet structure. If the user cancels the operation the callback return value should be SRowSet-&gt;cRows or more.</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>&nbsp;</td><td>the session context </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>the username for the network profile </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td>function pointer callback function </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>private_data</em>&nbsp;</td><td>context data that will be provided to the callback</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:</dd></dl>
<ul>
<li>MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized. The MAPI subsystem must be initialized (using MAPIInitialize) prior to creating a profile.</li>
<li>MAPI_E_END_OF_SESSION: The NSPI session has not been initialized</li>
<li>MAPI_E_CANCEL_USER: The user has aborted the operation</li>
<li>MAPI_E_INVALID_PARAMETER: The profile parameter was not set properly.</li>
<li>MAPI_E_NOT_FOUND: One of the mandatory field was not found during the profile creation process.</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="IProfAdmin_8c.html#a3947d9a43012d37deec3235148489f7a">OpenProfileStore</a>, MAPILogonProvider, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="structnspi__context.html#a9b8c19e6ec279a5683c9ba7e0eec7f6a">nspi_context::cred</a>, <a class="el" href="structmapi__provider.html#aa2906ad67334b042836f003e766d6d64">mapi_provider::ctx</a>, <a class="el" href="property_8c.html#ac8eae815639ed2ee75fa5ffadacf2806">get_SPropValue_SRowSet()</a>, <a class="el" href="IProfAdmin_8c.html#aa0451fe01688a57e34d572993732aefe">mapi_profile_add_string_attr()</a>, <a class="el" href="IUnknown_8c.html#a52246b3bbc755db550d9d13e772dd479">MAPIFreeBuffer()</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#a7097d449dc0f177b4487a1b86d325525">nspi_GetMatches()</a>, <a class="el" href="nspi_8c.html#a8b26051bc4c2f98753b06af449ba6e60">nspi_GetProps()</a>, <a class="el" href="nspi_8c.html#a07ba7cf4ebb1af0ba1f3ab40b9feb403">nspi_GetSpecialTable()</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="nspi_8h.html#aee2888368c5f2ab01e1716052e7afbaf">ORG</a>, <a class="el" href="structnspi__context.html#a01eb798374eac9830694adbce7702df9">nspi_context::org</a>, <a class="el" href="nspi_8h.html#a4915d7ba51da88284428b118cbeda19f">ORG_UNIT</a>, <a class="el" href="structnspi__context.html#a2874c0df7d67c55e57fc40ed4d47a5ee">nspi_context::org_unit</a>, <a class="el" href="mapitags_8h.html#acb49c1ecc207489072fc74263f5de6c1">PR_ACCOUNT</a>, <a class="el" href="mapitags_8h.html#a8d58f5677ffa09f3c476247624379608">PR_ADDRTYPE</a>, <a class="el" href="mapitags_8h.html#a42ee5272d235ebf405aea8ca7a4d0938">PR_ATTACH_NUM</a>, <a class="el" href="mapitags_8h.html#a347b2ddaf835d03af2c83e31d1123359">PR_COMPANY_NAME</a>, <a class="el" href="mapitags_8h.html#a449ee8cc69f5b054e2bc95f64d58322f">PR_DISPLAY_NAME</a>, <a class="el" href="mapitags_8h.html#a41478412a3693c05ca0d0bd204f7bafd">PR_DISPLAY_TYPE</a>, <a class="el" href="mapitags_8h.html#a4c49a30b3d419314ad0a04134dfc2533">PR_EMAIL_ADDRESS</a>, <a class="el" href="mapitags_8h.html#af8343aaa24d8fedd2a3b1aae78390684">PR_EMS_AB_HOME_MDB</a>, <a class="el" href="mapitags_8h.html#a4290b67d1ad54541ed8ce288bc9dda6c">PR_EMS_AB_NETWORK_ADDRESS</a>, <a class="el" href="mapitags_8h.html#a23c114a3fd2e20713b98cddd68129c4f">PR_EMS_AB_PROXY_ADDRESSES</a>, <a class="el" href="mapitags_8h.html#a5930bac942504b6a4e0f80089137ccf3">PR_ENTRYID</a>, <a class="el" href="mapitags_8h.html#a77806349b8daa6006499cf110b4bafa5">PR_INSTANCE_KEY</a>, <a class="el" href="mapitags_8h.html#ac11591a14cfccfa520b68c5a9d2eb062">PR_OBJECT_TYPE</a>, <a class="el" href="mapitags_8h.html#a4c3fcbe19808ad3579e136f5585832c1">PR_OFFICE_LOCATION</a>, <a class="el" href="mapitags_8h.html#aaa7197e37e5b4998dee1505b1cd90920">PR_OFFICE_TELEPHONE_NUMBER</a>, <a class="el" href="mapitags_8h.html#a0ac9da3ade25968f6ebf6566f167e40e">PR_PROFILE_HOME_SERVER_ADDRS</a>, <a class="el" href="mapitags_8h.html#aa6ed82d3944957580b30951173f06d56">PR_TITLE</a>, <a class="el" href="structmapi__session.html#aaf43b41f2628347b7944827c49334a5a">mapi_session::profile</a>, <a class="el" href="structmapi__profile.html#ab38537a84feaece54fb50b91623115bf">mapi_profile::profname</a>, <a class="el" href="structnspi__context.html#abcd28a9c718ececf9f5ad53e9c44fe4f">nspi_context::pStat</a>, <a class="el" href="nspi_8h.html#ac3e7d6d190991b9d292d4158ee779506">SERVER_DN</a>, <a class="el" href="structnspi__context.html#a890ee7b6f4a6739ae6f5a8abdf82882b">nspi_context::servername</a>, <a class="el" href="property_8c.html#a08d81a8e5a6ec970d5ff891e325de402">set_SPropTagArray()</a>, <a class="el" href="proto_8h.html#add6b6308d8c7071db82453322c46df27">x500_get_dn_element()</a>, and <a class="el" href="proto_8h.html#a0b377f30570d0635135db3378e7027cb">x500_get_servername()</a>.</p>

</div>
</div>
<a class="anchor" id="abd85338f723b5e7fc4bdd040fa4b774b"></a><!-- doxytag: member="IProfAdmin.c::RenameProfile" ref="abd85338f723b5e7fc4bdd040fa4b774b" args="(const char *old_profile, const char *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS RenameProfile </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>old_profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Rename a profile</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>old_profile</em>&nbsp;</td><td>old profile name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>new profile name</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MAPI_E_SUCCESS on success, otherwise MAPI error. </dd></dl>

<p>References <a class="el" href="property_8c.html#a46eadf970c1d4dd029d7ff447d0b0db5">get_SPropValue_SRow()</a>, <a class="el" href="IProfAdmin_8c.html#a80fc75b95aea0e94972f8c780a84565b">GetProfileTable()</a>, <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="structmapi__ctx.html#ada2a491501fdb736ced986fec5ffedc2">mapi_ctx::mem_ctx</a>, <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>, and <a class="el" href="mapitags_8h.html#a449ee8cc69f5b054e2bc95f64d58322f">PR_DISPLAY_NAME</a>.</p>

</div>
</div>
<a class="anchor" id="a72afe789058f7e6b3be9e7fb537d5445"></a><!-- doxytag: member="IProfAdmin.c::SetDefaultProfile" ref="a72afe789058f7e6b3be9e7fb537d5445" args="(const char *profname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS SetDefaultProfile </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>profname</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set a default profile for the database</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profname</em>&nbsp;</td><td>the name of the profile to make the default profile</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_INVALID_PARAMETER: The profile parameter was not set properly.</li>
<li>MAPI_E_NOT_FOUND: The profile was not found in the database</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="proto_8h.html#a8f5951b6d64365bcbd081cee2c814990">GetDefaultProfile</a>, <a class="el" href="proto_8h.html#a09e5b0aa9f4c72b2cc85cc8f58a58806">GetProfileTable</a>, <a class="el" href="proto_8h.html#a8237c7fc76377cb07f3f55920d6f20de">GetLastError</a> </dd></dl>

<p>References <a class="el" href="cdo__mapi_8c.html#aa3c2b68912988f290961037c76478495">global_mapi_ctx</a>, <a class="el" href="structmapi__ctx.html#a098e6f45325983c098872f72db315bb4">mapi_ctx::ldb_ctx</a>, <a class="el" href="IProfAdmin_8c.html#adf945a7a72431c6f603ec0cdf5eff8ee">mapi_profile_modify_string_attr()</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</a>.</p>

</div>
</div>
<a class="anchor" id="a6b10af8a00a2f32a9d840a3a2e9ce4db"></a><!-- doxytag: member="IProfAdmin.c::ShutDown" ref="a6b10af8a00a2f32a9d840a3a2e9ce4db" args="(struct mapi_profile *profile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_PUBLIC_ enum MAPISTATUS ShutDown </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmapi__profile.html">mapi_profile</a> *&nbsp;</td>
          <td class="paramname"> <em>profile</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Release a profile</p>
<p>This function releases the credentials associated with the profile.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>profile</em>&nbsp;</td><td>the profile to release.</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_INVALID_PARAMETER: The profile parameter was not set or not valid </li>
</ul>
</dd></dl>

<p>References <a class="el" href="structmapi__profile.html#a5eba7faf68184dedec3d638ae1658de4">mapi_profile::credentials</a>, and <a class="el" href="mapicode_8h.html#a72f77c7e5d097e7b47c57c0405070d0c">OPENCHANGE_RETVAL_IF</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>