sdp.h

Go to the documentation of this file.
00001 /* * 
00002  * This file is part of libnemesi
00003  *
00004  * Copyright (C) 2007 by LScube team <team@streaming.polito.it>
00005  * See AUTHORS for more details
00006  * 
00007  * libnemesi is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * libnemesi is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with libnemesi; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  *  
00021  * */
00022 
00023 
00039 #ifndef NEMESI_SDP_H
00040 #define NEMESI_SDP_H
00041 
00042 #include "cc.h"
00043 
00056 typedef struct sdp_attr_s {
00057     char *name;     
00058     char *value;    
00063     struct sdp_attr_s *next;
00064 } sdp_attr;
00065 
00066 #define SDP_MEDIA_FIELDS    "Multimedia Type & Transport Address", \
00067                 "Medium Title", \
00068                 "Connection Info", \
00069                 "Bandwidth Info", \
00070                 "Crypto Key"
00071 
00082 typedef struct sdp_medium_info_s {
00083     char *m;        
00084     char *i;        
00085     char *c;        
00086     char *b;        
00087     char *k;        
00088     sdp_attr *attr_list;    
00090     cc_license *cc;        
00092     char media_type;    
00093     int port;        
00094     int n_ports;        
00095     char transport[8];    
00096     char *fmts;        
00098     struct sdp_medium_info_s *next;    
00099 } sdp_medium_info;
00100 
00101 #define SDP_SESSION_FIELDS    "Protocol Version", \
00102                 "Session Identifier & Creator", \
00103                 "Session Name", \
00104                 "Session Info", \
00105                 "URI Description", \
00106                 "e-mail Address", \
00107                 "Phone Number", \
00108                 "Connection Info", \
00109                 "Bandwidth Info", \
00110                 "Active Time", \
00111                 "I' so' llu re", \
00112                 "Time Zone", \
00113                 "Crypto Key"
00114 
00135 typedef struct {
00136     char *v;        
00137     char *o;        
00138     char *s;        
00139     char *i;        
00140     char *u;        
00141     char *e;        
00142     char *p;        
00143     char *c;        
00144     char *b;        
00146     char *t;        
00147     char *r;        
00149     char *z;        
00150     char *k;        
00152     sdp_attr *attr_list;    
00154     cc_license *cc;        
00156     sdp_medium_info *media_info_queue;    
00157 } sdp_session_info;
00158 
00159 sdp_session_info *sdp_session_setup(char *descr, int descr_len);
00160 sdp_medium_info *sdp_media_setup(char **descr, int descr_len);
00161 int sdp_set_attr(sdp_attr ** attr_list, char *a);
00162 void sdp_session_destroy(sdp_session_info *);
00163 void sdp_media_destroy(sdp_medium_info *);
00164 int sdp_parse_m_descr(sdp_medium_info *, char *);
00165 
00166 typedef struct {
00167     float begin;
00168     float end;
00169 } sdp_range;
00170 
00171 sdp_attr * sdp_get_attr(sdp_attr * attr_list, char * name);
00172 sdp_range sdp_parse_range(char * value);
00173 
00174 #endif  /* NEMESI_SDP_H */
00175 
00176 /* @} */

Generated on Tue Feb 3 03:10:02 2009 for libnemesi by  doxygen 1.5.4