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 * $Log: sound.h,v $ 00029 * Revision 1.3 2007/04/19 06:17:21 csoutheren 00030 * Fixes for precompiled headers with gcc 00031 * 00032 * Revision 1.2 2005/08/26 03:07:38 dereksmithies 00033 * Change naming convention, so all class names contain the string "IAX2" 00034 * 00035 * Revision 1.1 2005/07/30 07:01:32 csoutheren 00036 * Added implementation of IAX2 (Inter Asterisk Exchange 2) protocol 00037 * Thanks to Derek Smithies of Indranet Technologies Ltd. for 00038 * writing and contributing this code 00039 * 00040 * 00041 * 00042 */ 00043 00044 #ifndef SOUND_H 00045 #define SOUND_H 00046 00047 #ifndef _PTLIB_H 00048 #include <ptlib.h> 00049 #endif 00050 00051 #ifdef P_USE_PRAGMA 00052 #pragma interface 00053 #endif 00054 00055 class IAX2Frame; 00056 class IAXConnection; 00057 class PSoundChannel; 00058 00060 00070 PDECLARE_LIST(IAX2SoundList, PBYTEArray *) 00071 #ifdef DOC_PLUS_PLUS //This makes emacs bracket matching code happy. 00072 class IAX2SoundList : public PBYTEArray * 00073 { 00074 #endif 00075 public: 00077 ~IAX2SoundList(); 00078 00080 void Initialise() { DisallowDeleteObjects(); } 00081 00085 PBYTEArray *GetLastEntry(); 00086 00088 void AddNewEntry(PBYTEArray *newEntry); 00089 00091 void GetAllDeleteAll(IAX2SoundList &dest); 00092 00094 PINDEX GetSize() { PWaitAndSignal m(mutex); return PAbstractList::GetSize(); } 00095 00096 protected: 00098 PMutex mutex; 00099 }; 00100 00101 00102 00103 00104 #endif // SOUND_H 00105 /* The comment below is magic for those who use emacs to edit this file. */ 00106 /* With the comment below, the tab key does auto indent to 4 spaces. */ 00107 00108 /* 00109 * Local Variables: 00110 * mode:c 00111 * c-file-style:linux 00112 * c-basic-offset:2 00113 * End: 00114 */ 00115