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 __DLG_MOD_H
00027 #define __DLG_MOD_H
00028
00029 #include "../../modules/tm/dlg.h"
00030 #include "../../lib/srdb2/db.h"
00031 #include "../../modules/tm/t_hooks.h"
00032 #include <cds/serialize.h>
00033
00034
00035
00036
00037
00038
00039
00040
00041 typedef int (*serialize_dlg_f)(sstream_t *ss, dlg_t *dlg);
00042 typedef int (*dlg2str_f)(dlg_t *dlg, str *dst_str);
00043 typedef int (*str2dlg_f)(const str *s, dlg_t *dst_dlg);
00044 typedef int (*preset_dialog_route_f)(dlg_t* dialog, str *route);
00045 typedef int (*request_outside_f)(str* method, str* headers, str* body, dlg_t* dialog, transaction_cb cb, void* cbp);
00046 typedef int (*request_inside_f)(str* method, str* headers, str* body, dlg_t* dialog, transaction_cb cb, void* cbp);
00047 typedef int (*cmp_dlg_ids_f)(dlg_id_t *a, dlg_id_t *b);
00048 typedef unsigned int (*hash_dlg_id_f)(dlg_id_t *id);
00049
00050 typedef struct {
00051
00052
00053
00054
00055
00056
00057
00058 serialize_dlg_f serialize;
00059 dlg2str_f dlg2str;
00060 str2dlg_f str2dlg;
00061 hash_dlg_id_f hash_dlg_id;
00062 cmp_dlg_ids_f cmp_dlg_ids;
00063
00064
00065 preset_dialog_route_f preset_dialog_route;
00066 request_outside_f request_outside;
00067 request_inside_f request_inside;
00068
00069 } dlg_func_t;
00070
00071 typedef int (*bind_dlg_mod_f)(dlg_func_t *dst);
00072
00073 #endif