Changeset 3138 for pjproject/trunk/pjsip/include/pjsip/sip_transport.h
- Timestamp:
- Apr 14, 2010 6:57:35 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r3119 r3138 750 750 pjsip_tpmgr *tpmgr; /**< Transport manager. */ 751 751 pj_timer_entry idle_timer; /**< Timer when ref cnt is zero.*/ 752 753 void *data; /**< Internal transport data. */ 752 754 753 755 /** … … 1271 1273 1272 1274 /** 1275 * Definition of transport state listener key. 1276 */ 1277 typedef void pjsip_tp_state_listener_key; 1278 1279 /** 1273 1280 * Structure of transport state info passed by #pjsip_tp_state_callback. 1274 1281 */ … … 1283 1290 */ 1284 1291 void *ext_info; 1292 1293 /** 1294 * Optional user data. In global transport state notification, this will 1295 * always be NULL. 1296 */ 1297 void *user_data; 1298 1285 1299 } pjsip_transport_state_info; 1286 1300 … … 1302 1316 1303 1317 /** 1304 * Setting callback of transport state notification. The caller will be 1305 * notified whenever the state of transport is changed. The type of 1306 * events are defined in #pjsip_transport_state. 1318 * Set callback of global transport state notification. The caller will be 1319 * notified whenever the state of any transport is changed. The type of events 1320 * are defined in #pjsip_transport_state. 1321 * 1322 * Note that this function will override the existing callback, if any, so 1323 * application is recommended to keep the old callback and manually forward 1324 * the notification to the old callback, otherwise other component that 1325 * concerns about the transport state will no longer receive transport state 1326 * events. 1307 1327 * 1308 1328 * @param mgr Transport manager. 1309 1329 * @param cb Callback to be called to notify caller about transport 1310 * stat uschanging.1330 * state changing. 1311 1331 * 1312 1332 * @return PJ_SUCCESS on success, or the appropriate error code. 1313 1333 */ 1314 PJ_DECL(pj_status_t) pjsip_tpmgr_set_stat us_cb(pjsip_tpmgr *mgr,1315 1316 1317 1318 /** 1319 * Get ting the callback oftransport state notification.1334 PJ_DECL(pj_status_t) pjsip_tpmgr_set_state_cb(pjsip_tpmgr *mgr, 1335 pjsip_tp_state_callback cb); 1336 1337 1338 /** 1339 * Get the callback of global transport state notification. 1320 1340 * 1321 1341 * @param mgr Transport manager. … … 1323 1343 * @return The transport state callback or NULL if it is not set. 1324 1344 */ 1325 PJ_DECL(pjsip_tp_state_callback) pjsip_tpmgr_get_status_cb( 1326 const pjsip_tpmgr *mgr); 1345 PJ_DECL(pjsip_tp_state_callback) pjsip_tpmgr_get_state_cb( 1346 const pjsip_tpmgr *mgr); 1347 1348 1349 /** 1350 * Add a listener to the specified transport for transport state notification. 1351 * 1352 * @param tp The transport. 1353 * @param cb Callback to be called to notify listener about transport 1354 * state changing. 1355 * @param user_data The user data. 1356 * @param key Output key, used to remove this listener. 1357 * 1358 * @return PJ_SUCCESS on success, or the appropriate error code. 1359 */ 1360 PJ_DECL(pj_status_t) pjsip_transport_add_state_listener ( 1361 pjsip_transport *tp, 1362 pjsip_tp_state_callback cb, 1363 void *user_data, 1364 pjsip_tp_state_listener_key **key); 1365 1366 1367 /** 1368 * Remove a listener from the specified transport for transport state 1369 * notification. 1370 * 1371 * @param tp The transport. 1372 * @param key The listener key. 1373 * @param user_data The user data, for validation purpose. 1374 * 1375 * @return PJ_SUCCESS on success, or the appropriate error code. 1376 */ 1377 PJ_DECL(pj_status_t) pjsip_transport_remove_state_listener ( 1378 pjsip_transport *tp, 1379 pjsip_tp_state_listener_key *key, 1380 const void *user_data); 1327 1381 1328 1382
Note: See TracChangeset
for help on using the changeset viewer.