sound.h

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

Generated on Mon Sep 25 16:20:11 2006 for OPAL by  doxygen 1.4.7