20 #include <pointing/utils/URI.h>
23 #include <IOKit/hid/IOHIDManager.h>
24 #define identifier IOHIDDeviceRef
28 #define identifier std::string
33 #define identifier HANDLE
36 #ifndef POINTINGDEVICEMANAGER_H
37 #define POINTINGDEVICEMANAGER_H
41 class SystemPointingDevice;
50 std::string vendor =
"???";
51 std::string product =
"???";
58 typedef std::set<PointingDeviceDescriptor> PointingDescriptorSet;
64 typedef PointingDescriptorSet::iterator PointingDescriptorIterator;
65 typedef PointingDescriptorSet::const_iterator PointingDescriptorConstIterator;
70 DeviceUpdateCallback callbackFunc;
72 CallbackInfo(DeviceUpdateCallback callbackFunc,
void *context)
73 :callbackFunc(callbackFunc),context(context) { }
92 PointingDescriptorSet descriptors;
97 std::set<CallbackInfo> callbackInfos;
103 void convertAnyCandidates();
105 void matchCandidates();
108 typedef std::list<SystemPointingDevice *> PointingList;
115 PointingList pointingList;
119 std::map<identifier, PointingDeviceData *> devMap;
121 PointingList candidates;
136 bool unregisterDevice(identifier);
193 size_t size()
const {
return descriptors.size(); }
199 PointingDescriptorIterator begin() {
return descriptors.begin(); }
200 PointingDescriptorIterator end() {
return descriptors.end(); }
203 virtual ~PointingDeviceManager(
void) {}
207 #endif // POINTINGDEVICEMANAGER_H
URI anyToSpecific(const URI &anyURI) const
anyToSpecific Converts a given URI into platform-specific unique URI
Definition: PointingDeviceManager.cpp:109
The PointingDeviceManager class is a helper class which enumerates the list of existing pointing devi...
Definition: PointingDeviceManager.h:87
The SystemPointingDevice class is used to represent Pointing Devices connected to the computer...
Definition: SystemPointingDevice.h:28
void registerDevice(identifier key, PointingDeviceData *pdd)
Called from subclasses.
Definition: PointingDeviceManager.cpp:226
Definition: PointingDeviceManager.h:112
void addDeviceUpdateCallback(DeviceUpdateCallback callback, void *context)
Adds the callback function which is called when a device was added or removed.
Definition: PointingDeviceManager.cpp:154
void removeDeviceUpdateCallback(DeviceUpdateCallback callback, void *context)
Removes the callback function which is called when a device was added or removed. ...
Definition: PointingDeviceManager.cpp:160
size_t size() const
size
Definition: PointingDeviceManager.h:193
URI generalizeAny(const URI &anyURI) const
generalizeAny Remove all arguments from the given any: URI except for vendor vendor and product argum...
Definition: PointingDeviceManager.cpp:133
virtual void addPointingDevice(SystemPointingDevice *device)
Whenever there is a PointingDevice is created or deleted those methods are called internally from a S...
Definition: PointingDeviceManager.cpp:256
Definition: PointingDeviceManager.h:43
Definition: PointingDeviceManager.h:68