nta  1.12.11
nta_internal.h
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 
00051 typedef struct nta_compressor nta_compressor_t;
00052 
00053 /* Virtual function table for plugging in SigComp */
00054 typedef struct
00055 {
00056   int ncv_size;
00057   char const *ncv_name;
00058 
00059   nta_compressor_t *(*ncv_init_agent)(nta_agent_t *sa,
00060                                      char const * const *options);
00061 
00062   void (*ncv_deinit_agent)(nta_agent_t *sa, nta_compressor_t *);
00063 
00064   struct sigcomp_compartment *(*ncv_compartment)(nta_agent_t *sa,
00065                                                  tport_t *tport,
00066                                                  nta_compressor_t *msc,
00067                                                  tp_name_t const *tpn,
00068                                                  char const * const *options,
00069                                                  int new_if_needed);
00070 
00071   int (*ncv_accept_compressed)(nta_agent_t *sa,
00072                                nta_compressor_t *msc,
00073                                tport_compressor_t *sc,
00074                                msg_t *msg,
00075                                struct sigcomp_compartment *cc);
00076 
00077   int (*ncv_close_compressor)(nta_agent_t *sa,
00078                               struct sigcomp_compartment *cc);
00079   int (*ncv_zap_compressor)(nta_agent_t *sa,
00080                             struct sigcomp_compartment *cc);
00081 
00082   struct sigcomp_compartment *(*ncv_compartment_ref)
00083     (struct sigcomp_compartment *);
00084 
00085   void (*ncv_compartment_unref)(struct sigcomp_compartment *);
00086 
00087 } nta_compressor_vtable_t;
00088 
00089 SOFIAPUBVAR nta_compressor_vtable_t *nta_compressor_vtable;
00090 
00091 SOFIAPUBFUN nta_compressor_t *nta_agent_init_sigcomp(nta_agent_t *sa);
00092 SOFIAPUBFUN void nta_agent_deinit_sigcomp(nta_agent_t *sa);
00093 
00094 /* ====================================================================== */
00095 /* Debug log settings */
00096 
00097 #define SU_LOG   nta_log
00098 
00099 #ifdef SU_DEBUG_H
00100 #error <su_debug.h> included directly.
00101 #endif
00102 #include <sofia-sip/su_debug.h>
00103 SOFIAPUBVAR su_log_t nta_log[];
00104 
00105 SOFIA_END_DECLS
00106 
00107 #endif /* NTA_INTERNAL_H */
 All Data Structures Files Functions Variables Typedefs Enumerator Defines

Sofia-SIP 1.12.11 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.