2 The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)
3 Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <osipparser2/osip_port.h>
27 * Structure for payload management. Each payload element
28 * represents one codec of a media line.
31 typedef struct __payload __payload_t;
36 /* char *port; this must be assigned by the application dynamicly */
42 char *c_addr_multicast_ttl;
43 char *c_addr_multicast_int;
44 /* rtpmap (rcvonly and other attributes are added dynamicly) */
50 * Allocate a payload element.
51 * @param payload The payload.
53 int __payload_init (__payload_t ** payload);
55 * Free a payload element.
56 * @param payload The payload.
58 void __payload_free (__payload_t * payload);
63 /* Thread abstraction layer definition */
69 #if defined(WIN32) || defined(_WIN32_WCE)
74 #if !defined(WIN32) && !defined(_WIN32_WCE) && defined(__PSOS__)
78 /* HAVE_PTHREAD_H is not used any more! I keep it for a while... */
79 #if defined(HAVE_PTHREAD) || defined(HAVE_PTHREAD_H) || defined(HAVE_PTH_PTHREAD_H)
81 typedef pthread_mutex_t osip_mutex_t;
92 #if defined(WIN32) || defined(_WIN32_WCE)
100 #elif defined(__PSOS__)
108 #if !defined(WIN32) && !defined(_WIN32_WCE) && !defined(__VXWORKS_OS__) && !defined(__POS__)
109 #if defined(HAVE_PTHREAD) || defined(HAVE_PTHREAD_H) || defined(HAVE_PTH_PTHREAD_H)
110 typedef pthread_t osip_thread_t;
112 #error no thread implementation found!
117 /* Semaphore and Mutex abstraction layer definition */
119 #if defined(WIN32) || defined(_WIN32_WCE)
133 #if (!(defined(WIN32) || defined (_WIN32_WCE)) && defined(__PSOS__))
148 #ifdef __VXWORKS_OS__
149 #include <semaphore.h>
151 typedef struct semaphore osip_mutex_t;
152 typedef sem_t osip_sem_t;
156 #include <semaphore.h>
162 #if defined(HAVE_SEMAPHORE_H) && !defined(__APPLE_CC__)
163 #include <semaphore.h>
169 * Structure for referencing a semaphore element.
172 typedef sem_t osip_sem_t;
174 #elif defined(HAVE_SYS_SEM_H)
175 #include <sys/types.h>
185 #if (!defined(HAVE_SEMAPHORE_H) && !defined(HAVE_SYS_SEM_H) && !defined(WIN32) && !defined(_WIN32_WCE) && !defined(__PSOS__) && !defined(__VXWORKS_OS__))
186 #error No semaphore implementation found
189 #if defined(__PSOS__) || defined(__VXWORKS_OS__)
196 * Structure for referencing a condition variable element.
197 * @defvar struct osip_cond
199 #if defined(HAVE_PTHREAD) || defined(HAVE_PTH_PTHREAD_H)
200 typedef struct osip_cond
208 typedef struct osip_cond
210 struct osip_mutex *mut;
211 struct osip_sem *sem;