mediacmd.h

Go to the documentation of this file.
00001 /*
00002  * mediacmd.h
00003  *
00004  * Abstractions for sending commands to media processors.
00005  *
00006  * Open Phone Abstraction Library (OPAL)
00007  * Formally known as the Open H323 project.
00008  *
00009  * Copyright (c) 2001 Equivalence Pty. Ltd.
00010  *
00011  * The contents of this file are subject to the Mozilla Public License
00012  * Version 1.0 (the "License"); you may not use this file except in
00013  * compliance with the License. You may obtain a copy of the License at
00014  * http://www.mozilla.org/MPL/
00015  *
00016  * Software distributed under the License is distributed on an "AS IS"
00017  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00018  * the License for the specific language governing rights and limitations
00019  * under the License.
00020  *
00021  * The Original Code is Open Phone Abstraction Library.
00022  *
00023  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00024  *
00025  * Contributor(s): ______________________________________.
00026  */
00027 
00028 #ifndef __OPAL_MEDIACMD_H
00029 #define __OPAL_MEDIACMD_H
00030 
00031 #ifdef P_USE_PRAGMA
00032 #pragma interface
00033 #endif
00034 
00036 
00041 class OpalMediaCommand : public PObject
00042 {
00043   PCLASSINFO(OpalMediaCommand, PObject);
00044   public:
00051     void PrintOn(
00052       ostream & strm    
00053     ) const { strm << GetName(); }
00054 
00066     virtual Comparison Compare(
00067       const PObject & obj   
00068     ) const { return GetName().Compare(PDownCast(const OpalMediaCommand, &obj)->GetName()); }
00070 
00075     virtual PString GetName() const = 0;
00077 };
00078 
00079 
00080 #define OPAL_DEFINE_MEDIA_COMMAND(cls, name) \
00081   class cls : public OpalMediaCommand \
00082   { \
00083         PCLASSINFO(cls, OpalMediaCommand) \
00084     public: \
00085       virtual PString GetName() const { return name; } \
00086   }
00087 
00088 
00089 #endif // __OPAL_MEDIACMD_H
00090 
00091 
00092 // End of File ///////////////////////////////////////////////////////////////

Generated on Mon Sep 15 11:49:14 2008 for OPAL by  doxygen 1.5.1