1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
|
<!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 <span id="projectnumber">1.1.1</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<h1>libimobiledevice/notification_proxy.h File Reference</h1> </div>
</div>
<div class="contents">
<p>Observe and post notifications.
<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 </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"> </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> * </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"> </td><td class="mdescRight">The client handle. <a href="#ac70ac0a2cdf28fe43b181c8e8b4a900e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(* </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </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 </td><td class="memItemRight" valign="bottom"><b>NP_E_SUCCESS</b>   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 </td><td class="memItemRight" valign="bottom"><b>NP_E_INVALID_ARG</b>   -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 </td><td class="memItemRight" valign="bottom"><b>NP_E_PLIST_ERROR</b>   -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 </td><td class="memItemRight" valign="bottom"><b>NP_E_CONN_FAILED</b>   -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 </td><td class="memItemRight" valign="bottom"><b>NP_E_UNKNOWN_ERROR</b>   -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's notification_proxy.">np_post_notification()</a> (client --> 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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_WILL_START</b>   "com.apple.itunes-mobdev.syncWillStart"</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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_DID_START</b>   "com.apple.itunes-mobdev.syncDidStart"</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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_DID_FINISH</b>   "com.apple.itunes-mobdev.syncDidFinish"</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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_LOCK_REQUEST</b>   "com.apple.itunes-mobdev.syncLockRequest"</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 --> 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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_CANCEL_REQUEST</b>   "com.apple.itunes-client.syncCancelRequest"</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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_SUSPEND_REQUEST</b>   "com.apple.itunes-client.syncSuspendRequest"</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 </td><td class="memItemRight" valign="bottom"><b>NP_SYNC_RESUME_REQUEST</b>   "com.apple.itunes-client.syncResumeRequest"</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 </td><td class="memItemRight" valign="bottom"><b>NP_PHONE_NUMBER_CHANGED</b>   "com.apple.mobile.lockdown.phone_number_changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_DEVICE_NAME_CHANGED</b>   "com.apple.mobile.lockdown.device_name_changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_TIMEZONE_CHANGED</b>   "com.apple.mobile.lockdown.timezone_changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_TRUSTED_HOST_ATTACHED</b>   "com.apple.mobile.lockdown.trusted_host_attached"</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 </td><td class="memItemRight" valign="bottom"><b>NP_HOST_DETACHED</b>   "com.apple.mobile.lockdown.host_detached"</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 </td><td class="memItemRight" valign="bottom"><b>NP_HOST_ATTACHED</b>   "com.apple.mobile.lockdown.host_attached"</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 </td><td class="memItemRight" valign="bottom"><b>NP_REGISTRATION_FAILED</b>   "com.apple.mobile.lockdown.registration_failed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_ACTIVATION_STATE</b>   "com.apple.mobile.lockdown.activation_state"</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 </td><td class="memItemRight" valign="bottom"><b>NP_BRICK_STATE</b>   "com.apple.mobile.lockdown.brick_state"</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a771f707ce667d75072a191f1f4d1b32b"></a><!-- doxytag: member="include/libimobiledevice/notification_proxy.h::NP_DISK_USAGE_CHANGED" ref="a771f707ce667d75072a191f1f4d1b32b" args="" -->
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2notification__proxy_8h.html#a771f707ce667d75072a191f1f4d1b32b">NP_DISK_USAGE_CHANGED</a>   "com.apple.mobile.lockdown.disk_usage_changed"</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">iOS 4.0+ <br/></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 </td><td class="memItemRight" valign="bottom"><b>NP_DS_DOMAIN_CHANGED</b>   "com.apple.mobile.data_sync.domain_changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_BACKUP_DOMAIN_CHANGED</b>   "com.apple.mobile.backup.domain_changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_APP_INSTALLED</b>   "com.apple.mobile.application_installed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_APP_UNINSTALLED</b>   "com.apple.mobile.application_uninstalled"</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 </td><td class="memItemRight" valign="bottom"><b>NP_DEV_IMAGE_MOUNTED</b>   "com.apple.mobile.developer_image_mounted"</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 </td><td class="memItemRight" valign="bottom"><b>NP_ATTEMPTACTIVATION</b>   "com.apple.springboard.attemptactivation"</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 </td><td class="memItemRight" valign="bottom"><b>NP_ITDBPREP_DID_END</b>   "com.apple.itdbprep.notification.didEnd"</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 </td><td class="memItemRight" valign="bottom"><b>NP_LANGUAGE_CHANGED</b>   "com.apple.language.changed"</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 </td><td class="memItemRight" valign="bottom"><b>NP_ADDRESS_BOOK_PREF_CHANGED</b>   "com.apple.AddressBook.PreferenceChanged"</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Observe and post notifications. </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> </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> </td>
<td class="paramname"><em>device</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t </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> * </td>
<td class="paramname"><em>client</em> </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> </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>notification</em> </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> </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>notification_spec</em> </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> </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>notification</em> </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> </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> </td>
<td class="paramname"><em>notify_cb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>user_data</em> </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 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
|