|
INET Framework for OMNeT++/OMNEST
|
00001 /*************************************************************************** 00002 sdes.h - description 00003 ------------------- 00004 begin : Tue Oct 23 2001 00005 copyright : (C) 2001 by Matthias Oppitz 00006 email : Matthias.Oppitz@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00022 #ifndef __INET_SDES_H 00023 #define __INET_SDES_H 00024 00025 #include "INETDefs.h" 00026 00031 class INET_API SDESItem : public cObject 00032 { 00033 00034 public: 00040 enum SDES_ITEM_TYPE { 00041 SDES_UNDEF = 0, 00042 SDES_CNAME = 1, 00043 SDES_NAME = 2, 00044 SDES_EMAIL = 3, 00045 SDES_PHONE = 4, 00046 SDES_LOC = 5, 00047 SDES_TOOL = 6, 00048 SDES_NOTE = 7, 00049 SDES_PRIV = 8 00050 }; 00051 00055 SDESItem(); 00056 00060 SDESItem(SDES_ITEM_TYPE type, const char *content); 00061 00065 SDESItem(const SDESItem& sdesItem); 00066 00070 virtual ~SDESItem(); 00071 00075 SDESItem& operator=(const SDESItem& sdesItem); 00076 00080 virtual SDESItem *dup() const; 00081 00085 virtual std::string info(); 00086 00090 virtual void dump(std::ostream& os); 00091 00095 virtual SDES_ITEM_TYPE getType(); 00096 00100 virtual const char *getContent(); 00101 00106 virtual int getLength(); 00107 00108 protected: 00109 00113 SDES_ITEM_TYPE _type; 00114 00118 int _length; 00119 00123 const char *_content; 00124 }; 00125 00126 00131 class INET_API SDESChunk : public cArray 00132 { 00133 00134 public: 00138 SDESChunk(const char *name = NULL, uint32 ssrc = 0); 00139 00143 SDESChunk(const SDESChunk& sdesChunk); 00144 00148 virtual ~SDESChunk(); 00149 00153 SDESChunk& operator=(const SDESChunk& sdesChunk); 00154 00158 virtual SDESChunk *dup() const; 00159 00163 virtual std::string info(); 00164 00168 virtual void dump(std::ostream& os); 00169 00174 virtual void addSDESItem(SDESItem *item); 00175 00179 virtual uint32 getSSRC(); 00180 00184 virtual void setSSRC(uint32 ssrc); 00185 00189 virtual int getLength(); 00190 00191 protected: 00192 00196 uint32 _ssrc; 00197 00201 int _length; 00202 }; 00203 00204 #endif 00205