qos_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 #ifndef _QOS_QOS_CB_H_
00029 #define _QOS_QOS_CB_H_
00030
00031 #include "../../parser/msg_parser.h"
00032
00033 struct qos_ctx_st;
00034
00035 struct qos_cb_params {
00036 struct sip_msg *msg;
00037 struct qos_sdp_st *sdp;
00038 unsigned int role;
00039 void **param;
00040 };
00041
00042
00043 typedef void (qos_cb) (struct qos_ctx_st *qos, int type,
00044 struct qos_cb_params *params);
00045
00046 typedef int (*register_qoscb_f)(struct qos_ctx_st *qos, int cb_types,
00047 qos_cb f, void *param);
00048
00049
00050 #define QOSCB_CREATED (1<<0)
00051 #define QOSCB_ADD_SDP (1<<1)
00052 #define QOSCB_UPDATE_SDP (1<<2)
00053 #define QOSCB_REMOVE_SDP (1<<3)
00054 #define QOSCB_TERMINATED (1<<4)
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 struct qos_callback {
00078 int types;
00079 qos_cb* callback;
00080 void *param;
00081 struct qos_callback* next;
00082 };
00083
00084
00085 struct qos_head_cbl {
00086 struct qos_callback *first;
00087 int types;
00088 };
00089
00090 int init_qos_callbacks();
00091
00092 void destroy_qos_callbacks();
00093
00094 void destroy_qos_callbacks_list(struct qos_callback *cb);
00095
00096 int register_qoscb(struct qos_ctx_st* qos, int types, qos_cb f, void *param);
00097
00098 void run_create_cbs(struct qos_ctx_st *qos, struct sip_msg *msg);
00099
00100 void run_qos_callbacks( int type, struct qos_ctx_st *qos,
00101 struct qos_sdp_st *sdp, unsigned int role,
00102 struct sip_msg *msg);
00103
00104
00105 #endif