Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Examples

common.h

Go to the documentation of this file.
00001 /*
00002   This file is part of FreeSDP.
00003   Copyright (C) 2001,2002,2003 Federico Montesino Pouzols <fedemp@altern.org>
00004 
00005   FreeSDP is free software; you can redistribute it and/or modify it
00006   under the terms of the GNU General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009 
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU General Public License for more details.
00014 
00015   You should have received a copy of the GNU General Public License
00016   along with this program; if not, write to the Free Software
00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00026 #ifndef FSDP_COMMON_H
00027 #define FSDP_COMMON_H
00028 
00029 /* Macros to avoid name mangling when compiling with a C++ compiler */
00030 #ifdef __cplusplus
00031 #  define BEGIN_C_DECLS extern "C" {
00032 #  define END_C_DECLS   }
00033 #else /* !__cplusplus */
00034 #  define BEGIN_C_DECLS
00035 #  define END_C_DECLS
00036 #endif /* __cplusplus */
00037 
00038 #if TIME_WITH_SYS_TIME
00039 # include <sys/time.h>
00040 # include <time.h>
00041 #else
00042 # if HAVE_SYS_TIME_H
00043 #  include <sys/time.h>
00044 # else
00045 #  include <time.h>
00046 # endif
00047 #endif
00048 
00049 BEGIN_C_DECLS
00050 
00060   
00075 typedef enum {
00076   FSDPE_OK = 0,
00077   FSDPE_ILLEGAL_CHARACTER,       
00078   FSDPE_MISSING_VERSION,         
00080   FSDPE_INVALID_VERSION,         
00083   FSDPE_MISSING_OWNER,           
00085   FSDPE_INVALID_OWNER,           
00086   FSDPE_MISSING_NAME,            
00088   FSDPE_EMPTY_NAME,              
00090   FSDPE_INVALID_CONNECTION,      
00093   FSDPE_INVALID_CONNECTION_ADDRTYPE, 
00095   FSDPE_INVALID_CONNECTION_NETTYPE,  
00097   FSDPE_INVALID_BANDWIDTH,           
00099   FSDPE_MISSING_TIME,            
00101   FSDPE_INVALID_TIME,            
00102   FSDPE_INVALID_REPEAT,          
00104   FSDPE_INVALID_TIMEZONE,        
00105   FSDPE_INVALID_ENCRYPTION_METHOD, 
00106   FSDPE_INVALID_ATTRIBUTE,       
00109   FSDPE_INVALID_ATTRIBUTE_RTPMAP,
00110   FSDPE_INVALID_SESSION_TYPE,    
00114   FSDPE_INVALID_MEDIA,           
00115   FSDPE_UNKNOWN_MEDIA_TYPE,      
00118   FSDPE_UNKNOWN_MEDIA_TRANSPORT, 
00121   FSDPE_OVERFILLED,              
00123   FSDPE_INVALID_LINE,            
00125   FSDPE_MISSING_CONNECTION_INFO, 
00128   FSDPE_INVALID_INDEX,
00129   /*  FSDPE_MAXSIZE, description does not fit requested maximun size*/
00130   FSDPE_INTERNAL_ERROR,
00131 
00132   FSDPE_INVALID_PARAMETER,       
00136   FSDPE_BUFFER_OVERFLOW
00137 } fsdp_error_t;
00138   
00147 typedef enum {
00148   FSDP_NETWORK_TYPE_UNDEFINED,                 
00149   FSDP_NETWORK_TYPE_INET                       
00150 } fsdp_network_type_t;
00151   
00158 typedef enum {
00159   FSDP_ADDRESS_TYPE_UNDEFINED,                 
00160   FSDP_ADDRESS_TYPE_IPV4,                     
00161   FSDP_ADDRESS_TYPE_IPV6                      
00162 } fsdp_address_type_t;
00163   
00174 typedef enum { 
00175   FSDP_BW_MOD_TYPE_UNDEFINED,            
00176   FSDP_BW_MOD_TYPE_UNKNOWN,              
00179   FSDP_BW_MOD_TYPE_CONFERENCE_TOTAL,     
00180   FSDP_BW_MOD_TYPE_APPLICATION_SPECIFIC, 
00181   FSDP_BW_MOD_TYPE_RTCP_SENDERS,         
00183   FSDP_BW_MOD_TYPE_RTCP_RECEIVERS,       
00185 } fsdp_bw_modifier_type_t;
00186 
00192 typedef enum {
00193   FSDP_ENCRYPTION_METHOD_UNDEFINED,    
00194   FSDP_ENCRYPTION_METHOD_CLEAR,        
00196   FSDP_ENCRYPTION_METHOD_BASE64,       
00198   FSDP_ENCRYPTION_METHOD_URI,          
00201   FSDP_ENCRYPTION_METHOD_PROMPT        
00204 } fsdp_encryption_method_t;
00205 
00215 typedef enum {
00216   FSDP_SENDRECV_UNDEFINED,                    
00217   FSDP_SENDRECV_SENDRECV,                     
00218   FSDP_SENDRECV_RECVONLY,                     
00219   FSDP_SENDRECV_SENDONLY,                     
00220   FSDP_SENDRECV_INACTIVE                      
00221 } fsdp_sendrecv_mode_t;
00222 
00229 typedef enum {
00230   FSDP_ORIENT_UNDEFINED,                     
00231   FSDP_ORIENT_PORTRAIT,                      
00232   FSDP_ORIENT_LANDSCAPE,                     
00233   FSDP_ORIENT_SEASCAPE                       
00234 } fsdp_orient_t;
00235 
00242 typedef enum {
00243   FSDP_SESSION_TYPE_UNDEFINED,                 
00244   FSDP_SESSION_TYPE_BROADCAST,                 
00245   FSDP_SESSION_TYPE_MEETING,                   
00246   FSDP_SESSION_TYPE_MODERATED,                 
00247   FSDP_SESSION_TYPE_TEST,                      
00248   FSDP_SESSION_TYPE_H332                       
00249 } fsdp_session_type_t;
00250 
00257 typedef enum {
00258   FSDP_MEDIA_UNDEFINED,            
00259   FSDP_MEDIA_AUDIO,                
00260   FSDP_MEDIA_VIDEO,                
00261   FSDP_MEDIA_TEXT,                 
00262   FSDP_MEDIA_APPLICATION,          
00263   FSDP_MEDIA_DATA,                 
00264   FSDP_MEDIA_CONTROL,              
00265 } fsdp_media_t;
00266 
00274 typedef enum {
00275   FSDP_TP_UNDEFINED,              
00276   FSDP_TP_RTP_AVP,                
00277   FSDP_TP_UDP,                    
00278   FSDP_TP_TCP,                    
00279   FSDP_TP_UDPTL,                  
00280   FSDP_TP_VAT,                    
00281   FSDP_TP_OLD_RTP,                
00282   FSDP_TP_H320                    
00283 } fsdp_transport_protocol_t;
00284 
00291 typedef enum {
00292   FSDP_SESSION_STR_ATT_CATEGORY,
00293   FSDP_SESSION_STR_ATT_KEYWORDS,
00294   FSDP_SESSION_STR_ATT_TOOL,
00295   FSDP_SESSION_STR_ATT_CHARSET,
00296   FSDP_LAST_SESSION_STR_ATT = FSDP_SESSION_STR_ATT_CHARSET
00297 } fsdp_session_str_att_t;
00298 
00307 typedef struct fsdp_media_description_t_s fsdp_media_description_t;
00308 
00315 typedef struct fsdp_description_t_s fsdp_description_t;
00316 
00324 fsdp_description_t* 
00325 fsdp_description_new(void);
00326 
00332 void 
00333 fsdp_description_delete(fsdp_description_t *dsc);
00334 
00344 void 
00345 fsdp_description_recycle(fsdp_description_t *dsc);
00346 
00352 const char *
00353 fsdp_strerror(fsdp_error_t err_no);
00354  /* closes addtogroup common */
00356 
00357 END_C_DECLS
00358 
00359 #endif /* FSDP_COMMON_H */

Generated on Sun Jan 18 21:12:43 2004 for FreeSDP by doxygen 1.3.4