~charlesk/platform-api/lp-1216473

« back to all changes in this revision

Viewing changes to include/ubuntu/application/sensors/proximity.h

  • Committer: Tarmac
  • Author(s): Thomas Voß, thomas-voss
  • Date: 2013-08-22 16:29:26 UTC
  • mfrom: (118.2.7 location-service)
  • Revision ID: tarmac-20130822162926-0rrcoj4962tri7mx
Reimplement location submodule on top of location-service.

Approved by Ricardo Salveti, PS Jenkins bot, Michael Frey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define UBUNTU_APPLICATION_SENSORS_PROXIMITY_H_
21
21
 
22
22
#include <ubuntu/status.h>
 
23
#include <ubuntu/visibility.h>
 
24
 
23
25
#include <ubuntu/application/sensors/event/proximity.h>
24
26
 
25
27
#ifdef __cplusplus
44
46
     * \ingroup sensor_access
45
47
     * \returns A new instance or NULL in case of errors.
46
48
     */
47
 
    UASensorsProximity*
 
49
    UBUNTU_DLL_PUBLIC UASensorsProximity*
48
50
    ua_sensors_proximity_new();
49
51
 
50
52
    /**
53
55
     * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
54
56
     * \param[in] sensor The sensor instance to be enabled.
55
57
     */
56
 
    UStatus
 
58
    UBUNTU_DLL_PUBLIC UStatus
57
59
    ua_sensors_proximity_enable(
58
60
        UASensorsProximity* sensor);
59
61
 
63
65
     * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
64
66
     * \param[in] sensor The sensor instance to be disabled.
65
67
     */
66
 
    UStatus
 
68
    UBUNTU_DLL_PUBLIC UStatus
67
69
    ua_sensors_proximity_disable(
68
70
        UASensorsProximity* sensor);
69
71
 
73
75
     * \returns The minimum delay between two readings in [ms].
74
76
     * \param[in] sensor The sensor instance to be queried.
75
77
     */
76
 
    uint32_t
 
78
    UBUNTU_DLL_PUBLIC uint32_t
77
79
    ua_sensors_proximity_get_min_delay(
78
80
        UASensorsProximity* sensor);
79
81
 
83
85
     * \returns The minimum value that can be reported by the sensor.
84
86
     * \param[in] sensor The sensor instance to be queried.
85
87
     */
86
 
    float
 
88
    UBUNTU_DLL_PUBLIC float
87
89
    ua_sensors_proximity_get_min_value(
88
90
        UASensorsProximity* sensor);
89
91
 
93
95
     * \returns The maximum value that can be reported by the sensor.
94
96
     * \param[in] sensor The sensor instance to be queried.
95
97
     */
96
 
    float
 
98
    UBUNTU_DLL_PUBLIC float
97
99
    ua_sensors_proximity_get_max_value(
98
100
        UASensorsProximity* sensor);
99
101
 
103
105
     * \returns The numeric resolution supported by the sensor.
104
106
     * \param[in] sensor The sensor instance to be queried.
105
107
     */
106
 
    float
 
108
    UBUNTU_DLL_PUBLIC float
107
109
    ua_sensors_proximity_get_resolution(
108
110
        UASensorsProximity* sensor);
109
111
 
114
116
     * \param[in] cb The callback to be invoked.
115
117
     * \param[in] ctx The context supplied to the callback invocation.
116
118
     */
117
 
    void
 
119
    UBUNTU_DLL_PUBLIC void
118
120
    ua_sensors_proximity_set_reading_cb(
119
121
        UASensorsProximity* sensor,
120
122
        on_proximity_event_cb cb,