diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-08-05 19:28:17 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-08-05 19:28:17 +0000 |
commit | c99d9cd5ab9be3bce89f84a54abbe87348529a2e (patch) | |
tree | 88dbefe829e108bc75b672b584d022959cb76081 /pjsip/include | |
parent | 0b4ecc3c596af2032c986107d7c9b8f671e277fa (diff) |
Implement ticket #551: Generic URI scheme handler (thanks Juri Glaß for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2193 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_parser.h | 1 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_uri.h | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_parser.h b/pjsip/include/pjsip/sip_parser.h index afd4c440..e9bba36d 100644 --- a/pjsip/include/pjsip/sip_parser.h +++ b/pjsip/include/pjsip/sip_parser.h @@ -358,6 +358,7 @@ typedef struct pjsip_parser_const_t pj_cis_t pjsip_NOT_COMMA_OR_NEWLINE;/**< Array elements. */ pj_cis_t pjsip_DISPLAY_SPEC; /**< Used when searching for display name. */ + pj_cis_t pjsip_OTHER_URI_CONTENT; /**< Generic URI content. */ } pjsip_parser_const_t; diff --git a/pjsip/include/pjsip/sip_uri.h b/pjsip/include/pjsip/sip_uri.h index 5f5ea7e1..a6a0f52e 100644 --- a/pjsip/include/pjsip/sip_uri.h +++ b/pjsip/include/pjsip/sip_uri.h @@ -414,7 +414,36 @@ PJ_DECL(void) pjsip_name_addr_assign(pj_pool_t *pool, pjsip_name_addr *addr, const pjsip_name_addr *rhs); +/** + * @} + */ +/** + * @defgroup PJSIP_OTHER_URI Other URI schemes + * @ingroup PJSIP_URI + * @brief Container for non SIP/tel URI scheme (e.g. "http:", "mailto:") + * @{ + */ + +/** + * Generic URI container for non SIP/tel URI scheme. + */ +typedef struct pjsip_other_uri +{ + pjsip_uri_vptr *vptr; /**< Pointer to virtual function table. */ + pj_str_t scheme; /**< The URI scheme (e.g. "mailto") */ + pj_str_t content; /**< The whole URI content */ +} pjsip_other_uri; + + +/** + * Create a generic URI object. + * + * @param pool The pool to allocate memory from. + * + * @return The URI instance. + */ +PJ_DECL(pjsip_other_uri*) pjsip_other_uri_create(pj_pool_t *pool); /** |