Changeset 5055 for pjproject/trunk/pjsip/include/pjsip/sip_resolve.h
- Timestamp:
- Apr 8, 2015 10:10:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_resolve.h
r3553 r5055 119 119 * response caching, query aggregation, parallel nameservers, fallback 120 120 * nameserver, etc., which will be described below. 121 * - Enable application to provide its own resolver implementation. 121 122 * 122 123 * … … 156 157 * PJSIP needs to send SIP request/response messages. 157 158 * 159 * \section PJSIP_RESOLVE_EXT_RESOLVER External Resolver 160 * 161 * As an alternative to enabling PJLIB-UTIL DNS resolver, application can 162 * provide its own resolver implementation by defining the callback in 163 * pjsip_ext_resolver and pass the callback to 164 * #pjsip_resolver_set_ext_resolver() function. Please note that if the 165 * implementation needs feature from PJLIB-UTL DNS resolver, it has to create 166 * its own PJLIB-UTL DNS resolver instance. 158 167 * 159 168 * \section PJSIP_RESOLVE_REFERENCE Reference … … 208 217 209 218 /** 219 * This structure describes application callback to receive various event from 220 * the SIP resolver engine. Application can use this for its own resolver 221 * implementation. 222 */ 223 typedef struct pjsip_ext_resolver 224 { 225 /** 226 * Notify application when the resolution should begin. 227 * 228 * @param resolver The resolver engine. 229 * @param pool The pool to allocate resolver job. 230 * @param target The target specification to be resolved. 231 * @param token A user defined token to be passed back to callback 232 * function. 233 * @param cb The callback function. 234 */ 235 void (*resolve) (pjsip_resolver_t *resolver, pj_pool_t *pool, 236 const pjsip_host_info *target, void *token, 237 pjsip_resolver_callback *cb); 238 239 } pjsip_ext_resolver; 240 241 242 /** 210 243 * Create SIP resolver engine. Note that this function is normally called 211 244 * internally by pjsip_endpoint instance. … … 237 270 pj_dns_resolver *dns_res); 238 271 272 273 /** 274 * Set the DNS external resolver implementation to use in the SIP resolver 275 * engine. Naturally when implementing its own resolver, application would not 276 * need the internal resolver, hence this function will also destroy the 277 * PJLIB-UTIL DNS resolver if any (e.g: set using 278 * #pjsip_resolver_set_resolver()). Application that needs it, still be able 279 * create its own instance. 280 * 281 * Note that application normally will use #pjsip_endpt_set_ext_resolver() 282 * instead since it does not normally have access to the SIP resolver instance. 283 * 284 * @param res The SIP resolver engine. 285 * @param ext_res The external resolver implementation callback. This argument 286 * can be NULL to reset the whole external implementation. 287 * However, it is prohibited to reset individual callback. 288 * 289 * @return PJ_SUCCESS on success, or the appropriate error code. 290 */ 291 PJ_DECL(pj_status_t) pjsip_resolver_set_ext_resolver( 292 pjsip_resolver_t *res, 293 pjsip_ext_resolver *ext_res); 239 294 240 295 /**
Note: See TracChangeset
for help on using the changeset viewer.