summaryrefslogtreecommitdiff
path: root/legacy/eeze
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2012-09-21 14:56:40 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2012-09-21 14:56:40 +0000
commitc35df671484240c3336ed9bb0361b6c0cd12eec8 (patch)
tree76af133348e5dc0c98799ac717565ccf82c7c0c7 /legacy/eeze
parent357cbb570cc8d64ba6afa7f30feca7097c56871d (diff)
eeze/sensor: Finally get right of eeze_sensor_handle_get
No longer needed as it only contains the modules information that will be used in the eeze_sensor core. All other important bits have found new homes in other data structures. SVN revision: 76969
Diffstat (limited to 'legacy/eeze')
-rw-r--r--legacy/eeze/src/lib/Eeze_Sensor.h8
-rw-r--r--legacy/eeze/src/lib/eeze_sensor.c18
2 files changed, 0 insertions, 26 deletions
diff --git a/legacy/eeze/src/lib/Eeze_Sensor.h b/legacy/eeze/src/lib/Eeze_Sensor.h
index 83556b6833..8abeabf7f8 100644
--- a/legacy/eeze/src/lib/Eeze_Sensor.h
+++ b/legacy/eeze/src/lib/Eeze_Sensor.h
@@ -224,14 +224,6 @@ EAPI Eina_Bool eeze_sensor_read(Eeze_Sensor_Obj *sens);
224EAPI Eina_Bool eeze_sensor_async_read(Eeze_Sensor_Obj *sens, void *user_data); 224EAPI Eina_Bool eeze_sensor_async_read(Eeze_Sensor_Obj *sens, void *user_data);
225 225
226/** 226/**
227 * @brief Helper function to access the sensor handle
228 * @return The sensor handle to operate on
229 *
230 * @since 1.8
231 */
232EAPI Eeze_Sensor *eeze_sensor_handle_get(void);
233
234/**
235 * @brief Fetch the sensor object by type from the sensor object list 227 * @brief Fetch the sensor object by type from the sensor object list
236 * @param type Sensor type to fetch from the list of sensor objects. 228 * @param type Sensor type to fetch from the list of sensor objects.
237 * @return The sensor object matching the given type 229 * @return The sensor object matching the given type
diff --git a/legacy/eeze/src/lib/eeze_sensor.c b/legacy/eeze/src/lib/eeze_sensor.c
index aee73d07b9..344552c441 100644
--- a/legacy/eeze/src/lib/eeze_sensor.c
+++ b/legacy/eeze/src/lib/eeze_sensor.c
@@ -18,12 +18,6 @@ static const char *_module_priority[] = {
18 NULL 18 NULL
19}; 19};
20 20
21EAPI Eeze_Sensor *
22eeze_sensor_handle_get(void)
23{
24 return g_handle;
25}
26
27Eeze_Sensor_Module * 21Eeze_Sensor_Module *
28_highest_priority_module_get(void) 22_highest_priority_module_get(void)
29{ 23{
@@ -124,12 +118,8 @@ EAPI Eeze_Sensor_Obj *
124eeze_sensor_new(Eeze_Sensor_Type type) 118eeze_sensor_new(Eeze_Sensor_Type type)
125{ 119{
126 Eeze_Sensor_Obj *sens; 120 Eeze_Sensor_Obj *sens;
127 Eeze_Sensor *handle;
128 Eeze_Sensor_Module *module = NULL; 121 Eeze_Sensor_Module *module = NULL;
129 122
130 handle = eeze_sensor_handle_get();
131 if (!handle) return NULL;
132
133 sens = calloc(1, sizeof(Eeze_Sensor_Obj)); 123 sens = calloc(1, sizeof(Eeze_Sensor_Obj));
134 if (!sens) return NULL; 124 if (!sens) return NULL;
135 125
@@ -207,14 +197,10 @@ eeze_sensor_timestamp_get(Eeze_Sensor_Obj *sens, unsigned long long *timestamp)
207EAPI Eina_Bool 197EAPI Eina_Bool
208eeze_sensor_read(Eeze_Sensor_Obj *sens) 198eeze_sensor_read(Eeze_Sensor_Obj *sens)
209{ 199{
210 Eeze_Sensor *handle = NULL;
211 Eeze_Sensor_Module *module = NULL; 200 Eeze_Sensor_Module *module = NULL;
212 201
213 if (!sens) return EINA_FALSE; 202 if (!sens) return EINA_FALSE;
214 203
215 handle = eeze_sensor_handle_get();
216 if (!handle) return EINA_FALSE;
217
218 module = _highest_priority_module_get(); 204 module = _highest_priority_module_get();
219 if (!module) return EINA_FALSE; 205 if (!module) return EINA_FALSE;
220 206
@@ -228,10 +214,6 @@ EAPI Eina_Bool
228eeze_sensor_async_read(Eeze_Sensor_Obj *sens, void *user_data) 214eeze_sensor_async_read(Eeze_Sensor_Obj *sens, void *user_data)
229{ 215{
230 Eeze_Sensor_Module *module = NULL; 216 Eeze_Sensor_Module *module = NULL;
231 Eeze_Sensor *handle = NULL;
232
233 handle = eeze_sensor_handle_get();
234 if (!handle) return EINA_FALSE;
235 217
236 module = _highest_priority_module_get(); 218 module = _highest_priority_module_get();
237 if (!module) return EINA_FALSE; 219 if (!module) return EINA_FALSE;