Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / include / hid.h
blob3b886fb839edcc7417f5ffb88aa6b4b9fcc2016b
1 /*
2 * hid.h
4 * Virteos HID Implementation for the OpenH323 Project.
6 * Virteos is a Trade Mark of ISVO (Asia) Pte Ltd.
8 * Copyright (c) 2005 ISVO (Asia) Pte Ltd. All Rights Reserved.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
18 * under the License.
20 * The Initial Developer of the Original Code is ISVO (Asia) Pte Ltd.
23 * Contributor(s): ______________________________________.
25 * $Log$
26 * Revision 1.4 2006/06/26 17:03:16 shorne
27 * Fixed build with latest CVS
29 * Revision 1.3 2005/07/13 18:01:01 shorne
30 * Added HIDdevices::AddAllHIDs
32 * Revision 1.2 2005/07/06 11:15:25 shorne
33 * Added HIDdevices::PrintOn
35 * Revision 1.1 2005/07/03 14:38:42 shorne
36 * *** empty log message ***
41 #include <ptlib.h>
42 #include <ptlib/pluginmgr.h>
43 #include <lid.h>
45 #if _MSC_VER > 1000
46 #pragma once
47 #endif // _MSC_VER > 1000
49 #ifdef _MSC_VER
50 #pragma warning(disable:4100)
51 #endif
54 PDECLARE_LIST(HIDDevices, OpalLineInterfaceDevice)
55 #ifdef DOC_PLUS_PLUS
57 #endif
58 public:
59 BOOL HasAvailDevice();
60 OpalLineInterfaceDevice * AvailDevice();
61 BOOL AddAllHIDs(const PString & name);
63 void PrintOn(ostream & strm) const;
66 class HIDPluginDeviceManager : public PPluginModuleManager
68 PCLASSINFO(HIDPluginDeviceManager, PPluginModuleManager);
69 public:
70 HIDPluginDeviceManager(PPluginManager * pluginMgr = NULL);
71 ~HIDPluginDeviceManager();
73 void OnLoadPlugin(PDynaLink & dll, INT code);
75 virtual void OnShutdown();
77 static void Bootstrap();
79 virtual BOOL RegisterHID(unsigned int count, void * _HIDList);
80 virtual BOOL UnregisterHID(unsigned int count, void * _HIDList);
82 void CreateHIDDevice(PluginHID_Definition * HIDDevice);
87 static PFactory<PPluginModuleManager>::Worker<HIDPluginDeviceManager> h323PluginCodecManagerFactory("HIDPluginDeviceManager", true);
89 ///////////////////////////////////////////////////////////////////////////////
91 typedef PFactory<OpalLineInterfaceDevice> HIDFactory;
93 #define HID_REGISTER_DEVICE(cls, HIDName) static HIDFactory::Worker<cls> cls##Factory(HIDName, true); \
95 #define HID_DEFINE_DEVICE(cls, HIDName, fmtName) \
96 class cls : public OpalLineInterfaceDevice { \
97 public: \
98 cls() : OpalLineInterfaceDevice() { } \
99 PString GetName() const \
100 { return fmtName; } \
101 }; \
102 HID_REGISTER_DEVICE(cls, capName) \
104 /////////////////////////////////////////////////////////////////////////////