00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef TEXTOPS_API_H_
00027 #define TEXTOPS_API_H_
00028 #include "../../str.h"
00029 #include "../../sr_module.h"
00030
00031
00032 typedef int (*append_hf_t)(struct sip_msg*, str*);
00033 typedef int (*remove_hf_t)(struct sip_msg*, str*);
00034 typedef int (*search_append_t)(struct sip_msg*, str*, str*);
00035 typedef int (*search_t)(struct sip_msg*, str*);
00036 typedef int (*is_privacy_t)(struct sip_msg*, str*);
00037
00038
00039
00040
00041 typedef struct textops_binds {
00042 append_hf_t append_hf;
00043 remove_hf_t remove_hf;
00044 search_append_t search_append;
00045 search_t search;
00046 is_privacy_t is_privacy;
00047 } textops_api_t;
00048
00049 typedef int (*bind_textops_f)(textops_api_t*);
00050
00051
00052
00053
00054 int bind_textops(textops_api_t*);
00055
00056
00057
00058
00059
00060 inline static int load_textops_api(textops_api_t *tob){
00061 bind_textops_f bind_textops_exports;
00062 if(!(bind_textops_exports=(bind_textops_f)find_export("bind_textops",0,0))){
00063 LM_ERR("Failed to import bind_textops\n");
00064 return -1;
00065 }
00066 return bind_textops_exports(tob);
00067 }
00068
00069 #endif