hid.h

Go to the documentation of this file.
00001 /*
00002  * hid.h
00003  *
00004  * Virteos HID Implementation for the OpenH323 Project.
00005  *
00006  * Virteos is a Trade Mark of ISVO (Asia) Pte Ltd.
00007  *
00008  * Copyright (c) 2005 ISVO (Asia) Pte Ltd. All Rights Reserved.
00009  *
00010  * The contents of this file are subject to the Mozilla Public License
00011  * Version 1.0 (the "License"); you may not use this file except in
00012  * compliance with the License. You may obtain a copy of the License at
00013  * http://www.mozilla.org/MPL/
00014  *
00015  * Software distributed under the License is distributed on an "AS IS"
00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  * the License for the specific language governing rights and limitations
00018  * under the License.
00019  *
00020  * The Initial Developer of the Original Code is ISVO (Asia) Pte Ltd.
00021  *
00022  *
00023  * Contributor(s): ______________________________________.
00024  *
00025  * $Log: hid.h,v $
00026  * Revision 1.4  2006/06/26 17:03:16  shorne
00027  * Fixed build with latest CVS
00028  *
00029  * Revision 1.3  2005/07/13 18:01:01  shorne
00030  * Added HIDdevices::AddAllHIDs
00031  *
00032  * Revision 1.2  2005/07/06 11:15:25  shorne
00033  * Added HIDdevices::PrintOn
00034  *
00035  * Revision 1.1  2005/07/03 14:38:42  shorne
00036  * *** empty log message ***
00037  *
00038  *
00039 */
00040 
00041 #include <ptlib.h>
00042 #include <ptlib/pluginmgr.h>
00043 #include <lid.h>
00044 
00045 #if _MSC_VER > 1000
00046 #pragma once
00047 #endif // _MSC_VER > 1000
00048 
00049 #ifdef _MSC_VER
00050 #pragma warning(disable:4100)
00051 #endif
00052 
00053 
00054 PDECLARE_LIST(HIDDevices, OpalLineInterfaceDevice)
00055 #ifdef DOC_PLUS_PLUS
00056 {
00057 #endif
00058   public:
00059         BOOL HasAvailDevice();
00060         OpalLineInterfaceDevice * AvailDevice();
00061         BOOL AddAllHIDs(const PString & name);
00062 
00063         void PrintOn(ostream & strm) const;
00064 };
00065 
00066 class HIDPluginDeviceManager : public PPluginModuleManager
00067 {
00068   PCLASSINFO(HIDPluginDeviceManager, PPluginModuleManager);
00069   public:
00070     HIDPluginDeviceManager(PPluginManager * pluginMgr = NULL);
00071     ~HIDPluginDeviceManager();
00072 
00073     void OnLoadPlugin(PDynaLink & dll, INT code);
00074 
00075     virtual void OnShutdown();
00076 
00077     static void Bootstrap();
00078 
00079         virtual BOOL RegisterHID(unsigned int count, void * _HIDList);
00080         virtual BOOL UnregisterHID(unsigned int count, void * _HIDList);
00081 
00082         void CreateHIDDevice(PluginHID_Definition * HIDDevice);
00083 
00084 
00085 };
00086 
00087 static PFactory<PPluginModuleManager>::Worker<HIDPluginDeviceManager> h323PluginCodecManagerFactory("HIDPluginDeviceManager", true);
00088 
00090 
00091 typedef PFactory<OpalLineInterfaceDevice> HIDFactory;
00092 
00093 #define HID_REGISTER_DEVICE(cls, HIDName)   static HIDFactory::Worker<cls> cls##Factory(HIDName, true); \
00094 
00095 #define HID_DEFINE_DEVICE(cls, HIDName, fmtName) \
00096 class cls : public OpalLineInterfaceDevice { \
00097   public: \
00098     cls() : OpalLineInterfaceDevice() { } \
00099     PString GetName() const \
00100     { return fmtName; } \
00101 }; \
00102  HID_REGISTER_DEVICE(cls, capName) \
00103 
00105 

Generated on Wed Feb 6 09:02:43 2008 for OpenH323 by  doxygen 1.5.4