diff options
author | Benny Prijono <bennylp@teluu.com> | 2005-12-30 23:50:15 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2005-12-30 23:50:15 +0000 |
commit | 944562492d0c16b9e44ec4e1cc97657846d82cd0 (patch) | |
tree | 6e6c2e65e95e479384faeeaab4f525fa91cc7f27 /pjsip/include/pjsip/sip_transport.h | |
parent | 9b86a2145e18cb843e69167b10f3c7414c11c634 (diff) |
Basic module, transport, and sending messages
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@106 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_transport.h')
-rw-r--r-- | pjsip/include/pjsip/sip_transport.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h index 14175dc7..6e6ba428 100644 --- a/pjsip/include/pjsip/sip_transport.h +++ b/pjsip/include/pjsip/sip_transport.h @@ -367,16 +367,21 @@ PJ_DECL(void) pjsip_tx_data_add_ref( pjsip_tx_data *tdata ); /** * Decrement reference counter of the transmit buffer. - * When the transmit buffer is no longer used, it will be destroyed. + * When the transmit buffer is no longer used, it will be destroyed and + * caller is informed with PJSIP_EBUFDESTROYED return status. * * @param tdata The transmit buffer data. + * @return This function will always succeeded eventhough the return + * status is non-zero. A status PJSIP_EBUFDESTROYED will be + * returned to inform that buffer is destroyed. */ -PJ_DECL(void) pjsip_tx_data_dec_ref( pjsip_tx_data *tdata ); +PJ_DECL(pj_status_t) pjsip_tx_data_dec_ref( pjsip_tx_data *tdata ); /** * Check if transmit data buffer contains a valid message. * * @param tdata The transmit buffer. + * @return Non-zero (PJ_TRUE) if buffer contains a valid message. */ PJ_DECL(pj_bool_t) pjsip_tx_data_is_valid( pjsip_tx_data *tdata ); @@ -542,11 +547,14 @@ struct pjsip_tpfactory /** * Create new outbound connection. + * Note that the factory is responsible for both creating the + * transport and registering it to the transport manager. */ pj_status_t (*create_transport)(pjsip_tpfactory *factory, pjsip_tpmgr *mgr, pjsip_endpoint *endpt, const pj_sockaddr *rem_addr, + int addr_len, pjsip_transport **transport); /* @@ -621,11 +629,11 @@ PJ_DECL(void) pjsip_tpmgr_dump_transports(pjsip_tpmgr *mgr); * Find transport to be used to send message to remote destination. If no * suitable transport is found, a new one will be created. */ -PJ_DECL(pj_status_t) pjsip_tpmgr_alloc_transport( pjsip_tpmgr *mgr, - pjsip_transport_type_e type, - const pj_sockaddr_t *remote, - int addr_len, - pjsip_transport **p_transport ); +PJ_DECL(pj_status_t) pjsip_tpmgr_acquire_transport(pjsip_tpmgr *mgr, + pjsip_transport_type_e type, + const pj_sockaddr_t *remote, + int addr_len, + pjsip_transport **tp); /** |