sl_cb.h
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
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef SL_CB_H_
00036 #define SL_CB_H_
00037
00038 #include "../../str.h"
00039 #include "../../ip_addr.h"
00040 #include "../../parser/msg_parser.h"
00041
00042
00043 struct sl_cb_param {
00044 str *buffer;
00045 int code;
00046 str *reason;
00047 union sockaddr_union *dst;
00048 void *param;
00049 };
00050
00051
00052 typedef void (sl_cb_t) (unsigned int types, struct sip_msg* req,
00053 struct sl_cb_param *sl_param);
00054
00055 typedef int (*register_slcb_t)(unsigned int types, sl_cb_t f, void *param);
00056
00057
00058
00059
00060 struct sl_callback {
00061 int id;
00062 unsigned int types;
00063 sl_cb_t* callback;
00064 void* param;
00065 struct sl_callback* next;
00066 };
00067
00068
00069 #define SLCB_REPLY_OUT (1<<0)
00070 #define SLCB_ACK_IN (1<<1)
00071
00072
00073 void destroy_slcb_lists(void);
00074
00075
00076
00077 int register_slcb(unsigned int types, sl_cb_t f, void *param );
00078
00079
00080 void run_sl_callbacks( unsigned int types, struct sip_msg *req, str *buffer,
00081 int code, str *reason, union sockaddr_union *to);
00082
00083
00084 #endif
00085
00086