Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
pointing::PointingDeviceManager Class Referenceabstract

The PointingDeviceManager class is a helper class which enumerates the list of existing pointing devices. This class is a singleton which calls its platform-specific subclass constructor. More...

#include <PointingDeviceManager.h>

Inheritance diagram for pointing::PointingDeviceManager:
pointing::linuxPointingDeviceManager pointing::osxPointingDeviceManager pointing::winPointingDeviceManager

Classes

struct  PointingDeviceData
 

Public Member Functions

void addDeviceUpdateCallback (DeviceUpdateCallback callback, void *context)
 Adds the callback function which is called when a device was added or removed.
 
void removeDeviceUpdateCallback (DeviceUpdateCallback callback, void *context)
 Removes the callback function which is called when a device was added or removed.
 
URI anyToSpecific (const URI &anyURI) const
 anyToSpecific Converts a given URI into platform-specific unique URI More...
 
URI generalizeAny (const URI &anyURI) const
 generalizeAny Remove all arguments from the given any: URI except for vendor vendor and product arguments More...
 
size_t size () const
 size More...
 
PointingDescriptorIterator begin ()
 
PointingDescriptorIterator end ()
 

Static Public Member Functions

static PointingDeviceManagerget ()
 This static function is used to instantiate a platform-specific object of the class or return the already existing one.
 

Protected Types

typedef std::list
< SystemPointingDevice * > 
PointingList
 

Protected Member Functions

void callCallbackFunctions (PointingDeviceDescriptor &descriptor, bool wasAdded)
 
void addDescriptor (PointingDeviceDescriptor &descriptor)
 
void removeDescriptor (PointingDeviceDescriptor &descriptor)
 
void convertAnyCandidates ()
 
void matchCandidates ()
 
virtual void processMatching (PointingDeviceData *pdd, SystemPointingDevice *device)=0
 
void activateDevice (SystemPointingDevice *device, PointingDeviceData *pdd)
 
void printDeviceInfo (PointingDeviceData *pdd, bool add)
 
PointingDeviceDatafindDataForDevice (SystemPointingDevice *device)
 
void registerDevice (identifier key, PointingDeviceData *pdd)
 Called from subclasses. More...
 
bool unregisterDevice (identifier)
 Called from subclasses. More...
 
virtual void addPointingDevice (SystemPointingDevice *device)
 Whenever there is a PointingDevice is created or deleted those methods are called internally from a SystemPointingDevice.
 
virtual void removePointingDevice (SystemPointingDevice *device)
 Whenever there is a PointingDevice is created or deleted those methods are called internally from a SystemPointingDevice.
 

Protected Attributes

std::map< identifier,
PointingDeviceData * > 
devMap
 
DeviceUpdateCallback callback = NULL
 
PointingDescriptorSet descriptors
 
std::set< CallbackInfocallbackInfos
 
PointingList candidates
 
int debugLevel = 0
 

Static Protected Attributes

static PointingDeviceManagersingleManager = 0
 

Friends

class SystemPointingDevice
 

Detailed Description

The PointingDeviceManager class is a helper class which enumerates the list of existing pointing devices. This class is a singleton which calls its platform-specific subclass constructor.

Provides functionality to handle newly added or removed devices.

Member Function Documentation

URI pointing::PointingDeviceManager::anyToSpecific ( const URI &  anyURI) const

anyToSpecific Converts a given URI into platform-specific unique URI

Parameters
anyURIURI with any scheme
Returns
platform-specific URI
URI pointing::PointingDeviceManager::generalizeAny ( const URI &  anyURI) const

generalizeAny Remove all arguments from the given any: URI except for vendor vendor and product arguments

Parameters
anyURIURI with any scheme
Returns
URI with only vendor and product query arguments
void pointing::PointingDeviceManager::registerDevice ( identifier  key,
PointingDeviceData pdd 
)
protected

Called from subclasses.

Parameters
keyplatform-specific unique identifier
size_t pointing::PointingDeviceManager::size ( ) const
inline

size

Returns
The number of Pointing Devices
bool pointing::PointingDeviceManager::unregisterDevice ( identifier  key)
protected

Called from subclasses.

Parameters
keyplatform-specific unique identifier

The documentation for this class was generated from the following files: