~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjsip/include/pjsip/sip_types.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: sip_types.h 3553 2011-05-05 06:14:19Z nanang $ */
2
 
/*
3
 
 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
 
 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; either version 2 of the License, or
9
 
 * (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 * GNU General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 
 */
20
 
#ifndef __PJSIP_SIP_TYPES_H__
21
 
#define __PJSIP_SIP_TYPES_H__
22
 
 
23
 
 
24
 
/*
25
 
 * My note: Doxygen PJSIP and PJSIP_CORE group is declared in
26
 
 *          sip_config.h
27
 
 */
28
 
 
29
 
/**
30
 
 * @file sip_types.h
31
 
 * @brief Basic PJSIP types.
32
 
 */
33
 
 
34
 
#include <pjsip/sip_config.h>
35
 
#include <pj/types.h>
36
 
 
37
 
/**
38
 
 * @addtogroup PJSIP_BASE
39
 
 */
40
 
 
41
 
/* @defgroup PJSIP_TYPES Basic Data Types
42
 
 * @ingroup PJSIP_BASE
43
 
 * @brief Basic data types.
44
 
 * @{
45
 
 */
46
 
 
47
 
 
48
 
 
49
 
/**
50
 
 * Forward declaration for SIP transport.
51
 
 */
52
 
typedef struct pjsip_transport pjsip_transport;
53
 
 
54
 
/**
55
 
 * Forward declaration for transport manager.
56
 
 */
57
 
typedef struct pjsip_tpmgr pjsip_tpmgr;
58
 
 
59
 
/**
60
 
 * Transport types.
61
 
 */
62
 
typedef enum pjsip_transport_type_e
63
 
{
64
 
    /** Unspecified. */
65
 
    PJSIP_TRANSPORT_UNSPECIFIED,
66
 
 
67
 
    /** UDP. */
68
 
    PJSIP_TRANSPORT_UDP,
69
 
 
70
 
    /** TCP. */
71
 
    PJSIP_TRANSPORT_TCP,
72
 
 
73
 
    /** TLS. */
74
 
    PJSIP_TRANSPORT_TLS,
75
 
 
76
 
    /** SCTP. */
77
 
    PJSIP_TRANSPORT_SCTP,
78
 
 
79
 
    /** Loopback (stream, reliable) */
80
 
    PJSIP_TRANSPORT_LOOP,
81
 
 
82
 
    /** Loopback (datagram, unreliable) */
83
 
    PJSIP_TRANSPORT_LOOP_DGRAM,
84
 
 
85
 
    /** Start of user defined transport */
86
 
    PJSIP_TRANSPORT_START_OTHER,
87
 
 
88
 
    /** Start of IPv6 transports */
89
 
    PJSIP_TRANSPORT_IPV6    = 128,
90
 
 
91
 
    /** UDP over IPv6 */
92
 
    PJSIP_TRANSPORT_UDP6 = PJSIP_TRANSPORT_UDP + PJSIP_TRANSPORT_IPV6,
93
 
 
94
 
    /** TCP over IPv6 */
95
 
    PJSIP_TRANSPORT_TCP6 = PJSIP_TRANSPORT_TCP + PJSIP_TRANSPORT_IPV6
96
 
 
97
 
} pjsip_transport_type_e;
98
 
 
99
 
 
100
 
/**
101
 
 * Forward declaration for endpoint (sip_endpoint.h).
102
 
 */
103
 
typedef struct pjsip_endpoint pjsip_endpoint;
104
 
 
105
 
/**
106
 
 * Forward declaration for transactions (sip_transaction.h).
107
 
 */
108
 
typedef struct pjsip_transaction pjsip_transaction;
109
 
 
110
 
/**
111
 
 * Forward declaration for events (sip_event.h).
112
 
 */
113
 
typedef struct pjsip_event pjsip_event;
114
 
 
115
 
/**
116
 
 * Forward declaration for transmit data/buffer (sip_transport.h).
117
 
 */
118
 
typedef struct pjsip_tx_data pjsip_tx_data;
119
 
 
120
 
/**
121
 
 * Forward declaration for receive data/buffer (sip_transport.h).
122
 
 */
123
 
typedef struct pjsip_rx_data pjsip_rx_data;
124
 
 
125
 
/**
126
 
 * Forward declaration for message (sip_msg.h).
127
 
 */
128
 
typedef struct pjsip_msg pjsip_msg;
129
 
 
130
 
/**
131
 
 * Forward declaration for message body (sip_msg.h).
132
 
 */
133
 
typedef struct pjsip_msg_body pjsip_msg_body;
134
 
 
135
 
/**
136
 
 * Forward declaration for header field (sip_msg.h).
137
 
 */
138
 
typedef struct pjsip_hdr pjsip_hdr;
139
 
 
140
 
/**
141
 
 * Forward declaration for URI (sip_uri.h).
142
 
 */
143
 
typedef struct pjsip_uri pjsip_uri;
144
 
 
145
 
/**
146
 
 * Forward declaration for SIP method (sip_msg.h)
147
 
 */
148
 
typedef struct pjsip_method pjsip_method;
149
 
 
150
 
/**
151
 
 * Opaque data type for the resolver engine (sip_resolve.h).
152
 
 */
153
 
typedef struct pjsip_resolver_t pjsip_resolver_t;
154
 
 
155
 
/**
156
 
 * Forward declaration for credential.
157
 
 */
158
 
typedef struct pjsip_cred_info pjsip_cred_info;
159
 
 
160
 
 
161
 
/**
162
 
 * Forward declaration for module (sip_module.h).
163
 
 */
164
 
typedef struct pjsip_module pjsip_module;
165
 
 
166
 
 
167
 
/**
168
 
 * Forward declaration for user agent type (sip_ua_layer.h).
169
 
 */
170
 
typedef pjsip_module pjsip_user_agent;
171
 
 
172
 
/**
173
 
 * Forward declaration for dialog (sip_dialog.h).
174
 
 */
175
 
typedef struct pjsip_dialog pjsip_dialog;
176
 
 
177
 
/**
178
 
 * Transaction role.
179
 
 */
180
 
typedef enum pjsip_role_e
181
 
{
182
 
    PJSIP_ROLE_UAC,     /**< Role is UAC. */
183
 
    PJSIP_ROLE_UAS,     /**< Role is UAS. */
184
 
 
185
 
    /* Alias: */
186
 
 
187
 
    PJSIP_UAC_ROLE = PJSIP_ROLE_UAC,    /**< Role is UAC. */
188
 
    PJSIP_UAS_ROLE = PJSIP_ROLE_UAS     /**< Role is UAS. */
189
 
 
190
 
} pjsip_role_e;
191
 
 
192
 
 
193
 
/**
194
 
 * General purpose buffer.
195
 
 */
196
 
typedef struct pjsip_buffer
197
 
{
198
 
    /** The start of the buffer. */
199
 
    char *start;
200
 
 
201
 
    /** Pointer to current end of the buffer, which also indicates the position
202
 
        of subsequent buffer write.
203
 
     */
204
 
    char *cur;
205
 
 
206
 
    /** The absolute end of the buffer. */
207
 
    char *end;
208
 
 
209
 
} pjsip_buffer;
210
 
 
211
 
 
212
 
/**
213
 
 * General host:port pair, used for example as Via sent-by.
214
 
 */
215
 
typedef struct pjsip_host_port
216
 
{
217
 
    pj_str_t host;      /**< Host part or IP address. */
218
 
    int      port;      /**< Port number. */
219
 
} pjsip_host_port;
220
 
 
221
 
/**
222
 
 * Host information.
223
 
 */
224
 
typedef struct pjsip_host_info
225
 
{
226
 
    unsigned                flag;   /**< Flags of pjsip_transport_flags_e. */
227
 
    pjsip_transport_type_e  type;   /**< Transport type. */
228
 
    pjsip_host_port         addr;   /**< Address information. */
229
 
} pjsip_host_info;
230
 
 
231
 
 
232
 
/**
233
 
 * Convert exception ID into pj_status_t status.
234
 
 *
235
 
 * @param exception_id  Exception Id.
236
 
 *
237
 
 * @return              Error code for the specified exception Id.
238
 
 */
239
 
PJ_DECL(pj_status_t) pjsip_exception_to_status(int exception_id);
240
 
 
241
 
/**
242
 
 * Return standard pj_status_t status from current exception.
243
 
 */
244
 
#define PJSIP_RETURN_EXCEPTION() pjsip_exception_to_status(PJ_GET_EXCEPTION())
245
 
 
246
 
/**
247
 
 * Attributes to inform that the function may throw exceptions.
248
 
 */
249
 
#define PJSIP_THROW_SPEC(list)
250
 
 
251
 
 
252
 
/**
253
 
 * @}
254
 
 */
255
 
 
256
 
#endif  /* __PJSIP_SIP_TYPES_H__ */