16 #include <sys/types.h>
22 #define DEBUG_BUFFER_SIZE 4096
23 extern void dbg_print(
const int* which,
int how, FILE* where,
24 const char* fmt, ... ) G_GNUC_PRINTF(4, 5);
30 #define SCS_SMALL_SIZE 16
31 #define SCS_MEDIUM_SIZE 256
32 #define SCS_LARGE_SIZE 4096
33 #define SCS_HUGE_SIZE 65536
35 extern char* scs_subscribe(SCS_collection* collection,
const char* s);
36 extern void scs_unsubscribe(SCS_collection* collection,
char* s);
37 extern char* scs_subscribe_printf(SCS_collection* collection,
char* fmt, ...)
43 #define AVP_OP_EQUAL '='
44 #define AVP_OP_NOTEQUAL '!'
45 #define AVP_OP_STARTS '^'
46 #define AVP_OP_ENDS '$'
47 #define AVP_OP_CONTAINS '~'
48 #define AVP_OP_LOWER '<'
49 #define AVP_OP_HIGHER '>'
50 #define AVP_OP_EXISTS '?'
51 #define AVP_OP_ONEOFF '|'
52 #define AVP_OP_TRANSF '&'
79 typedef enum _avpl_match_mode {
86 typedef enum _avpl_replace_mode {
100 avpl_match_mode match_mode;
101 avpl_replace_mode replace_mode;
124 extern void avp_init(
void);
127 #ifdef _AVP_DEBUGGING
128 extern void setup_avp_debug(FILE* fp,
int* general,
int* avp,
int* avp_op,
int* avpl,
int* avpl_op);
136 extern AVP* new_avp(
const char* name,
const char* value,
char op);
139 extern AVP* avp_copy(
AVP* from);
142 extern AVP* new_avp_from_finfo(
const char* name,
field_info* finfo);
147 extern void delete_avp(
AVP* avp);
153 #define avp_to_str(avp) (ws_strdup_printf("%s%c%s",avp->n,avp->o,avp->v))
156 extern AVP* match_avp(
AVP* src,
AVP* op);
164 extern AVPL* new_avpl(
const char* name);
168 extern AVPL* new_avpl_from_avpl(
const char* name,
AVPL* avpl,
bool copy_avps);
170 extern AVPL* new_avpl_loose_match(
const char* name,
AVPL* src,
AVPL* op,
bool copy_avps);
172 extern AVPL* new_avpl_pairs_match(
const char* name,
AVPL* src,
AVPL* op,
bool strict,
bool copy_avps);
175 extern AVPL* new_avpl_from_match(avpl_match_mode mode,
const char* name,
AVPL* src,
AVPL* op,
bool copy_avps);
183 extern bool insert_avp(
AVPL* avpl,
AVP* avp);
186 extern void rename_avpl(
AVPL* avpl,
char* name);
189 extern void merge_avpl(
AVPL* dest,
AVPL* src,
bool copy);
193 extern AVP* get_avp_by_name(
AVPL* avpl,
char* name,
void** cookie);
196 extern AVP* get_next_avp(
AVPL* avpl,
void** cookie);
199 extern AVP* extract_first_avp(
AVPL* avpl);
202 extern AVP* extract_last_avp(
AVPL* avpl);
206 extern AVP* extract_avp_by_name(
AVPL* avpl,
char* name);
209 extern char* avpl_to_str(
AVPL* avpl);
210 extern char* avpl_to_dotstr(
AVPL*);
213 extern void delete_avpl(
AVPL* avpl,
bool avps_too);
218 extern void delete_avpl_transform(
AVPL_Transf* it);
227 extern LoAL* new_loal(
const char* name);
231 extern LoAL* loal_from_file(
char* filename);
234 extern void loal_append(
LoAL* loal,
AVPL* avpl);
237 extern AVPL* extract_first_avpl(
LoAL* loal);
240 extern AVPL* extract_last_avpl(
LoAL* loal);
243 extern AVPL* get_next_avpl(
LoAL* loal,
void** cookie);
246 extern void delete_loal(
LoAL* loal,
bool avpls_too,
bool avps_too);
Definition: mate_util.h:70
Definition: mate_util.h:63
Definition: mate_util.h:56
Definition: mate_util.h:94
Definition: mate_util.h:108
Definition: mate_util.h:116
Definition: mate_util.c:69