-
Notifications
You must be signed in to change notification settings - Fork 0
/
Environs.OSX.cpp
133 lines (101 loc) · 3.67 KB
/
Environs.OSX.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/**
* Environs OSX platform specific
* ------------------------------------------------------------------
* Copyright (c) Chi-Tai Dang
*
* @author Chi-Tai Dang
* @version 1.0
* @remarks
*
* This file is part of the Environs framework developed at the
* Lab for Human Centered Multimedia of the University of Augsburg.
* http://hcm-lab.de/environs
*
* Environ is free software; you can redistribute it and/or modify
* it under the terms of the Eclipse Public License v1.0.
* A copy of the license may be obtained at:
* http://www.eclipse.org/org/documents/epl-v10.html
* --------------------------------------------------------------------
*/
#include "stdafx.h"
/// Compiler flag that enables verbose debug output
#ifndef NDEBUG
//# define DEBUGVERB
//# define DEBUGVERBVerb
#endif
#include "Environs.OSX.h"
#include "Environs.Sensors.h"
#
#if defined(ENVIRONS_OSX)
#include "Environs.Obj.h"
// Releases should change installation directory to @executable_path/../../../
// The TAG for prepending to log messages
#define CLASS_NAME "Environs.OSX . . . . . ."
namespace environs
{
namespace API
{
/**
* Determine whether the given sensorType is available.
*
* @param sensorType A value of type environs::SensorType.
*
* @return success true = enabled, false = failed.
*/
bool IsSensorAvailableImpl ( int hInst, environs::SensorType_t sensorType )
{
return false;
}
/**
* Register to sensor events and listen to sensor data events.
* This implementation is platform specific and needs to be implemented
* in the particular platform layer.
*
* @param sensorType A value of type environs::SensorType.
*
*/
bool StartSensorListeningImpl ( int hInst, environs::SensorType_t sensorType, const char * sensorName )
{
//synchronized (sensorManager) {
switch ( sensorType )
{
case environs::SensorType::Accelerometer:
break;
case environs::SensorType::MagneticField:
break;
case environs::SensorType::Gyroscope:
break;
default:
break;
}
//}
return false;
}
/**
* Deregister to sensor events and stop listen to sensor data events.
* This implementation is platform specific and needs to be implemented
* in the particular platform layer.
*
* @param sensorType A value of type environs::SensorType.
*
*/
void StopSensorListeningImpl ( int hInst, environs::SensorType_t sensorType, const char * sensorName )
{
if (sensorType == -1) {
return;
}
switch ( sensorType )
{
case environs::SensorType::Accelerometer:
break;
case environs::SensorType::MagneticField:
break;
case environs::SensorType::Gyroscope:
break;
default:
break;
}
}
}
} /* namespace environs */
#endif