BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

pjsip_uri_vptr Struct Reference

#include <sip_uri.h>

Data Fields

const pj_str_t *(* p_get_scheme )(const void *uri)
 
void *(* p_get_uri )(void *uri)
 
pj_ssize_t(* p_print )(pjsip_uri_context_e context, const void *uri, char *buf, pj_size_t size)
 
pj_status_t(* p_compare )(pjsip_uri_context_e context, const void *uri1, const void *uri2)
 
void *(* p_clone )(pj_pool_t *pool, const void *uri)
 

Detailed Description

URI 'virtual' function table. All types of URI in this library (such as sip:, sips:, tel:, and name-addr) will have pointer to this table as their first struct member. This table provides polimorphic behaviour to the URI.

Field Documentation

◆ p_get_scheme

const pj_str_t*(* pjsip_uri_vptr::p_get_scheme) (const void *uri)

Get URI scheme.

Parameters
urithe URI (self).
Returns
the URI scheme.

◆ p_get_uri

void*(* pjsip_uri_vptr::p_get_uri) (void *uri)

Get the URI object contained by this URI, or the URI itself if it doesn't contain another URI.

Parameters
urithe URI (self).

◆ p_print

pj_ssize_t(* pjsip_uri_vptr::p_print) (pjsip_uri_context_e context, const void *uri, char *buf, pj_size_t size)

Print URI components to the buffer, following the rule of which components are allowed for the context.

Parameters
contextthe context where the URI will be placed.
urithe URI (self).
bufthe buffer.
sizethe size of the buffer.
Returns
the length printed.

◆ p_compare

pj_status_t(* pjsip_uri_vptr::p_compare) (pjsip_uri_context_e context, const void *uri1, const void *uri2)

Compare two URIs according to the context.

Parameters
contextthe context.
uri1the first URI (self).
uri2the second URI.
Returns
PJ_SUCCESS if equal, or otherwise the error status which should point to the mismatch part.

◆ p_clone

void*(* pjsip_uri_vptr::p_clone) (pj_pool_t *pool, const void *uri)

Clone URI.

Parameters
poolthe pool.
theURI to clone (self).
Returns
new URI.

The documentation for this struct was generated from the following file:

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.