Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00032 #ifndef _PRES_EV_LST_H
00033 #define _PRES_EV_LST_H
00034
00035 #include "../../parser/msg_parser.h"
00036 #include "../../parser/parse_event.h"
00037 #include "../../parser/parse_param.h"
00038 #include "../../str.h"
00039 #include "subscribe.h"
00040
00041 #define WINFO_TYPE 1<< 0
00042 #define PUBL_TYPE 1<< 1
00043
00044 struct subscription;
00045
00046 typedef int (apply_auth_t)(str* , struct subscription*, str** );
00047
00048 typedef int (publ_handling_t)(struct sip_msg*);
00049
00050 typedef int (subs_handling_t)(struct sip_msg*);
00051
00052 typedef str* (agg_nbody_t)(str* pres_user, str* pres_domain, str** body_array, int n, int off_index);
00053
00054
00055
00056
00057
00058
00059 typedef str* (aux_body_processing_t)(struct subscription *subs, str* body);
00060
00061
00062
00063
00064
00065
00066
00067
00068 typedef int (is_allowed_t)(struct subscription* subs);
00069 typedef int (get_rules_doc_t)(str* user, str* domain, str** rules_doc);
00070
00071
00072
00073
00074
00075
00076
00077 typedef void(free_body_t)(char* body);
00078
00079 struct pres_ev
00080 {
00081 str name;
00082 event_t* evp;
00083 str content_type;
00084 int default_expires;
00085 int type;
00086 int etag_not_new;
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 int req_auth;
00098 get_rules_doc_t* get_rules_doc;
00099 apply_auth_t* apply_auth_nbody;
00100 is_allowed_t* get_auth_status;
00101
00102
00103
00104
00105
00106
00107 agg_nbody_t* agg_nbody;
00108 publ_handling_t * evs_publ_handl;
00109 subs_handling_t * evs_subs_handl;
00110 free_body_t* free_body;
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 aux_body_processing_t* aux_body_processing;
00122 free_body_t* aux_free_body;
00123 struct pres_ev* wipeer;
00124 struct pres_ev* next;
00125
00126 };
00127 typedef struct pres_ev pres_ev_t;
00128
00129 typedef struct evlist
00130 {
00131 int ev_count;
00132 pres_ev_t* events;
00133 }evlist_t;
00134
00135 evlist_t* init_evlist(void);
00136
00137 int add_event(pres_ev_t* event);
00138
00139 typedef int (*add_event_t)(pres_ev_t* event);
00140
00141 void free_event_params(param_t* params, int mem_type);
00142
00143 pres_ev_t* contains_event(str* name, event_t* parsed_event);
00144
00145 typedef pres_ev_t* (*contains_event_t)(str* name, event_t* parsed_event);
00146
00147 int get_event_list(str** ev_list);
00148
00149 typedef int (*get_event_list_t) (str** ev_list);
00150
00151 void destroy_evlist(void);
00152
00153 extern evlist_t* EvList;
00154
00155 pres_ev_t* search_event(event_t* event);
00156 typedef pres_ev_t* (*search_event_t)(event_t* event);
00157
00158 event_t* shm_copy_event(event_t* e);
00159
00160 void shm_free_event(event_t* ev);
00161
00162 void free_pres_event(pres_ev_t* ev);
00163
00164
00165 #endif