diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-14 16:07:49 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-14 16:07:49 +0000 |
commit | e015ebe064c6f5120ef2af2b73ce52796a06f790 (patch) | |
tree | 0b3ed8be366ec88d571195568bb2aa6002f2e18b /pjsip/include | |
parent | f5ee360b0b649ef24fe671b6e37006badce0634d (diff) |
Added pjsip_transport_register_type() API to register new transport type.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@720 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_transport.h | 24 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_types.h | 5 |
2 files changed, 28 insertions, 1 deletions
diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h index 69a9f624..ec371f0f 100644 --- a/pjsip/include/pjsip/sip_transport.h +++ b/pjsip/include/pjsip/sip_transport.h @@ -80,6 +80,30 @@ enum pjsip_transport_flags_e ((tp)->flag & PJSIP_TRANSPORT_SECURE) /** + * Register new transport type to PJSIP. The PJSIP transport framework + * contains the info for some standard transports, as declared by + * #pjsip_transport_type_e. Application may use non-standard transport + * with PJSIP, but before it does so, it must register the information + * about the new transport type to PJSIP by calling this function. + * + * @param tp_flag The flags describing characteristics of this + * transport type. + * @param tp_name Transport type name. + * @param def_port Default port to be used for the transport. + * @param p_tp_type On successful registration, it will be filled with + * the registered type. This argument is optional. + * + * @return PJ_SUCCESS if registration is successful, or + * PJSIP_ETYPEEXISTS if the same transport type has + * already been registered. + */ +PJ_DECL(pj_status_t) pjsip_transport_register_type(unsigned tp_flag, + const char *tp_name, + int def_port, + int *p_tp_type); + + +/** * Get the transport type from the transport name. * * @param name Transport name, such as "TCP", or "UDP". diff --git a/pjsip/include/pjsip/sip_types.h b/pjsip/include/pjsip/sip_types.h index d50fdba0..38525453 100644 --- a/pjsip/include/pjsip/sip_types.h +++ b/pjsip/include/pjsip/sip_types.h @@ -79,7 +79,10 @@ typedef enum pjsip_transport_type_e PJSIP_TRANSPORT_LOOP, /** Loopback (datagram, unreliable) */ - PJSIP_TRANSPORT_LOOP_DGRAM + PJSIP_TRANSPORT_LOOP_DGRAM, + + /** Start of user defined transport */ + PJSIP_TRANSPORT_START_OTHER } pjsip_transport_type_e; |