sofia-sip/sdp_tag.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SDP_TAG_H
00026 
00027 #define SDP_TAG_H
00028 
00038 #ifndef SU_TAG_H
00039 #include <sofia-sip/su_tag.h>
00040 #endif
00041 #ifndef SU_TAG_CLASS_H
00042 #include <sofia-sip/su_tag_class.h>
00043 #endif
00044 
00045 SOFIA_BEGIN_DECLS
00046 
00047 struct sdp_session_s;
00048 
00050 #define SDPTAG_ANY()         sdptag_any, ((tag_value_t)0)
00051 SDP_DLL extern tag_typedef_t sdptag_any;
00052 
00053 /* Tags for parameters */
00054 
00055 SDP_DLL extern tag_typedef_t sdptag_session;
00057 #define SDPTAG_SESSION(x) \
00058 sdptag_session, sdptag_session_v((x))
00059 
00060 SDP_DLL extern tag_typedef_t sdptag_session_ref;
00061 #define SDPTAG_SESSION_REF(x) \
00062 sdptag_session_ref, sdptag_session_vr(&(x))
00063 
00064 /* Functions for typesafe parameter passing */
00065 
00066 #if SU_HAVE_INLINE
00067 su_inline
00068 tag_value_t sdptag_session_v(struct sdp_session_s const *v) { 
00069   return (tag_value_t)v; 
00070 }
00071 su_inline
00072 tag_value_t sdptag_session_vr(struct sdp_session_s const **vp) { 
00073   return (tag_value_t)vp; 
00074 }
00075 #else
00076 #define sdptag_session_v(v)   (tag_value_t)(v)
00077 #define sdptag_session_vr(vp) (tag_value_t)(vp)
00078 #endif
00079 
00080 /* Tag classes */
00081 
00082 extern tag_class_t sdptag_session_class[];
00083 
00084 #define SDPTAG_TYPEDEF(name) \
00085   {{ TAG_NAMESPACE, #name, sdptag_session_class }}
00086 
00087 SOFIA_END_DECLS
00088 
00089 #endif /* !defined(SDP_TAG_H) */

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