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.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 #include <opal/buildopts.h>
00052 
00053 #ifdef P_USE_PRAGMA
00054 #pragma interface
00055 #endif
00056 
00057 class IAX2Frame;
00058 class IAXConnection;
00059 class PSoundChannel;
00060 
00062 
00072 PDECLARE_LIST(IAX2SoundList, PBYTEArray *)
00073 #ifdef DOC_PLUS_PLUS                           //This makes emacs bracket matching code happy.
00074 class IAX2SoundList : public PBYTEArray *
00075 {
00076 #endif
00077  public:
00079   ~IAX2SoundList();
00080   
00082   void Initialise() {  DisallowDeleteObjects(); }
00083   
00087   PBYTEArray *GetLastEntry();
00088   
00090   void AddNewEntry(PBYTEArray *newEntry);
00091   
00093   void GetAllDeleteAll(IAX2SoundList &dest);
00094   
00096   PINDEX GetSize() { PWaitAndSignal m(mutex); return PAbstractList::GetSize(); }
00097   
00098  protected:
00100   PMutex      mutex;     
00101 };
00102 
00103 
00104 
00105 
00106 #endif // SOUND_H
00107 /* The comment below is magic for those who use emacs to edit this file. */
00108 /* With the comment below, the tab key does auto indent to 4 spaces.     */
00109 
00110 /*
00111  * Local Variables:
00112  * mode:c
00113  * c-file-style:linux
00114  * c-basic-offset:2
00115  * End:
00116  */
00117 

Generated on Mon Sep 22 12:24:54 2008 for OPAL by  doxygen 1.5.1