Neonode zForce(TM) SDK
Device.h
Go to the documentation of this file.
1 
12 #if !defined(DEVICE_DEVICE_H) && !defined(CONTAINS_DEVICE)
13 
14 #ifndef ZFORCECOMMON_H
15  #error Please include "zForceCommon.h" before this file.
16 #endif // ZFORCECOMMON_H
17 
23 struct Device
24 {
25 #endif // !defined(DEVICE_DEVICE_H) && !defined(CONTAINS_DEVICE)
26 #if !defined(DEVICE_DEVICE_H) || defined(CONTAINS_DEVICE)
30  uint32_t DeviceIndex;
35 
44  void ( * Destructor)(Device * self);
45 #endif // !defined(DEVICE_DEVICE_H) || defined(CONTAINS_DEVICE)
46 #if !defined(DEVICE_DEVICE_H) && !defined(CONTAINS_DEVICE)
47 };
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif // __cplusplus
53 
68 DLLINTERNAL Device * Device_GetInstance (Connection * connection,
69  DeviceType deviceType,
70  uint32_t deviceIndex);
71 
88 DLLINTERNAL Device * Device_New (Connection * connection,
89  DeviceType deviceType,
90  uint32_t deviceIndex,
91  size_t size);
92 
93 #ifdef __cplusplus
94 }
95 #endif // __cplusplus
96 
97 // Violating Barr 4.2d but we have an exception.
98 #if defined(USE_PLATFORMDEVICE) || !defined(COMPILING_ZFORCE_SDK)
99  #include <PlatformDevice.h>
100 #endif // defined(USE_PLATFORMDEVICE) || !defined(COMPILING_ZFORCE_SDK)
101 
102 #if defined(USE_SENSORDEVICE) || !defined(COMPILING_ZFORCE_SDK)
103  #include <SensorDevice.h>
104 #endif // defined(USE_SENSORDEVICE) || !defined(COMPILING_ZFORCE_SDK)
105 
106 #if defined(USE_COREDEVICE) || !defined(COMPILING_ZFORCE_SDK)
107  #include <CoreDevice.h>
108 #endif // defined(USE_COREDEVICE) || !defined(COMPILING_ZFORCE_SDK)
109 
110 #if defined(USE_AIRDEVICE) || !defined(COMPILING_ZFORCE_SDK)
111  #include <AirDevice.h>
112 #endif // defined(USE_AIRDEVICE) || !defined(COMPILING_ZFORCE_SDK)
113 
114 #if defined(USE_PLUSDEVICE) || !defined(COMPILING_ZFORCE_SDK)
115  #include <PlusDevice.h>
116 #endif // defined(USE_PLUSDEVICE) || !defined(COMPILING_ZFORCE_SDK)
117 
118 #if defined(USE_LIGHTINGDEVICE) || !defined(COMPILING_ZFORCE_SDK)
119  #include <LightingDevice.h>
120 #endif // defined(USE_LIGHTINGDEVICE) || !defined(COMPILING_ZFORCE_SDK)
121 
122 #define DEVICE_DEVICE_H
123 #endif // !defined(DEVICE_DEVICE_H) && !defined(CONTAINS_DEVICE)
124 
Connection * Connection
The Connection this Device is part of.
Definition: Device.h:28
void * PrivateProtocolData
Private Protocol Data.
Definition: Device.h:34
DeviceType DeviceType
Which type of Device this is.
Definition: Device.h:29
The main Connection struct.
Definition: Connection.h:64
zForce * zForce
Pointer to zForce.
Definition: Device.h:27
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:30
Handles requests to the CoreDevice.
Device ** StorageDevices
Future: List of Storage Devices. Will change type during implementation.
Definition: Device.h:32
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:28
uint32_t NumberOfStorageDevices
Number of Storage Devices.
Definition: Device.h:33
DeviceType
Enum describing the different device types that exists.
Definition: zForceTypes.h:86
Handles requests to the PlatformDevice.
Brief Device base class.
Definition: Device.h:23
void(* Destructor)(Device *self)
Destructor.
Definition: Device.h:44