Changeset 3110 for pjproject/trunk/pjsip/include/pjsip/sip_transport.h
- Timestamp:
- Feb 25, 2010 11:58:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r3106 r3110 694 694 695 695 /** 696 * Hash of host name.697 */698 pj_uint32_t hname;699 700 /**701 696 * Destination address. 702 697 */ … … 704 699 705 700 } pjsip_transport_key; 701 702 703 /** 704 * Enumeration of transport direction types. 705 */ 706 typedef enum pjsip_transport_dir 707 { 708 PJSIP_TP_DIR_NONE, /**< Direction not set, normally used by 709 connectionless transports such as 710 UDP transport. */ 711 PJSIP_TP_DIR_OUTGOING, /**< Outgoing connection or client mode, 712 this is only for connection-oriented 713 transports. */ 714 PJSIP_TP_DIR_INCOMING, /**< Incoming connection or server mode, 715 this is only for connection-oriented 716 transports. */ 717 } pjsip_transport_dir; 718 706 719 707 720 /** … … 732 745 pjsip_host_port local_name; /**< Published name (eg. STUN). */ 733 746 pjsip_host_port remote_name; /**< Remote address name. */ 747 pjsip_transport_dir dir; /**< Connection direction. */ 734 748 735 749 pjsip_endpoint *endpt; /**< Endpoint instance. */ … … 1131 1145 * 1132 1146 * This is an internal function since normally application doesn't have access 1133 * to transport manager. Application should use pjsip_endpt_acquire_transport ()1147 * to transport manager. Application should use pjsip_endpt_acquire_transport2() 1134 1148 * instead. 1135 1149 * … … 1245 1259 * Enumeration of transport state types. 1246 1260 */ 1247 typedef enum pjsip_transport_state_type { 1248 1249 /** Transport connected. */ 1250 PJSIP_TP_STATE_CONNECTED = (1 << 0), 1251 1252 /** Transport accepted. */ 1253 PJSIP_TP_STATE_ACCEPTED = (1 << 1), 1254 1255 /** Transport disconnected. */ 1256 PJSIP_TP_STATE_DISCONNECTED = (1 << 2), 1257 1258 /** Incoming connection rejected. */ 1259 PJSIP_TP_STATE_REJECTED = (1 << 3), 1260 1261 /** TLS verification error. */ 1262 PJSIP_TP_STATE_TLS_VERIF_ERROR = (1 << 8) 1263 1264 } pjsip_transport_state_type; 1265 1266 1267 /** 1268 * Structure of transport state info. 1261 typedef enum pjsip_transport_state 1262 { 1263 PJSIP_TP_STATE_CONNECTED, /**< Transport connected, applicable only 1264 to connection-oriented transports 1265 such as TCP and TLS. */ 1266 PJSIP_TP_STATE_DISCONNECTED /**< Transport disconnected, applicable 1267 only to connection-oriented 1268 transports such as TCP and TLS. */ 1269 } pjsip_transport_state; 1270 1271 1272 /** 1273 * Structure of transport state info passed by #pjsip_tp_state_callback. 1269 1274 */ 1270 1275 typedef struct pjsip_transport_state_info { … … 1273 1278 */ 1274 1279 pj_status_t status; 1275 1280 1276 1281 /** 1277 1282 * Optional extended info, the content is specific for each transport type. … … 1283 1288 /** 1284 1289 * Type of callback to receive transport state notifications, such as 1285 * transport connected, disconnected or TLS verification error. 1290 * transport connected/disconnected. Application may shutdown the transport 1291 * in this callback. 1286 1292 * 1287 1293 * @param tp The transport instance. 1288 * @param state The transport state, this may contain single or 1289 * combination of transport state types defined in 1290 * #pjsip_transport_state_type. 1294 * @param state The transport state. 1291 1295 * @param info The transport state info. 1292 * 1293 * @return When TLS verification fails and peer verification in 1294 * #pjsip_tls_setting is not set, application may return 1295 * PJ_TRUE to ignore the verification result and continue 1296 * using the transport. On other cases, this return value 1297 * is currently not used and will be ignored. 1298 */ 1299 typedef pj_bool_t (*pjsip_tp_state_callback)( 1296 */ 1297 typedef void (*pjsip_tp_state_callback)( 1300 1298 pjsip_transport *tp, 1301 pj _uint32_tstate,1299 pjsip_transport_state state, 1302 1300 const pjsip_transport_state_info *info); 1303 1301 … … 1306 1304 * Setting callback of transport state notification. The caller will be 1307 1305 * notified whenever the state of transport is changed. The type of 1308 * events are defined in #pjsip_transport_state _type.1306 * events are defined in #pjsip_transport_state. 1309 1307 * 1310 1308 * @param mgr Transport manager.
Note: See TracChangeset
for help on using the changeset viewer.