nta 1.12.10
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef NTA_INTERNAL_H 00026 00027 #define NTA_INTERNAL_H 00028 00038 SOFIA_BEGIN_DECLS 00039 00041 #define NTA_INTERNAL_MSG (1<<15) 00042 00043 #include <sofia-sip/nta.h> 00044 #include <sofia-sip/nta_tport.h> 00045 #include <sofia-sip/nta_stateless.h> 00046 #include <sofia-sip/tport.h> 00047 #if HAVE_SOFIA_SRESOLV 00048 #include <sofia-sip/sresolv.h> 00049 #endif 00050 #include <sofia-sip/htable.h> 00051 00052 typedef struct nta_compressor nta_compressor_t; 00053 00054 /* Virtual function table for plugging in SigComp */ 00055 typedef struct 00056 { 00057 int ncv_size; 00058 char const *ncv_name; 00059 00060 nta_compressor_t *(*ncv_init_agent)(nta_agent_t *sa, 00061 char const * const *options); 00062 00063 void (*ncv_deinit_agent)(nta_agent_t *sa, nta_compressor_t *); 00064 00065 struct sigcomp_compartment *(*ncv_compartment)(nta_agent_t *sa, 00066 tport_t *tport, 00067 nta_compressor_t *msc, 00068 tp_name_t const *tpn, 00069 char const * const *options, 00070 int new_if_needed); 00071 00072 int (*ncv_accept_compressed)(nta_agent_t *sa, 00073 nta_compressor_t *msc, 00074 tport_compressor_t *sc, 00075 msg_t *msg, 00076 struct sigcomp_compartment *cc); 00077 00078 int (*ncv_close_compressor)(nta_agent_t *sa, 00079 struct sigcomp_compartment *cc); 00080 int (*ncv_zap_compressor)(nta_agent_t *sa, 00081 struct sigcomp_compartment *cc); 00082 00083 struct sigcomp_compartment *(*ncv_compartment_ref) 00084 (struct sigcomp_compartment *); 00085 00086 void (*ncv_compartment_unref)(struct sigcomp_compartment *); 00087 00088 } nta_compressor_vtable_t; 00089 00090 SOFIAPUBVAR nta_compressor_vtable_t *nta_compressor_vtable; 00091 00092 SOFIAPUBFUN nta_compressor_t *nta_agent_init_sigcomp(nta_agent_t *sa); 00093 SOFIAPUBFUN void nta_agent_deinit_sigcomp(nta_agent_t *sa); 00094 00095 /* ====================================================================== */ 00096 /* Debug log settings */ 00097 00098 #define SU_LOG nta_log 00099 00100 #ifdef SU_DEBUG_H 00101 #error <su_debug.h> included directly. 00102 #endif 00103 #include <sofia-sip/su_debug.h> 00104 SOFIAPUBVAR su_log_t nta_log[]; 00105 00106 SOFIA_END_DECLS 00107 00108 #endif /* NTA_INTERNAL_H */