Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

sdes.h

Go to the documentation of this file.
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 __SDES_H__
00023 #define __SDES_H__
00024 
00025 #include "omnetpp.h"
00026 
00027 #include "types.h"
00028 
00033 class SDESItem : public cObject {
00034 
00035         public:
00041                 enum SDES_ITEM_TYPE {
00042                         SDES_UNDEF = 0,
00043                         SDES_CNAME = 1,
00044                         SDES_NAME = 2,
00045                         SDES_EMAIL = 3,
00046                         SDES_PHONE = 4,
00047                         SDES_LOC = 5,
00048                         SDES_TOOL = 6,
00049                         SDES_NOTE = 7,
00050                         SDES_PRIV = 8
00051                 };
00052                 
00056                 SDESItem(const char *name = NULL);
00057                 
00061                 SDESItem(SDES_ITEM_TYPE type, const char *content);
00062                 
00066                 SDESItem(const SDESItem& sdesItem);
00067                 
00071                 virtual ~SDESItem();
00072                 
00076                 SDESItem& operator=(const SDESItem& sdesItem);
00077                 
00081                 virtual cObject *dup() const;
00082                 
00086                 virtual const char *className() const;
00087                 
00091                 virtual void info(char *buf);
00092                 
00096                 virtual void writeContents(ostream& os);
00097                 
00101                 virtual SDES_ITEM_TYPE type();
00102                 
00106                 virtual const char *content();
00107                 
00112                 virtual int length();
00113         
00114         protected:
00115         
00119                 SDES_ITEM_TYPE _type;
00120                 
00124                 int _length;
00125                 
00129                 const char *_content;
00130 };
00131 
00132 
00137 class SDESChunk : public cArray {
00138 
00139         public:
00143                 SDESChunk(const char *name = NULL, u_int32 ssrc = 0);
00144                 
00148                 SDESChunk(const SDESChunk& sdesChunk);
00149                 
00153                 virtual ~SDESChunk();
00154                 
00158                 SDESChunk& operator=(const SDESChunk& sdesChunk);
00159                 
00163                 virtual cObject *dup() const;
00164                 
00168                 virtual const char *className() const;
00169                 
00173                 virtual void info(char *buf);
00174                 
00178                 virtual void writeContents(ostream& os);
00179                 
00184                 virtual void addSDESItem(SDESItem *item);
00185                 
00189                 virtual u_int32 ssrc();
00190                 
00194                 virtual void setSSRC(u_int32 ssrc);
00195                 
00199                 virtual int length();
00200                 
00201         protected:
00202         
00206                 u_int32 _ssrc;
00207                 
00211                 int _length;
00212 };
00213 
00214 #endif

Generated on Tue Sep 12 12:20:20 2006 for RTP model for OMNeT++ by  doxygen 1.4.2