nta  1.12.11devel
 All Data Structures Files Functions Variables Typedefs Enumerator Macros Groups Pages
nta_internal.h
1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef NTA_INTERNAL_H
26 
27 #define NTA_INTERNAL_H
28 
38 SOFIA_BEGIN_DECLS
39 
41 #define NTA_INTERNAL_MSG (1<<15)
42 
43 #include <sofia-sip/nta.h>
44 #include <sofia-sip/nta_tport.h>
46 #include <sofia-sip/tport.h>
47 #if HAVE_SOFIA_SRESOLV
48 #include <sofia-sip/sresolv.h>
49 #endif
50 
51 typedef struct nta_compressor nta_compressor_t;
52 
53 /* Virtual function table for plugging in SigComp */
54 typedef struct
55 {
56  int ncv_size;
57  char const *ncv_name;
58 
59  nta_compressor_t *(*ncv_init_agent)(nta_agent_t *sa,
60  char const * const *options);
61 
62  void (*ncv_deinit_agent)(nta_agent_t *sa, nta_compressor_t *);
63 
64  struct sigcomp_compartment *(*ncv_compartment)(nta_agent_t *sa,
65  tport_t *tport,
66  nta_compressor_t *msc,
67  tp_name_t const *tpn,
68  char const * const *options,
69  int new_if_needed);
70 
71  int (*ncv_accept_compressed)(nta_agent_t *sa,
72  nta_compressor_t *msc,
73  tport_compressor_t *sc,
74  msg_t *msg,
75  struct sigcomp_compartment *cc);
76 
77  int (*ncv_close_compressor)(nta_agent_t *sa,
78  struct sigcomp_compartment *cc);
79  int (*ncv_zap_compressor)(nta_agent_t *sa,
80  struct sigcomp_compartment *cc);
81 
82  struct sigcomp_compartment *(*ncv_compartment_ref)
83  (struct sigcomp_compartment *);
84 
85  void (*ncv_compartment_unref)(struct sigcomp_compartment *);
86 
87 } nta_compressor_vtable_t;
88 
89 SOFIAPUBVAR nta_compressor_vtable_t *nta_compressor_vtable;
90 
91 SOFIAPUBFUN nta_compressor_t *nta_agent_init_sigcomp(nta_agent_t *sa);
92 SOFIAPUBFUN void nta_agent_deinit_sigcomp(nta_agent_t *sa);
93 
94 /* ====================================================================== */
95 /* Debug log settings */
96 
97 #define SU_LOG nta_log
98 
99 #ifdef SU_DEBUG_H
100 #error <su_debug.h> included directly.
101 #endif
102 #include <sofia-sip/su_debug.h>
103 SOFIAPUBVAR su_log_t nta_log[];
104 
105 SOFIA_END_DECLS
106 
107 #endif /* NTA_INTERNAL_H */
struct nta_agent_s nta_agent_t
NTA agent.
Definition: nta.h:55
#define SOFIAPUBFUN
Transport and SigComp handling.
#define SOFIAPUBVAR
Nokia Transaction API for SIP.
NTA functions for stateless SIP processing.

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