OPAL Version 3.10.2
|
00001 /* 00002 * 00003 * 00004 * Inter Asterisk Exchange 2 00005 * 00006 * A thread safe list of sound packets. 00007 * 00008 * Open Phone Abstraction Library (OPAL) 00009 * 00010 * Copyright (c) 2005 Indranet Technologies Ltd. 00011 * 00012 * The contents of this file are subject to the Mozilla Public License 00013 * Version 1.0 (the "License"); you may not use this file except in 00014 * compliance with the License. You may obtain a copy of the License at 00015 * http://www.mozilla.org/MPL/ 00016 * 00017 * Software distributed under the License is distributed on an "AS IS" 00018 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00019 * the License for the specific language governing rights and limitations 00020 * under the License. 00021 * 00022 * The Original Code is Open Phone Abstraction Library. 00023 * 00024 * The Initial Developer of the Original Code is Indranet Technologies Ltd. 00025 * 00026 * The author of this code is Derek J Smithies 00027 * 00028 * $Revision: 24606 $ 00029 * $Author: dereksmithies $ 00030 * $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $ 00031 */ 00032 00033 #ifndef OPAL_IAX2_SOUND_H 00034 #define OPAL_IAX2_SOUND_H 00035 00036 #ifndef _PTLIB_H 00037 #include <ptlib.h> 00038 #endif 00039 00040 #include <opal/buildopts.h> 00041 00042 #if OPAL_IAX2 00043 00044 #ifdef P_USE_PRAGMA 00045 #pragma interface 00046 #endif 00047 00048 class IAX2Frame; 00049 class IAXConnection; 00050 class PSoundChannel; 00051 00053 00063 PDECLARE_LIST(IAX2SoundList, PBYTEArray *) 00064 #ifdef DOC_PLUS_PLUS //This makes emacs bracket matching code happy. 00065 class IAX2SoundList : public PBYTEArray * 00066 { 00067 #endif 00068 public: 00070 ~IAX2SoundList(); 00071 00073 void Initialise() { DisallowDeleteObjects(); } 00074 00078 PBYTEArray *GetLastEntry(); 00079 00081 void AddNewEntry(PBYTEArray *newEntry); 00082 00084 void GetAllDeleteAll(IAX2SoundList &dest); 00085 00087 PINDEX GetSize() { PWaitAndSignal m(mutex); return PAbstractList::GetSize(); } 00088 00089 protected: 00091 PMutex mutex; 00092 }; 00093 00094 00095 #endif // OPAL_IAX2 00096 00097 #endif // OPAL_IAX2_SOUND_H 00098 00099 /* The comment below is magic for those who use emacs to edit this file. 00100 * With the comment below, the tab key does auto indent to 2 spaces. 00101 * 00102 * Local Variables: 00103 * mode:c 00104 * c-basic-offset:2 00105 * End: 00106 */