Neonode zForce(TM) SDK
Device.h
Go to the documentation of this file.
1 
12 #ifndef DEVICE_DEVICE_H
13 #define DEVICE_DEVICE_H
14 
15 #ifndef ZFORCECOMMON_H
16  #error Please include "zForceCommon.h" before this file.
17 #endif // ZFORCECOMMON_H
18 
24 struct Device
25 {
28  DeviceType DeviceType;
29  uint32_t DeviceIndex;
34 
43  void ( * Destructor)(Device * self);
44 };
45 
60 DLLINTERNAL Device * Device_GetInstance (Connection * connection,
61  DeviceType deviceType,
62  uint32_t deviceIndex);
63 
78 DLLINTERNAL Device * Device_New (Connection * connection,
79  DeviceType deviceType,
80  uint32_t deviceIndex,
81  size_t size);
82 
83 // Violating Barr 4.2d but we have an exception.
84 #if defined(USE_PLATFORMDEVICE) || !defined(COMPILING_ZFORCE_SDK)
85  #include <PlatformDevice.h>
86 #endif // defined(USE_PLATFORMDEVICE) || !defined(COMPILING_ZFORCE_SDK)
87 
88 #if defined(USE_SENSORDEVICE) || !defined(COMPILING_ZFORCE_SDK)
89  #include <SensorDevice.h>
90 #endif // defined(USE_SENSORDEVICE) || !defined(COMPILING_ZFORCE_SDK)
91 
92 #if defined(USE_COREDEVICE) || !defined(COMPILING_ZFORCE_SDK)
93  #include <CoreDevice.h>
94 #endif // defined(USE_COREDEVICE) || !defined(COMPILING_ZFORCE_SDK)
95 
96 #if defined(USE_AIRDEVICE) || !defined(COMPILING_ZFORCE_SDK)
97  #include <AirDevice.h>
98 #endif // defined(USE_AIRDEVICE) || !defined(COMPILING_ZFORCE_SDK)
99 
100 #if defined(USE_PLUSDEVICE) || !defined(COMPILING_ZFORCE_SDK)
101  #include <PlusDevice.h>
102 #endif // defined(USE_PLUSDEVICE) || !defined(COMPILING_ZFORCE_SDK)
103 
104 #if defined(USE_LIGHTINGDEVICE) || !defined(COMPILING_ZFORCE_SDK)
105  #include <LightingDevice.h>
106 #endif // defined(USE_LIGHTINGDEVICE) || !defined(COMPILING_ZFORCE_SDK)
107 
108 #endif // DEVICE_DEVICE_H
109 
Connection * Connection
The Connection this Device is part of.
Definition: Device.h:27
void * PrivateProtocolData
Private Protocol Data.
Definition: Device.h:33
DeviceType DeviceType
Which type of Device this is.
Definition: Device.h:28
The main Connection struct.
Definition: Connection.h:43
zForce * zForce
Pointer to zForce.
Definition: Device.h:26
Handles requests to the LightingDevice.
DLLINTERNAL Device * Device_New(Connection *connection, DeviceType deviceType, uint32_t deviceIndex, size_t size)
Internal call used only by Device and subclasses to create a new base Device.
uint32_t DeviceIndex
Definition: Device.h:29
Handles requests to the CoreDevice.
Device ** StorageDevices
Future: List of Storage Devices. Will change type during implementation.
Definition: Device.h:31
Handles requests to the PlusDevice.
DLLINTERNAL Device * Device_GetInstance(Connection *connection, DeviceType deviceType, uint32_t deviceIndex)
Internal call to get a new Device with the specified Type and Index.
Handles requests to the AirDevice.
Handles requests to the SensorDevice, a meta device.
Main struct.
Definition: zForce.h:29
uint32_t NumberOfStorageDevices
Number of Storage Devices.
Definition: Device.h:32
Handles requests to the PlatformDevice.
Brief Device base class.
Definition: Device.h:24
void(* Destructor)(Device *self)
Destructor.
Definition: Device.h:43