summaryrefslogtreecommitdiff
path: root/src/modules/eeze
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-04-03 16:48:00 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-04-03 17:14:20 +0100
commit98806b17e2b9efc5a8e58630aa0d5b12a2dcf39e (patch)
tree53271aae05f47da54c2c810653a4f04c34c4a894 /src/modules/eeze
parentf5b322a824967c8385c6c730895a2b0ba37790be (diff)
eeze/sensor/tizen: Big update to support all new tizen sensor types.
This needs quite soem testing but it should copver all new sensors now.
Diffstat (limited to 'src/modules/eeze')
-rw-r--r--src/modules/eeze/sensor/tizen/tizen.c467
1 files changed, 461 insertions, 6 deletions
diff --git a/src/modules/eeze/sensor/tizen/tizen.c b/src/modules/eeze/sensor/tizen/tizen.c
index 603cc7b0f5..50cabaee2b 100644
--- a/src/modules/eeze/sensor/tizen/tizen.c
+++ b/src/modules/eeze/sensor/tizen/tizen.c
@@ -36,6 +36,15 @@ eeze_to_tizen(Eeze_Sensor_Type type)
36 case EEZE_SENSOR_TYPE_ACCELEROMETER: 36 case EEZE_SENSOR_TYPE_ACCELEROMETER:
37 return SENSOR_ACCELEROMETER; 37 return SENSOR_ACCELEROMETER;
38 38
39 case EEZE_SENSOR_TYPE_GRAVITY:
40 return SENSOR_GRAVITY;
41
42 case EEZE_SENSOR_TYPE_LINEAR_ACCELERATION:
43 return SENSOR_LINEAR_ACCELERATION;
44
45 case EEZE_SENSOR_TYPE_DEVICE_ORIENTATION:
46 return SENSOR_DEVICE_ORIENTATION;
47
39 case EEZE_SENSOR_TYPE_MAGNETIC: 48 case EEZE_SENSOR_TYPE_MAGNETIC:
40 return SENSOR_MAGNETIC; 49 return SENSOR_MAGNETIC;
41 50
@@ -63,9 +72,24 @@ eeze_to_tizen(Eeze_Sensor_Type type)
63 case EEZE_SENSOR_TYPE_MOTION_PANNING: 72 case EEZE_SENSOR_TYPE_MOTION_PANNING:
64 return SENSOR_MOTION_PANNING; 73 return SENSOR_MOTION_PANNING;
65 74
75 case EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE:
76 return SENSOR_MOTION_PANNING_BROWSE;
77
78 case EEZE_SENSOR_TYPE_MOTION_TILT:
79 return SENSOR_MOTION_TILT;
80
66 case EEZE_SENSOR_TYPE_MOTION_FACEDOWN: 81 case EEZE_SENSOR_TYPE_MOTION_FACEDOWN:
67 return SENSOR_MOTION_FACEDOWN; 82 return SENSOR_MOTION_FACEDOWN;
68 83
84 case EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL:
85 return SENSOR_MOTION_DIRECTCALL;
86
87 case EEZE_SENSOR_TYPE_MOTION_SMART_ALERT:
88 return SENSOR_MOTION_SMART_ALERT;
89
90 case EEZE_SENSOR_TYPE_MOTION_NO_MOVE:
91 return SENSOR_MOTION_NO_MOVE;
92
69 default: 93 default:
70 ERR("No matching Tizen sensor type available."); 94 ERR("No matching Tizen sensor type available.");
71 return -1; 95 return -1;
@@ -102,6 +126,67 @@ accelerometer_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy,
102} 126}
103 127
104void 128void
129gravity_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
130{
131 Eeze_Sensor_Obj *obj = NULL;
132
133 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_GRAVITY);
134 if (obj == NULL)
135 {
136 ERR("No matching sensor object found in list.");
137 return;
138 }
139 obj->accuracy = accuracy;
140 obj->data[0] = x;
141 obj->data[1] = y;
142 obj->data[2] = z;
143 obj->timestamp = timestamp;
144 ecore_event_add(EEZE_SENSOR_EVENT_GRAVITY, obj, NULL, NULL);
145 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_GRAVITY));
146}
147
148void
149linear_acceleration_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
150{
151 Eeze_Sensor_Obj *obj = NULL;
152
153 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_LINEAR_ACCELERATION);
154 if (obj == NULL)
155 {
156 ERR("No matching sensor object found in list.");
157 return;
158 }
159 obj->accuracy = accuracy;
160 obj->data[0] = x;
161 obj->data[1] = y;
162 obj->data[2] = z;
163 obj->timestamp = timestamp;
164 ecore_event_add(EEZE_SENSOR_EVENT_LINEAR_ACCELERATION, obj, NULL, NULL);
165 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_LINEAR_ACCELERATION));
166}
167
168void
169device_orientation_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float yaw,
170 float pitch, float roll, void *user_data)
171{
172 Eeze_Sensor_Obj *obj = NULL;
173
174 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_DEVICE_ORIENTATION);
175 if (obj == NULL)
176 {
177 ERR("No matching sensor object found in list.");
178 return;
179 }
180 obj->accuracy = accuracy;
181 obj->data[0] = yaw;
182 obj->data[1] = pitch;
183 obj->data[2] = roll;
184 obj->timestamp = timestamp;
185 ecore_event_add(EEZE_SENSOR_EVENT_DEVICE_ORIENTATION, obj, NULL, NULL);
186 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_DEVICE_ORIENTATION));
187}
188
189void
105magnetic_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data) 190magnetic_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
106{ 191{
107 Eeze_Sensor_Obj *obj = NULL; 192 Eeze_Sensor_Obj *obj = NULL;
@@ -258,6 +343,46 @@ panning_cb(unsigned long long timestamp, int x, int y, void *user_data)
258} 343}
259 344
260void 345void
346panning_browse_cb(unsigned long long timestamp, int x, int y, void *user_data)
347{
348 Eeze_Sensor_Obj *obj = NULL;
349
350 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE);
351 if (obj == NULL)
352 {
353 ERR("No matching sensor object found in list.");
354 return;
355 }
356 /* We have to set this ourselves because we don't get it for this type */
357 obj->accuracy = -1;
358 obj->data[0] = x;
359 obj->data[1] = y;
360 obj->timestamp = timestamp;
361 ecore_event_add(EEZE_SENSOR_EVENT_PANNING_BROWSE, obj, NULL, NULL);
362 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE));
363}
364
365void
366tilt_cb(unsigned long long timestamp, int x, int y, void *user_data)
367{
368 Eeze_Sensor_Obj *obj = NULL;
369
370 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_TILT);
371 if (obj == NULL)
372 {
373 ERR("No matching sensor object found in list.");
374 return;
375 }
376 /* We have to set this ourselves because we don't get it for this type */
377 obj->accuracy = -1;
378 obj->data[0] = x;
379 obj->data[1] = y;
380 obj->timestamp = timestamp;
381 ecore_event_add(EEZE_SENSOR_EVENT_TILT, obj, NULL, NULL);
382 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_TILT));
383}
384
385void
261facedown_cb(unsigned long long timestamp, void *user_data) 386facedown_cb(unsigned long long timestamp, void *user_data)
262{ 387{
263 Eeze_Sensor_Obj *obj = NULL; 388 Eeze_Sensor_Obj *obj = NULL;
@@ -278,6 +403,66 @@ facedown_cb(unsigned long long timestamp, void *user_data)
278} 403}
279 404
280void 405void
406directcall_cb(unsigned long long timestamp, void *user_data)
407{
408 Eeze_Sensor_Obj *obj = NULL;
409
410 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL);
411 if (obj == NULL)
412 {
413 ERR("No matching sensor object found in list.");
414 return;
415 }
416 /* We have to set this ourselves because we don't get it for this type */
417 obj->accuracy = -1;
418 obj->timestamp = timestamp;
419 ecore_event_add(EEZE_SENSOR_EVENT_DIRECT_CALL, obj, NULL, NULL);
420 /* We are not stopping the sensor here because we want to keep it as a motion
421 * event coming in at any time.
422 */
423}
424
425void
426smart_alert_cb(unsigned long long timestamp, void *user_data)
427{
428 Eeze_Sensor_Obj *obj = NULL;
429
430 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_SMART_ALERT);
431 if (obj == NULL)
432 {
433 ERR("No matching sensor object found in list.");
434 return;
435 }
436 /* We have to set this ourselves because we don't get it for this type */
437 obj->accuracy = -1;
438 obj->timestamp = timestamp;
439 ecore_event_add(EEZE_SENSOR_EVENT_SMART_ALERT, obj, NULL, NULL);
440 /* We are not stopping the sensor here because we want to keep it as a motion
441 * event coming in at any time.
442 */
443}
444
445void
446no_move_cb(unsigned long long timestamp, void *user_data)
447{
448 Eeze_Sensor_Obj *obj = NULL;
449
450 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_NO_MOVE);
451 if (obj == NULL)
452 {
453 ERR("No matching sensor object found in list.");
454 return;
455 }
456 /* We have to set this ourselves because we don't get it for this type */
457 obj->accuracy = -1;
458 obj->timestamp = timestamp;
459 ecore_event_add(EEZE_SENSOR_EVENT_NO_MOVE, obj, NULL, NULL);
460 /* We are not stopping the sensor here because we want to keep it as a motion
461 * event coming in at any time.
462 */
463}
464
465void
281doubletap_cb(unsigned long long timestamp, void *user_data) 466doubletap_cb(unsigned long long timestamp, void *user_data)
282{ 467{
283 Eeze_Sensor_Obj *obj = NULL; 468 Eeze_Sensor_Obj *obj = NULL;
@@ -320,6 +505,73 @@ accelerometer_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accur
320} 505}
321 506
322void 507void
508gravity_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
509{
510 Eeze_Sensor_Obj *obj = NULL;
511
512 sensor_gravity_unset_cb(sensor_handle);
513
514 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_GRAVITY);
515 if (obj == NULL)
516 {
517 ERR("No matching sensor object found in list.");
518 return;
519 }
520 obj->accuracy = accuracy;
521 obj->data[0] = x;
522 obj->data[1] = y;
523 obj->data[2] = z;
524 obj->timestamp = timestamp;
525 ecore_event_add(EEZE_SENSOR_EVENT_GRAVITY, obj, NULL, NULL);
526 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_GRAVITY));
527}
528
529void
530linear_acceleration_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
531{
532 Eeze_Sensor_Obj *obj = NULL;
533
534 sensor_linear_acceleration_unset_cb(sensor_handle);
535
536 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_LINEAR_ACCELERATION);
537 if (obj == NULL)
538 {
539 ERR("No matching sensor object found in list.");
540 return;
541 }
542 obj->accuracy = accuracy;
543 obj->data[0] = x;
544 obj->data[1] = y;
545 obj->data[2] = z;
546 obj->timestamp = timestamp;
547 ecore_event_add(EEZE_SENSOR_EVENT_LINEAR_ACCELERATION, obj, NULL, NULL);
548 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_LINEAR_ACCELERATION));
549}
550
551void
552device_orientation_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float yaw,
553 float pitch, float roll, void *user_data)
554{
555 Eeze_Sensor_Obj *obj = NULL;
556
557 sensor_device_orientation_unset_cb(sensor_handle);
558
559 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_DEVICE_ORIENTATION);
560 if (obj == NULL)
561 {
562 ERR("No matching sensor object found in list.");
563 return;
564 }
565 obj->accuracy = accuracy;
566 obj->data[0] = yaw;
567 obj->data[1] = pitch;
568 obj->data[2] = roll;
569 obj->timestamp = timestamp;
570 ecore_event_add(EEZE_SENSOR_EVENT_DEVICE_ORIENTATION, obj, NULL, NULL);
571 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_DEVICE_ORIENTATION));
572}
573
574void
323magnetic_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data) 575magnetic_read_cb(unsigned long long timestamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void *user_data)
324{ 576{
325 Eeze_Sensor_Obj *obj = NULL; 577 Eeze_Sensor_Obj *obj = NULL;
@@ -470,6 +722,26 @@ shake_read_cb(unsigned long long timestamp, sensor_motion_shake_e shake, void *u
470} 722}
471 723
472void 724void
725doubletap_read_cb(unsigned long long timestamp, void *user_data)
726{
727 Eeze_Sensor_Obj *obj = NULL;
728
729 sensor_motion_doubletap_unset_cb(sensor_handle);
730
731 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_DOUBLETAP);
732 if (obj == NULL)
733 {
734 ERR("No matching sensor object found in list.");
735 return;
736 }
737 /* We have to set this ourselves because we don't get it for this type */
738 obj->accuracy = -1;
739 obj->timestamp = timestamp;
740 ecore_event_add(EEZE_SENSOR_EVENT_DOUBLETAP, obj, NULL, NULL);
741 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_DOUBLETAP));
742}
743
744void
473panning_read_cb(unsigned long long timestamp, int x, int y, void *user_data) 745panning_read_cb(unsigned long long timestamp, int x, int y, void *user_data)
474{ 746{
475 Eeze_Sensor_Obj *obj = NULL; 747 Eeze_Sensor_Obj *obj = NULL;
@@ -492,6 +764,50 @@ panning_read_cb(unsigned long long timestamp, int x, int y, void *user_data)
492} 764}
493 765
494void 766void
767panning_browse_read_cb(unsigned long long timestamp, int x, int y, void *user_data)
768{
769 Eeze_Sensor_Obj *obj = NULL;
770
771 sensor_motion_panning_browse_unset_cb(sensor_handle);
772
773 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE);
774 if (obj == NULL)
775 {
776 ERR("No matching sensor object found in list.");
777 return;
778 }
779 /* We have to set this ourselves because we don't get it for this type */
780 obj->accuracy = -1;
781 obj->data[0] = x;
782 obj->data[1] = y;
783 obj->timestamp = timestamp;
784 ecore_event_add(EEZE_SENSOR_EVENT_PANNING_BROWSE, obj, NULL, NULL);
785 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE));
786}
787
788void
789tilt_read_cb(unsigned long long timestamp, int x, int y, void *user_data)
790{
791 Eeze_Sensor_Obj *obj = NULL;
792
793 sensor_motion_tilt_unset_cb(sensor_handle);
794
795 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_TILT);
796 if (obj == NULL)
797 {
798 ERR("No matching sensor object found in list.");
799 return;
800 }
801 /* We have to set this ourselves because we don't get it for this type */
802 obj->accuracy = -1;
803 obj->data[0] = x;
804 obj->data[1] = y;
805 obj->timestamp = timestamp;
806 ecore_event_add(EEZE_SENSOR_EVENT_TILT, obj, NULL, NULL);
807 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_TILT));
808}
809
810void
495facedown_read_cb(unsigned long long timestamp, void *user_data) 811facedown_read_cb(unsigned long long timestamp, void *user_data)
496{ 812{
497 Eeze_Sensor_Obj *obj = NULL; 813 Eeze_Sensor_Obj *obj = NULL;
@@ -512,13 +828,13 @@ facedown_read_cb(unsigned long long timestamp, void *user_data)
512} 828}
513 829
514void 830void
515doubletap_read_cb(unsigned long long timestamp, void *user_data) 831directcall_read_cb(unsigned long long timestamp, void *user_data)
516{ 832{
517 Eeze_Sensor_Obj *obj = NULL; 833 Eeze_Sensor_Obj *obj = NULL;
518 834
519 sensor_motion_doubletap_unset_cb(sensor_handle); 835 sensor_motion_directcall_unset_cb(sensor_handle);
520 836
521 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_DOUBLETAP); 837 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL);
522 if (obj == NULL) 838 if (obj == NULL)
523 { 839 {
524 ERR("No matching sensor object found in list."); 840 ERR("No matching sensor object found in list.");
@@ -527,8 +843,48 @@ doubletap_read_cb(unsigned long long timestamp, void *user_data)
527 /* We have to set this ourselves because we don't get it for this type */ 843 /* We have to set this ourselves because we don't get it for this type */
528 obj->accuracy = -1; 844 obj->accuracy = -1;
529 obj->timestamp = timestamp; 845 obj->timestamp = timestamp;
530 ecore_event_add(EEZE_SENSOR_EVENT_DOUBLETAP, obj, NULL, NULL); 846 ecore_event_add(EEZE_SENSOR_EVENT_DIRECT_CALL, obj, NULL, NULL);
531 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_DOUBLETAP)); 847 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL));
848}
849
850void
851smart_alert_read_cb(unsigned long long timestamp, void *user_data)
852{
853 Eeze_Sensor_Obj *obj = NULL;
854
855 sensor_motion_smart_alert_unset_cb(sensor_handle);
856
857 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_SMART_ALERT);
858 if (obj == NULL)
859 {
860 ERR("No matching sensor object found in list.");
861 return;
862 }
863 /* We have to set this ourselves because we don't get it for this type */
864 obj->accuracy = -1;
865 obj->timestamp = timestamp;
866 ecore_event_add(EEZE_SENSOR_EVENT_SMART_ALERT, obj, NULL, NULL);
867 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_SMART_ALERT));
868}
869
870void
871no_move_read_cb(unsigned long long timestamp, void *user_data)
872{
873 Eeze_Sensor_Obj *obj = NULL;
874
875 sensor_motion_no_move_unset_cb(sensor_handle);
876
877 obj = eeze_sensor_obj_get(EEZE_SENSOR_TYPE_MOTION_NO_MOVE);
878 if (obj == NULL)
879 {
880 ERR("No matching sensor object found in list.");
881 return;
882 }
883 /* We have to set this ourselves because we don't get it for this type */
884 obj->accuracy = -1;
885 obj->timestamp = timestamp;
886 ecore_event_add(EEZE_SENSOR_EVENT_NO_MOVE, obj, NULL, NULL);
887 sensor_stop(sensor_handle, eeze_to_tizen(EEZE_SENSOR_TYPE_MOTION_NO_MOVE));
532} 888}
533 889
534/* Synchronous read function for sensor data. It uses the blocking calls to read 890/* Synchronous read function for sensor data. It uses the blocking calls to read
@@ -541,7 +897,7 @@ eeze_sensor_tizen_read(Eeze_Sensor_Type sensor_type, Eeze_Sensor_Obj *lobj)
541{ 897{
542 sensor_data_accuracy_e accuracy; 898 sensor_data_accuracy_e accuracy;
543 float x, y, z; 899 float x, y, z;
544 float azimuth, pitch, roll, lux, distance; 900 float azimuth, pitch, roll, lux, distance, yaw;
545 bool supported; 901 bool supported;
546 sensor_type_e type; 902 sensor_type_e type;
547 Eeze_Sensor_Obj *obj; 903 Eeze_Sensor_Obj *obj;
@@ -577,6 +933,33 @@ eeze_sensor_tizen_read(Eeze_Sensor_Type sensor_type, Eeze_Sensor_Obj *lobj)
577 obj->timestamp = 0; 933 obj->timestamp = 0;
578 break; 934 break;
579 935
936 case SENSOR_GRAVITY:
937 sensor_gravity_read_data(sensor_handle, &accuracy, &x, &y, &z);
938 obj->accuracy = accuracy;
939 obj->data[0] = x;
940 obj->data[1] = y;
941 obj->data[2] = z;
942 obj->timestamp = 0;
943 break;
944
945 case SENSOR_LINEAR_ACCELERATION:
946 sensor_linear_acceleration_read_data(sensor_handle, &accuracy, &x, &y, &z);
947 obj->accuracy = accuracy;
948 obj->data[0] = x;
949 obj->data[1] = y;
950 obj->data[2] = z;
951 obj->timestamp = 0;
952 break;
953
954 case SENSOR_DEVICE_ORIENTATION:
955 sensor_device_orientation_read_data(sensor_handle, &accuracy, &yaw, &pitch, &roll);
956 obj->accuracy = accuracy;
957 obj->data[0] = yaw;
958 obj->data[1] = pitch;
959 obj->data[2] = roll;
960 obj->timestamp = 0;
961 break;
962
580 case SENSOR_MAGNETIC: 963 case SENSOR_MAGNETIC:
581 sensor_magnetic_read_data(sensor_handle, &accuracy, &x, &y, &z); 964 sensor_magnetic_read_data(sensor_handle, &accuracy, &x, &y, &z);
582 obj->accuracy = accuracy; 965 obj->accuracy = accuracy;
@@ -651,6 +1034,18 @@ eeze_sensor_tizen_cb_set(Eeze_Sensor *handle, Eeze_Sensor_Type sensor_type, void
651 sensor_accelerometer_set_cb(sensor_handle, 0, accelerometer_cb, handle); 1034 sensor_accelerometer_set_cb(sensor_handle, 0, accelerometer_cb, handle);
652 break; 1035 break;
653 1036
1037 case SENSOR_GRAVITY:
1038 sensor_gravity_set_cb(sensor_handle, 0, gravity_cb, handle);
1039 break;
1040
1041 case SENSOR_LINEAR_ACCELERATION:
1042 sensor_linear_acceleration_set_cb(sensor_handle, 0, linear_acceleration_cb, handle);
1043 break;
1044
1045 case SENSOR_DEVICE_ORIENTATION:
1046 sensor_device_orientation_set_cb(sensor_handle, 0, device_orientation_cb, handle);
1047 break;
1048
654 case SENSOR_MAGNETIC: 1049 case SENSOR_MAGNETIC:
655 sensor_magnetic_set_cb(sensor_handle, 0, magnetic_cb, handle); 1050 sensor_magnetic_set_cb(sensor_handle, 0, magnetic_cb, handle);
656 break; 1051 break;
@@ -679,10 +1074,38 @@ eeze_sensor_tizen_cb_set(Eeze_Sensor *handle, Eeze_Sensor_Type sensor_type, void
679 sensor_motion_shake_set_cb(sensor_handle, shake_cb, handle); 1074 sensor_motion_shake_set_cb(sensor_handle, shake_cb, handle);
680 break; 1075 break;
681 1076
1077 case SENSOR_MOTION_DOUBLETAP:
1078 sensor_motion_doubletap_set_cb(sensor_handle, doubletap_cb, handle);
1079 break;
1080
682 case SENSOR_MOTION_PANNING: 1081 case SENSOR_MOTION_PANNING:
683 sensor_motion_panning_set_cb(sensor_handle, panning_cb, handle); 1082 sensor_motion_panning_set_cb(sensor_handle, panning_cb, handle);
684 break; 1083 break;
685 1084
1085 case SENSOR_MOTION_PANNING_BROWSE:
1086 sensor_motion_panning_browse_set_cb(sensor_handle, panning_browse_cb, handle);
1087 break;
1088
1089 case SENSOR_MOTION_TILT:
1090 sensor_motion_tilt_set_cb(sensor_handle, tilt_cb, handle);
1091 break;
1092
1093 case SENSOR_MOTION_FACEDOWN:
1094 sensor_motion_facedown_set_cb(sensor_handle, facedown_cb, handle);
1095 break;
1096
1097 case SENSOR_MOTION_DIRECTCALL:
1098 sensor_motion_directcall_set_cb(sensor_handle, directcall_cb, handle);
1099 break;
1100
1101 case SENSOR_MOTION_SMART_ALERT:
1102 sensor_motion_smart_alert_set_cb(sensor_handle, smart_alert_cb, handle);
1103 break;
1104
1105 case SENSOR_MOTION_NO_MOVE:
1106 sensor_motion_no_move_set_cb(sensor_handle, no_move_cb, handle);
1107 break;
1108
686 default: 1109 default:
687 ERR("Not possible to set a callback for this sensor type."); 1110 ERR("Not possible to set a callback for this sensor type.");
688 return EINA_FALSE; 1111 return EINA_FALSE;
@@ -712,6 +1135,18 @@ eeze_sensor_tizen_async_read(Eeze_Sensor_Type sensor_type, void *user_data)
712 sensor_accelerometer_set_cb(sensor_handle, 0, accelerometer_read_cb, NULL); 1135 sensor_accelerometer_set_cb(sensor_handle, 0, accelerometer_read_cb, NULL);
713 break; 1136 break;
714 1137
1138 case SENSOR_GRAVITY:
1139 sensor_gravity_set_cb(sensor_handle, 0, gravity_read_cb, NULL);
1140 break;
1141
1142 case SENSOR_LINEAR_ACCELERATION:
1143 sensor_linear_acceleration_set_cb(sensor_handle, 0, linear_acceleration_read_cb, NULL);
1144 break;
1145
1146 case SENSOR_DEVICE_ORIENTATION:
1147 sensor_device_orientation_set_cb(sensor_handle, 0, device_orientation_read_cb, NULL);
1148 break;
1149
715 case SENSOR_MAGNETIC: 1150 case SENSOR_MAGNETIC:
716 sensor_magnetic_set_cb(sensor_handle, 0, magnetic_read_cb, NULL); 1151 sensor_magnetic_set_cb(sensor_handle, 0, magnetic_read_cb, NULL);
717 break; 1152 break;
@@ -748,10 +1183,30 @@ eeze_sensor_tizen_async_read(Eeze_Sensor_Type sensor_type, void *user_data)
748 sensor_motion_panning_set_cb(sensor_handle, panning_read_cb, NULL); 1183 sensor_motion_panning_set_cb(sensor_handle, panning_read_cb, NULL);
749 break; 1184 break;
750 1185
1186 case SENSOR_MOTION_PANNING_BROWSE:
1187 sensor_motion_panning_browse_set_cb(sensor_handle, panning_browse_read_cb, NULL);
1188 break;
1189
1190 case SENSOR_MOTION_TILT:
1191 sensor_motion_tilt_set_cb(sensor_handle, tilt_read_cb, NULL);
1192 break;
1193
751 case SENSOR_MOTION_FACEDOWN: 1194 case SENSOR_MOTION_FACEDOWN:
752 sensor_motion_facedown_set_cb(sensor_handle, facedown_read_cb, NULL); 1195 sensor_motion_facedown_set_cb(sensor_handle, facedown_read_cb, NULL);
753 break; 1196 break;
754 1197
1198 case SENSOR_MOTION_DIRECTCALL:
1199 sensor_motion_directcall_set_cb(sensor_handle, directcall_read_cb, NULL);
1200 break;
1201
1202 case SENSOR_MOTION_SMART_ALERT:
1203 sensor_motion_smart_alert_set_cb(sensor_handle, smart_alert_read_cb, NULL);
1204 break;
1205
1206 case SENSOR_MOTION_NO_MOVE:
1207 sensor_motion_no_move_set_cb(sensor_handle, no_move_read_cb, NULL);
1208 break;
1209
755 default: 1210 default:
756 ERR("Not possible to set a callback for this sensor type."); 1211 ERR("Not possible to set a callback for this sensor type.");
757 return EINA_FALSE; 1212 return EINA_FALSE;