OPAL  Version 3.18.8
sound.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Inter Asterisk Exchange 2
5  *
6  * A thread safe list of sound packets.
7  *
8  * Open Phone Abstraction Library (OPAL)
9  *
10  * Copyright (c) 2005 Indranet Technologies Ltd.
11  *
12  * The contents of this file are subject to the Mozilla Public License
13  * Version 1.0 (the "License"); you may not use this file except in
14  * compliance with the License. You may obtain a copy of the License at
15  * http://www.mozilla.org/MPL/
16  *
17  * Software distributed under the License is distributed on an "AS IS"
18  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19  * the License for the specific language governing rights and limitations
20  * under the License.
21  *
22  * The Original Code is Open Phone Abstraction Library.
23  *
24  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
25  *
26  * The author of this code is Derek J Smithies
27  */
28 
29 #ifndef OPAL_IAX2_SOUND_H
30 #define OPAL_IAX2_SOUND_H
31 
32 #ifndef _PTLIB_H
33 #include <ptlib.h>
34 #endif
35 
36 #include <opal_config.h>
37 
38 #if OPAL_IAX2
39 
40 #ifdef P_USE_PRAGMA
41 #pragma interface
42 #endif
43 
44 class IAX2Frame;
45 class IAXConnection;
46 class PSoundChannel;
47 
49 
59 PDECLARE_LIST(IAX2SoundList, PBYTEArray *)
60 #ifdef DOC_PLUS_PLUS //This makes emacs bracket matching code happy.
61 class IAX2SoundList : public PBYTEArray *
62 {
63 #endif
64  public:
67 
69  void Initialise() { DisallowDeleteObjects(); }
70 
74  PBYTEArray *GetLastEntry();
75 
77  void AddNewEntry(PBYTEArray *newEntry);
78 
80  void GetAllDeleteAll(IAX2SoundList &dest);
81 
83  PINDEX GetSize() { PWaitAndSignal m(mutex); return PAbstractList::GetSize(); }
84 
85  protected:
87  PDECLARE_MUTEX(mutex);
88 };
89 
90 
91 #endif // OPAL_IAX2
92 
93 #endif // OPAL_IAX2_SOUND_H
94 
95 /* The comment below is magic for those who use emacs to edit this file.
96  * With the comment below, the tab key does auto indent to 2 spaces.
97  *
98  * Local Variables:
99  * mode:c
100  * c-basic-offset:2
101  * End:
102  */
void Initialise()
Definition: sound.h:69
PBYTEArray * GetLastEntry()
PDECLARE_MUTEX(mutex)
PINDEX GetSize()
Definition: sound.h:83
Definition: sound.h:61
void AddNewEntry(PBYTEArray *newEntry)
Definition: frame.h:71
void GetAllDeleteAll(IAX2SoundList &dest)