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 MNRTP_SEND_CSRC_LIST_H 00025 #define MNRTP_SEND_CSRC_LIST_H 00026 00027 #include <sys/types.h> 00028 00029 #include "MNArrayList.h" 00030 #include "MNMutex.h" 00031 #include "var_type.h" 00032 00033 /**********************************************************************/ 00042 class SendCsrcList 00043 { 00044 /* old version ! 00045 * u_int32 rtp_csrc_list[RTP_CSRC_MAX]; 00046 * list of csrc appended to sent packets - 00047 * data stored in network order 00048 */ 00049 00050 /* old version ! 00051 * u_int16 rtp_csrc_count; 00052 * number of csrc items in list 00053 */ 00054 00056 MNArrayList<u_int32> _list; 00057 MNMutex _lock; 00058 00059 protected: 00060 friend class MNRTP; 00061 friend class MNRTPWriter; 00062 00063 void lock(); 00064 void unlock(); 00065 00073 void hton_copyto( u_int32* buffer ); 00074 00078 size_t locked_size(); 00079 00080 public: 00083 void clear(); 00084 00087 size_t size(); 00088 00093 void del( u_int32 csrc ); 00094 00103 bool append( u_int32 csrc ); 00104 00110 bool find( u_int32 csrc ); 00111 }; 00112 00113 #endif /* MNRTP_SEND_CSRC_LIST_H */ 00114