Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNLCRTPLossList.h

Go to the documentation of this file.
00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef MNLCRTPLOSSLIST_H 00025 #define MNLCRTPLOSSLIST_H 00026 00027 /* 00028 MNLCRTPLossList enthaelt die funktionalitaet der Verlust Liste 00029 diese Klasse benutzt keine Semaphoren, so muss eine Regelung von der 00030 aufrufenden Klasse erledigt werden. 00031 */ 00032 00033 // #include <DLList.h> 00034 #include "MNList.h" 00035 #include "MNLCRTPRangeList.h" 00036 00037 struct LossListEntry; 00038 00039 class LossListEntryList 00040 : private MNList<LossListEntry*> 00041 { 00042 public: 00043 void* first() { 00044 return MNList<LossListEntry*>::first(); 00045 } 00046 00047 void next( void*& pix ) { 00048 pix = MNList<LossListEntry*>::succ(pix); 00049 } 00050 00051 LossListEntry* operator()( void* pix ) { 00052 return MNList<LossListEntry*>::inf(pix); 00053 } 00054 00055 void append( LossListEntry* p ) { 00056 MNList<LossListEntry*>::push_back ( p ); 00057 } 00058 00059 void clear() { 00060 MNList<LossListEntry*>::clear(); 00061 } 00062 00063 void del( void* pix ) { 00064 MNList<LossListEntry*>::del_item(pix); 00065 } 00066 }; 00067 00068 /************************************************************** 00069 * Klasse: MNLCRTPLossList 00070 * Beschreibung: enthaelt die funktionalitaet der Verlustliste 00071 * September 99 00072 **************************************************************/ 00073 00074 struct LossListEntry 00075 { 00076 u_int32 ssrc; /* ssrc from sender (of which we are processing the stats) */ 00077 MNLCRTPRangeList* data; /* the ranges */ 00078 }; 00079 00080 class MNLCRTPLossList 00081 { 00082 private: 00083 /* vars */ 00084 LossListEntryList losslist; /* the list */ 00085 int entry_count; 00086 00087 /* functions */ 00088 void clr(); 00089 00090 public: 00091 MNLCRTPLossList(); 00092 ~MNLCRTPLossList(); 00093 00094 /* create */ 00095 void insert_data(u_int32 ssrc, u_int64 begin_r, u_int64 end_r); 00096 00097 /* destroy */ 00098 void delete_all(); 00099 void delete_entry(u_int32 ssrc); 00100 void delete_range(u_int32 ssrc, u_int64 begin_r, u_int64 end_r); 00101 00102 /* control */ 00103 bool find_entry(u_int32 ssrc); 00104 bool find_entry_range(u_int32 ssrc, u_int64 begin_r); 00105 u_int32 get_first_entry(); 00106 u_int32 get_next_entry(u_int32 ssrc); 00107 LossRange_t* get_first_data(u_int32 ssrc); 00108 LossRange_t* get_next_data(u_int32 ssrc, u_int64 begin_r); 00109 LossRange_t* get_next_in_range_data(u_int32 ssrc, u_int64 begin_r); 00110 int get_entry_count(); 00111 }; 00112 00113 #endif

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8