OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

mediacmd.h
Go to the documentation of this file.
1 /*
2 * mediacmd.h
3 *
4 * Abstractions for sending commands to media processors.
5 *
6 * Open Phone Abstraction Library (OPAL)
7 * Formally known as the Open H323 project.
8 *
9 * Copyright (c) 2001 Equivalence Pty. Ltd.
10 *
11 * The contents of this file are subject to the Mozilla Public License
12 * Version 1.0 (the "License"); you may not use this file except in
13 * compliance with the License. You may obtain a copy of the License at
14 * http://www.mozilla.org/MPL/
15 *
16 * Software distributed under the License is distributed on an "AS IS"
17 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
18 * the License for the specific language governing rights and limitations
19 * under the License.
20 *
21 * The Original Code is Open Phone Abstraction Library.
22 *
23 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 *
25 * Contributor(s): ______________________________________.
26 */
27
28 #ifndef OPAL_OPAL_MEDIACMD_H
29 #define OPAL_OPAL_MEDIACMD_H
30
31 #ifdef P_USE_PRAGMA
32 #pragma interface
33 #endif
34
35 #include <opal/buildopts.h>
36
38
43 class OpalMediaCommand : public PObject
44 {
45 PCLASSINFO(OpalMediaCommand, PObject);
46 public:
53 void PrintOn(
54 ostream & strm
55 ) const { strm << GetName(); }
56
68 virtual Comparison Compare(
69 const PObject & obj
70 ) const { return GetName().Compare(PDownCast(const OpalMediaCommand, &obj)->GetName()); }
72
77 virtual PString GetName() const = 0;
78
81 virtual void * GetPlugInData() const { return NULL; }
82
85 virtual unsigned * GetPlugInSize() const { return NULL; }
87 };
88
89
90 #define OPAL_DEFINE_MEDIA_COMMAND(cls, name) \
91 class cls : public OpalMediaCommand \
92 { \
93 PCLASSINFO(cls, OpalMediaCommand) \
94 public: \
95 cls() { } \
96 virtual PString GetName() const { return name; } \
97 }
98
99
100 #endif // OPAL_OPAL_MEDIACMD_H
101
102
103 // End of File ///////////////////////////////////////////////////////////////