00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SIPUTILS_H_
00025 #define _SIPUTILS_H_
00026
00027 typedef int (*siputils_has_totag_t)(struct sip_msg*, char*, char*);
00028 typedef int (*siputils_is_uri_user_e164_t)(str*);
00029
00031 typedef struct siputils_api {
00032 int_str rpid_avp;
00033 int rpid_avp_type;
00034 siputils_has_totag_t has_totag;
00035 siputils_is_uri_user_e164_t is_uri_user_e164;
00036 } siputils_api_t;
00037
00038 typedef int (*bind_siputils_t)(siputils_api_t* api);
00039
00045 int bind_siputils(siputils_api_t* api);
00046
00047 inline static int siputils_load_api(siputils_api_t *pxb)
00048 {
00049 bind_siputils_t bind_siputils_exports;
00050 if (!(bind_siputils_exports = (bind_siputils_t)find_export("bind_siputils", 1, 0)))
00051 {
00052 LM_ERR("Failed to import bind_siputils\n");
00053 return -1;
00054 }
00055 return bind_siputils_exports(pxb);
00056 }
00057
00058 #endif