00001 /* 00002 * $Id: tm_load.h 5349 2008-12-13 19:27:31Z miconda $ 00003 * 00004 * Copyright (C) 2001-2003 FhG Fokus 00005 * 00006 * This file is part of Kamailio, a free SIP server. 00007 * 00008 * Kamailio is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version 00012 * 00013 * Kamailio is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * 00023 * History: 00024 * -------- 00025 * 2003-03-06 voicemail changes accepted 00026 * 2005-05-30 light version of tm_load() - no find_export() (bogdan) 00027 * 2007-01-25 t_forward_nonack removed as it merged into t_relay, 00028 * t_replicate completely removed (bogdan) 00029 * 2008-04-04 added support for local and remote dispaly name in TM dialogs 00030 * (by Andrei Pisau <andrei.pisau at voice-system dot ro> ) 00031 * 00032 */ 00033 00034 /*! \file 00035 * \brief TM :: ?? 00036 * 00037 * \ingroup tm 00038 * - Module: \ref tm 00039 */ 00040 00041 #ifndef _TM_BIND_H 00042 #define _TM_BIND_H 00043 00044 #include "../../sr_module.h" 00045 #include "t_hooks.h" 00046 #include "uac.h" 00047 #include "t_fwd.h" 00048 #include "t_reply.h" 00049 #include "t_lookup.h" 00050 #include "t_cancel.h" 00051 #include "dlg.h" 00052 #include "h_table.h" 00053 00054 00055 struct tm_binds { 00056 register_tmcb_f register_tmcb; 00057 cmd_function t_relay; 00058 tnewtran_f t_newtran; 00059 treply_f t_reply; 00060 treply_wb_f t_reply_with_body; 00061 tislocal_f t_is_local; 00062 tget_ti_f t_get_trans_ident; 00063 tlookup_ident_f t_lookup_ident; 00064 taddblind_f t_addblind; 00065 treply_f t_reply_unsafe; 00066 reqwith_t t_request_within; 00067 reqout_t t_request_outside; 00068 req_t t_request; 00069 new_dlg_uac_f new_dlg_uac; 00070 dlg_add_extra_f dlg_add_extra; 00071 dlg_response_uac_f dlg_response_uac; 00072 new_dlg_uas_f new_dlg_uas; 00073 dlg_request_uas_f dlg_request_uas; 00074 free_dlg_f free_dlg; 00075 print_dlg_f print_dlg; 00076 tgett_f t_gett; 00077 tget_picked_f t_get_picked; 00078 tunrefcell_f unref_cell; 00079 tlookuporiginalt_f t_lookup_original_t; 00080 tuaccancel_f t_cancel_uac; 00081 setkr_f t_setkr; 00082 tget_reply_totag_f t_get_reply_totag; 00083 }; 00084 00085 00086 typedef int(*load_tm_f)( struct tm_binds *tmb ); 00087 int load_tm( struct tm_binds *tmb); 00088 00089 00090 static inline int load_tm_api( struct tm_binds *tmb ) 00091 { 00092 load_tm_f load_tm; 00093 00094 /* import the TM auto-loading function */ 00095 if ( !(load_tm=(load_tm_f)find_export("load_tm", 0, 0))) { 00096 LM_ERR("failed to import load_tm\n"); 00097 return -1; 00098 } 00099 /* let the auto-loading function load all TM stuff */ 00100 if (load_tm( tmb )==-1) 00101 return -1; 00102 00103 return 0; 00104 } 00105 00106 00107 #endif
1.5.6