Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > ecb1fc03d151e18f121aacdd5ee9288b > files > 40

libimobiledevice-devel-1.0.6-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libimobiledevice: libimobiledevice/notification_proxy.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libimobiledevice&#160;<span id="projectnumber">1.0.6</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;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="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>libimobiledevice/notification_proxy.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Implementation to talk to the notification proxy on a device.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents an error code.  <a href="#ae170d3ff86bea63ae14b1272aae9182f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structnp__client__private.html">np_client_private</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ac70ac0a2cdf28fe43b181c8e8b4a900e">np_client_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The client handle.  <a href="#ac70ac0a2cdf28fe43b181c8e8b4a900e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a95bcfe5738db77644c890df3045a9127">np_notify_cb_t</a> )(const char *notification, void *user_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports which notification was received.  <a href="#a95bcfe5738db77644c890df3045a9127"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a7edfe609487806001964e0b2dae9000c">np_client_new</a> (<a class="el" href="structidevice__private.html">idevice_t</a> device, uint16_t port, <a class="el" href="structnp__client__private.html">np_client_t</a> *client)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to the notification_proxy on the specified device.  <a href="#a7edfe609487806001964e0b2dae9000c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a3b826727555eee0c2b89b35043b3a5ad">np_client_free</a> (<a class="el" href="structnp__client__private.html">np_client_t</a> client)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects a notification_proxy client from the device and frees up the notification_proxy client data.  <a href="#a3b826727555eee0c2b89b35043b3a5ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#aaf9e13148414a15028ce3cc2f35c9d5c">np_post_notification</a> (<a class="el" href="structnp__client__private.html">np_client_t</a> client, const char *notification)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a notification to the device's notification_proxy.  <a href="#aaf9e13148414a15028ce3cc2f35c9d5c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a6965819188aea0c0053d4d48c489254c">np_observe_notification</a> (<a class="el" href="structnp__client__private.html">np_client_t</a> client, const char *notification)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells the device to send a notification on the specified event.  <a href="#a6965819188aea0c0053d4d48c489254c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ab36d06352c3a171965a62efbd884b9c3">np_observe_notifications</a> (<a class="el" href="structnp__client__private.html">np_client_t</a> client, const char **notification_spec)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells the device to send a notification on specified events.  <a href="#ab36d06352c3a171965a62efbd884b9c3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a7e71481884faa8e6c8893c93c3ad3862">np_set_notify_callback</a> (<a class="el" href="structnp__client__private.html">np_client_t</a> client, <a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a95bcfe5738db77644c890df3045a9127">np_notify_cb_t</a> notify_cb, void *userdata)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function allows an application to define a callback function that will be called when a notification has been received.  <a href="#a7e71481884faa8e6c8893c93c3ad3862"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Error Codes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1255f5b047fb283a0e31fa2379a50ee6"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_E_SUCCESS" ref="a1255f5b047fb283a0e31fa2379a50ee6" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_E_SUCCESS</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31be33d6b73dec165f3689cb2bca5ed2"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_E_INVALID_ARG" ref="a31be33d6b73dec165f3689cb2bca5ed2" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_E_INVALID_ARG</b>&#160;&#160;&#160;-1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a848ae24792a3a7a62844b51d47f68d"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_E_PLIST_ERROR" ref="a3a848ae24792a3a7a62844b51d47f68d" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_E_PLIST_ERROR</b>&#160;&#160;&#160;-2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a19c2d820454cf3f1af36e6a5b3e78b"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_E_CONN_FAILED" ref="a4a19c2d820454cf3f1af36e6a5b3e78b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_E_CONN_FAILED</b>&#160;&#160;&#160;-3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc30648088cf4110e7cb4ea190f1179e"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_E_UNKNOWN_ERROR" ref="abc30648088cf4110e7cb4ea190f1179e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_E_UNKNOWN_ERROR</b>&#160;&#160;&#160;-256</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Notifications that can be send</h2></td></tr>
<tr><td colspan="2"><a class="anchor" id="amgrpf1f7a62e53dd62addbf606b97f910799"></a>For use with <a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#aaf9e13148414a15028ce3cc2f35c9d5c" title="Sends a notification to the device&#39;s notification_proxy.">np_post_notification()</a> (client --&gt; device) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9db1a941472487f4d58d5a054058fcbe"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_WILL_START" ref="a9db1a941472487f4d58d5a054058fcbe" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_WILL_START</b>&#160;&#160;&#160;&quot;com.apple.itunes-mobdev.syncWillStart&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3023cbece42b5c27d3fd19bf56ce52a"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_DID_START" ref="ad3023cbece42b5c27d3fd19bf56ce52a" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_DID_START</b>&#160;&#160;&#160;&quot;com.apple.itunes-mobdev.syncDidStart&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae14ab9de0ea68ec4820d7d2521af05a5"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_DID_FINISH" ref="ae14ab9de0ea68ec4820d7d2521af05a5" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_DID_FINISH</b>&#160;&#160;&#160;&quot;com.apple.itunes-mobdev.syncDidFinish&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9bbd7a8f148d35b81f6436f1df89344"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_LOCK_REQUEST" ref="ae9bbd7a8f148d35b81f6436f1df89344" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_LOCK_REQUEST</b>&#160;&#160;&#160;&quot;com.apple.itunes-mobdev.syncLockRequest&quot;</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Notifications that can be received</h2></td></tr>
<tr><td colspan="2"><a class="anchor" id="amgrpb0930d960d0e39b68aa7240c2eb492d7"></a>For use with <a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a6965819188aea0c0053d4d48c489254c" title="Tells the device to send a notification on the specified event.">np_observe_notification()</a> (device --&gt; client) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a829c5ba5c8192b86b049822d4c512a49"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_CANCEL_REQUEST" ref="a829c5ba5c8192b86b049822d4c512a49" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_CANCEL_REQUEST</b>&#160;&#160;&#160;&quot;com.apple.itunes-client.syncCancelRequest&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8fa51f1a0aacc0fb5e62cb33ef4cae72"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_SUSPEND_REQUEST" ref="a8fa51f1a0aacc0fb5e62cb33ef4cae72" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_SUSPEND_REQUEST</b>&#160;&#160;&#160;&quot;com.apple.itunes-client.syncSuspendRequest&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91ec1bb5a80ed75b2b64c305ff9279b7"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_SYNC_RESUME_REQUEST" ref="a91ec1bb5a80ed75b2b64c305ff9279b7" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_SYNC_RESUME_REQUEST</b>&#160;&#160;&#160;&quot;com.apple.itunes-client.syncResumeRequest&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cc4d7d01ee5cfd35fb16bfe5bbf7a9c"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_PHONE_NUMBER_CHANGED" ref="a2cc4d7d01ee5cfd35fb16bfe5bbf7a9c" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_PHONE_NUMBER_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.phone_number_changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2ddd08f7b570624d2d06d4010c783a0"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_DEVICE_NAME_CHANGED" ref="ad2ddd08f7b570624d2d06d4010c783a0" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_DEVICE_NAME_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.device_name_changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00712d5ef259dd2ae9a3c3fc75202e89"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_TIMEZONE_CHANGED" ref="a00712d5ef259dd2ae9a3c3fc75202e89" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_TIMEZONE_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.timezone_changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a878e7e86e0d90ec4d5d79c8c15053ae3"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_TRUSTED_HOST_ATTACHED" ref="a878e7e86e0d90ec4d5d79c8c15053ae3" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_TRUSTED_HOST_ATTACHED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.trusted_host_attached&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2e7e081bc0cdaadb97973aea46498fc"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_HOST_DETACHED" ref="ab2e7e081bc0cdaadb97973aea46498fc" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_HOST_DETACHED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.host_detached&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4689021a0d94b61c78fe72cb31df195"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_HOST_ATTACHED" ref="ab4689021a0d94b61c78fe72cb31df195" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_HOST_ATTACHED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.host_attached&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a349161233cff5ade293fb0574d9c1ba2"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_REGISTRATION_FAILED" ref="a349161233cff5ade293fb0574d9c1ba2" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_REGISTRATION_FAILED</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.registration_failed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fae14b7cf3678cd1b56194daba58058"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_ACTIVATION_STATE" ref="a2fae14b7cf3678cd1b56194daba58058" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_ACTIVATION_STATE</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.activation_state&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30ec5e2a07ae42673ea3abac2d72cb0a"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_BRICK_STATE" ref="a30ec5e2a07ae42673ea3abac2d72cb0a" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_BRICK_STATE</b>&#160;&#160;&#160;&quot;com.apple.mobile.lockdown.brick_state&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a974e97517ebccf59e43cf7ace19447a6"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_DS_DOMAIN_CHANGED" ref="a974e97517ebccf59e43cf7ace19447a6" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_DS_DOMAIN_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.mobile.data_sync.domain_changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66bc93162ae3ab3a387bd2acd69534d1"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_BACKUP_DOMAIN_CHANGED" ref="a66bc93162ae3ab3a387bd2acd69534d1" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_BACKUP_DOMAIN_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.mobile.backup.domain_changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f22396a2180b67b0a3c2c98d65714fd"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_APP_INSTALLED" ref="a8f22396a2180b67b0a3c2c98d65714fd" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_APP_INSTALLED</b>&#160;&#160;&#160;&quot;com.apple.mobile.application_installed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb18083b1e8c2513c4c0f68f3d89cb01"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_APP_UNINSTALLED" ref="adb18083b1e8c2513c4c0f68f3d89cb01" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_APP_UNINSTALLED</b>&#160;&#160;&#160;&quot;com.apple.mobile.application_uninstalled&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3fc34c861c328f038c1c2cac40132f41"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_DEV_IMAGE_MOUNTED" ref="a3fc34c861c328f038c1c2cac40132f41" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_DEV_IMAGE_MOUNTED</b>&#160;&#160;&#160;&quot;com.apple.mobile.developer_image_mounted&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67ab24b9735b9736484af892b09338c3"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_ATTEMPTACTIVATION" ref="a67ab24b9735b9736484af892b09338c3" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_ATTEMPTACTIVATION</b>&#160;&#160;&#160;&quot;com.apple.springboard.attemptactivation&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9744cc75dc13ba773cbaf7b772aaed2"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_ITDBPREP_DID_END" ref="ab9744cc75dc13ba773cbaf7b772aaed2" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_ITDBPREP_DID_END</b>&#160;&#160;&#160;&quot;com.apple.itdbprep.notification.didEnd&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05be23ad6706c8af38ad90d7582fd3f3"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_LANGUAGE_CHANGED" ref="a05be23ad6706c8af38ad90d7582fd3f3" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_LANGUAGE_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.language.changed&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2674ab39218a0f506660f8fc0cf9ae1c"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_ADDRESS_BOOK_PREF_CHANGED" ref="a2674ab39218a0f506660f8fc0cf9ae1c" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NP_ADDRESS_BOOK_PREF_CHANGED</b>&#160;&#160;&#160;&quot;com.apple.AddressBook.PreferenceChanged&quot;</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Implementation to talk to the notification proxy on a device. </p>
</div><hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ac70ac0a2cdf28fe43b181c8e8b4a900e"></a><!-- doxytag: member="notification_proxy.h::np_client_t" ref="ac70ac0a2cdf28fe43b181c8e8b4a900e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structnp__client__private.html">np_client_private</a>* <a class="el" href="structnp__client__private.html">np_client_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The client handle. </p>

</div>
</div>
<a class="anchor" id="ae170d3ff86bea63ae14b1272aae9182f"></a><!-- doxytag: member="notification_proxy.h::np_error_t" ref="ae170d3ff86bea63ae14b1272aae9182f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int16_t <a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Represents an error code. </p>

</div>
</div>
<a class="anchor" id="a95bcfe5738db77644c890df3045a9127"></a><!-- doxytag: member="notification_proxy.h::np_notify_cb_t" ref="a95bcfe5738db77644c890df3045a9127" args=")(const char *notification, void *user_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a95bcfe5738db77644c890df3045a9127">np_notify_cb_t</a>)(const char *notification, void *user_data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reports which notification was received. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3b826727555eee0c2b89b35043b3a5ad"></a><!-- doxytag: member="notification_proxy.h::np_client_free" ref="a3b826727555eee0c2b89b35043b3a5ad" args="(np_client_t client)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_client_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disconnects a notification_proxy client from the device and frees up the notification_proxy client data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The notification_proxy client to disconnect and free.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS on success, or NP_E_INVALID_ARG when client is NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a7edfe609487806001964e0b2dae9000c"></a><!-- doxytag: member="notification_proxy.h::np_client_new" ref="a7edfe609487806001964e0b2dae9000c" args="(idevice_t device, uint16_t port, np_client_t *client)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_client_new </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structidevice__private.html">idevice_t</a>&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a> *&#160;</td>
          <td class="paramname"><em>client</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connects to the notification_proxy on the specified device. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>The device to connect to. </td></tr>
    <tr><td class="paramname">port</td><td>Destination port (usually given by lockdownd_start_service). </td></tr>
    <tr><td class="paramname">client</td><td>Pointer that will be set to a newly allocated np_client_t upon successful return.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS on success, NP_E_INVALID_ARG when device is NULL, or NP_E_CONN_FAILED when the connection to the device could not be established. </dd></dl>

</div>
</div>
<a class="anchor" id="a6965819188aea0c0053d4d48c489254c"></a><!-- doxytag: member="notification_proxy.h::np_observe_notification" ref="a6965819188aea0c0053d4d48c489254c" args="(np_client_t client, const char *notification)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_observe_notification </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>notification</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells the device to send a notification on the specified event. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The client to send to </td></tr>
    <tr><td class="paramname">notification</td><td>The notifications that should be observed.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS on success, NP_E_INVALID_ARG when client or notification are NULL, or an error returned by np_plist_send. </dd></dl>

</div>
</div>
<a class="anchor" id="ab36d06352c3a171965a62efbd884b9c3"></a><!-- doxytag: member="notification_proxy.h::np_observe_notifications" ref="ab36d06352c3a171965a62efbd884b9c3" args="(np_client_t client, const char **notification_spec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_observe_notifications </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>notification_spec</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells the device to send a notification on specified events. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The client to send to </td></tr>
    <tr><td class="paramname">notification_spec</td><td>Specification of the notifications that should be observed. This is expected to be an array of const char* that MUST have a terminating NULL entry.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null, or an error returned by np_observe_notification. </dd></dl>

</div>
</div>
<a class="anchor" id="aaf9e13148414a15028ce3cc2f35c9d5c"></a><!-- doxytag: member="notification_proxy.h::np_post_notification" ref="aaf9e13148414a15028ce3cc2f35c9d5c" args="(np_client_t client, const char *notification)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_post_notification </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>notification</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sends a notification to the device's notification_proxy. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The client to send to </td></tr>
    <tr><td class="paramname">notification</td><td>The notification message to send</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS on success, or an error returned by np_plist_send </dd></dl>

</div>
</div>
<a class="anchor" id="a7e71481884faa8e6c8893c93c3ad3862"></a><!-- doxytag: member="notification_proxy.h::np_set_notify_callback" ref="a7e71481884faa8e6c8893c93c3ad3862" args="(np_client_t client, np_notify_cb_t notify_cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#ae170d3ff86bea63ae14b1272aae9182f">np_error_t</a> np_set_notify_callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnp__client__private.html">np_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a95bcfe5738db77644c890df3045a9127">np_notify_cb_t</a>&#160;</td>
          <td class="paramname"><em>notify_cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function allows an application to define a callback function that will be called when a notification has been received. </p>
<p>It will start a thread that polls for notifications and calls the callback function if a notification has been received.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>the NP client </td></tr>
    <tr><td class="paramname">notify_cb</td><td>pointer to a callback function or NULL to de-register a previously set callback function. </td></tr>
    <tr><td class="paramname">user_data</td><td>Pointer that will be passed to the callback function as user data. If notify_cb is NULL, this parameter is ignored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Only one callback function can be registered at the same time; any previously set callback function will be removed automatically.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NP_E_SUCCESS when the callback was successfully registered, NP_E_INVALID_ARG when client is NULL, or NP_E_UNKNOWN_ERROR when the callback thread could no be created. </dd></dl>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>