* @param[out] sensor count the count of sensors contained in the list.
* @return true on success, otherwise false.
*/
-bool sensord_get_sensor_list(sensor_type_t type, sensor_t **list, int *sensor_count);
+__attribute__ ((visibility("default"))) bool sensord_get_sensor_list(sensor_type_t type, sensor_t **list, int *sensor_count);
/**
* @brief Get the default sensor for a given type.
* @param[in] type the type of a sensor requested.
* @return the default sensor matching the asked type on success, otherwise NULL.
*/
-sensor_t sensord_get_sensor(sensor_type_t type);
+__attribute__ ((visibility("default"))) sensor_t sensord_get_sensor(sensor_type_t type);
/**
* @brief Get the list of available sensors of a certain type, use ALL_SENSOR to get all the sensors.
* @retval -EACCES Permission denied
* @retval -ENODATA NO sensor available
*/
-int sensord_get_sensors(sensor_type_t type, sensor_t **list, int *sensor_count);
+__attribute__ ((visibility("default"))) int sensord_get_sensors(sensor_type_t type, sensor_t **list, int *sensor_count);
/**
* @brief Get the default sensor for a given type.
* @retval -EPERM Operation not permitted
* @retval -EACCES Permission denied
*/
-int sensord_get_default_sensor(sensor_type_t type, sensor_t *sensor);
+__attribute__ ((visibility("default"))) int sensord_get_default_sensor(sensor_type_t type, sensor_t *sensor);
/**
* @brief Get the type of this sensor.
* @param[out] type the type of this sensor.
* @return return true on success, otherwise false.
*/
-bool sensord_get_type(sensor_t sensor, sensor_type_t *type);
+__attribute__ ((visibility("default"))) bool sensord_get_type(sensor_t sensor, sensor_type_t *type);
/**
* @brief Get the name string of this sensor.
* @param[in] sensor a sensor to get name.
* @return the name string of this sensor on success, otherwise NULL.
*/
-const char* sensord_get_name(sensor_t sensor);
+__attribute__ ((visibility("default"))) const char* sensord_get_name(sensor_t sensor);
/**
* @brief Get the vendor string of this sensor.
* @param[in] sensor a sensor to get vendor.
* @return the vendor string of this sensor on success, otherwise NULL.
*/
-const char* sensord_get_vendor(sensor_t sensor);
+__attribute__ ((visibility("default"))) const char* sensord_get_vendor(sensor_t sensor);
/**
* @brief Get the privilege of this sensor.
* @param[out] privilege the privilege of this sensor.
* @return true on success, otherwise false.
*/
-bool sensord_get_privilege(sensor_t sensor, sensor_privilege_t *privilege);
+__attribute__ ((visibility("default"))) bool sensord_get_privilege(sensor_t sensor, sensor_privilege_t *privilege);
/**
* @brief Get the minimum range of this sensor in the sensor's unit.
* @param[out] min_range the minimum range of this sensor in the sensor's unit.
* @return true on success, otherwise false.
*/
-bool sensord_get_min_range(sensor_t sensor, float *min_range);
+__attribute__ ((visibility("default"))) bool sensord_get_min_range(sensor_t sensor, float *min_range);
/**
* @brief Get the maximum range of this sensor in the sensor's unit.
* @param[out] max_range the maximum range of this sensor in the sensor's unit.
* @return true on success, otherwise false.
*/
-bool sensord_get_max_range(sensor_t sensor, float *max_range);
+__attribute__ ((visibility("default"))) bool sensord_get_max_range(sensor_t sensor, float *max_range);
/**
* @brief Get the resolution of this sensor in the sensor's unit.
* @param[out] resolution the resolution of this sensor in the sensor's unit.
* @return true on success, otherwise false.
*/
-bool sensord_get_resolution(sensor_t sensor, float *resolution);
+__attribute__ ((visibility("default"))) bool sensord_get_resolution(sensor_t sensor, float *resolution);
/**
* @brief Get the minimum interval allowed between two events in microsecond or zero if this sensor only returns a value when the data it's measuring changes.
* @param[out] min_interval the minimum interval of this sensor.
* @return true on success, otherwise false.
*/
-bool sensord_get_min_interval(sensor_t sensor, int *min_interval);
+__attribute__ ((visibility("default"))) bool sensord_get_min_interval(sensor_t sensor, int *min_interval);
/**
* @brief Get the number of events reserved for this sensor in the batch mode FIFO.
* @param[out] fifo_count the number of events reserved for this sensor in the batch mode FIFO
* @return true on success, otherwise false
*/
-bool sensord_get_fifo_count(sensor_t sensor, int *fifo_count);
+__attribute__ ((visibility("default"))) bool sensord_get_fifo_count(sensor_t sensor, int *fifo_count);
/**
* @brief Get the maximum number of events of this sensor that could be batched. If this value is zero it indicates that batch mode is not supported for this sensor.
* @param[out] max_batch_count the maximum number of events of this sensor that could be batched.
* @return true on success, otherwise false.
*/
-bool sensord_get_max_batch_count(sensor_t sensor, int *max_batch_count);
+__attribute__ ((visibility("default"))) bool sensord_get_max_batch_count(sensor_t sensor, int *max_batch_count);
/**
* @brief Get the supported event types of this sensor.
* @param[out] count the count of the supported event types of this sensor.
* @return true on success, otherwise false.
*/
-bool sensord_get_supported_event_types(sensor_t sensor, unsigned int **event_types, int *count);
+__attribute__ ((visibility("default"))) bool sensord_get_supported_event_types(sensor_t sensor, unsigned int **event_types, int *count);
/**
* @brief Check a given event type is supporeted by this sensor.
* @param[out] supported whether a given event is supported or not in this sensor.
* @return true on success, otherwise false.
*/
-bool sensord_is_supported_event_type(sensor_t sensor, unsigned int event_type, bool *supported);
+__attribute__ ((visibility("default"))) bool sensord_is_supported_event_type(sensor_t sensor, unsigned int event_type, bool *supported);
/**
* @brief Check a wakeup supported or not by this sensor.
* @param[in] sensor a sensor to check a given event type is supporeted.
* @return true on success, otherwise false.
*/
-bool sensord_is_wakeup_supported(sensor_t sensor);
+__attribute__ ((visibility("default"))) bool sensord_is_wakeup_supported(sensor_t sensor);
/**
* @brief Connect a given sensor and get a handle of a given sensor.
* @param[in] sensor a sensor to connect
* @return a handle of a given sensor on success, otherwise negative value
*/
-int sensord_connect(sensor_t sensor);
+__attribute__ ((visibility("default"))) int sensord_connect(sensor_t sensor);
/**
* @brief Disconnect a given sensor.
* @param[in] handle a handle to disconnect.
* @return true on success, otherwise false.
*/
-bool sensord_disconnect(int handle);
+__attribute__ ((visibility("default"))) bool sensord_disconnect(int handle);
/**
* @brief Register a callback with a connected sensor for a given event_type. This callback will be called when a given event occurs in a connected sensor.
* @param[in] user_data the callback is called with user_data
* @return true on success, otherwise false.
*/
-bool sensord_register_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensor_cb_t cb, void *user_data);
+__attribute__ ((visibility("default"))) bool sensord_register_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensor_cb_t cb, void *user_data);
/**
* @brief Register a callback with a connected context sensor for a given event_type. This callback will be called when a given event occurs in a connected context sensor.
* @param[in] user_data the callback is called with user_data
* @return true on success, otherwise false.
*/
-bool sensord_register_hub_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensorhub_cb_t cb, void *user_data);
+__attribute__ ((visibility("default"))) bool sensord_register_hub_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensorhub_cb_t cb, void *user_data);
/**
* @brief Unregister a event with a connected sensor. After unregistering, that event will not be sent.
* @param[in] event_type an event type to unregister.
* @return true on success, otherwise false.
*/
-bool sensord_unregister_event(int handle, unsigned int event_type);
+__attribute__ ((visibility("default"))) bool sensord_unregister_event(int handle, unsigned int event_type);
/**
* @brief Register a callback with a connected sensor. This callback will be called when the accuracy of a sensor has changed.
* @param[in] user_data the callback is called with user_data
* @return true on success, otherwise false.
*/
-bool sensord_register_accuracy_cb(int handle, sensor_accuracy_changed_cb_t cb, void *user_data);
+__attribute__ ((visibility("default"))) bool sensord_register_accuracy_cb(int handle, sensor_accuracy_changed_cb_t cb, void *user_data);
/**
* @brief Unregister a callback with a connected sensor. After unregistering, sensor_accuray_change_cb will not be called.
* @param[in] handle a handle represensting a connected sensor.
* @return true on success, otherwise false.
*/
-bool sensord_unregister_accuracy_cb(int handle);
+__attribute__ ((visibility("default"))) bool sensord_unregister_accuracy_cb(int handle);
/**
* @brief Start listening events with a connected sensor.
* with SENSOR_OPTION_ALWAYS_ON, it continues to listening events even when LCD is off or in power save mode.
* @return true on success, otherwise false.
*/
-bool sensord_start(int handle, int option);
+__attribute__ ((visibility("default"))) bool sensord_start(int handle, int option);
/**
* @brief Stop listening events with a connected sensor.
* @param[in] handle a handle represensting a connected sensor.
* @return true on success, otherwise false.
*/
-bool sensord_stop(int handle);
+__attribute__ ((visibility("default"))) bool sensord_stop(int handle);
/**
* @brief Change the interval of a specifed event type in a connected sensor.
* It can be one of SENSOR_INTERVAL_NORMAL, SENSOR_INTERVAL_FASTEST or the interval in microseconds.
* @return true on success, otherwise false.
*/
-bool sensord_change_event_interval(int handle, unsigned int event_type, unsigned int interval);
+__attribute__ ((visibility("default"))) bool sensord_change_event_interval(int handle, unsigned int event_type, unsigned int interval);
/**
* @brief Change the max batch latency of a specifed event type in a connected sensor.
* @param[in] max_batch_latency an event in the batch can be delayed by at most max_batch_latency microseconds. If this is set to zero, batch mode is disabled.
* @return true on success, otherwise false.
*/
-bool sensord_change_event_max_batch_latency(int handle, unsigned int event_type, unsigned int max_batch_latency);
+__attribute__ ((visibility("default"))) bool sensord_change_event_max_batch_latency(int handle, unsigned int event_type, unsigned int max_batch_latency);
/**
* @brief Change the option of a connected sensor.
* with SENSOR_OPTION_ALWAYS_ON, it continues to listening events even when LCD is off or in power save mode.
* @return true on success, otherwise false.
*/
-bool sensord_set_option(int handle, int option);
+__attribute__ ((visibility("default"))) bool sensord_set_option(int handle, int option);
/*
* @brief Set the attribute to a connected sensor
* @retval -EINVAL Invalid parameter
* @retval -EPERM Operation not permitted
*/
-int sensord_set_attribute_int(int handle, int attribute, int value);
+__attribute__ ((visibility("default"))) int sensord_set_attribute_int(int handle, int attribute, int value);
/**
* @brief Set the attribute to a connected sensor
* @retval -EINVAL Invalid parameter
* @retval -EPERM Operation not permitted
*/
-int sensord_set_attribute_str(int handle, int attribute, const char *value, int len);
+__attribute__ ((visibility("default"))) int sensord_set_attribute_str(int handle, int attribute, const char *value, int len);
/**
* @brief Send data to sensorhub
* @param[in] data_len the length of data
* @return true on success, otherwise false.
*/
-bool sensord_send_sensorhub_data(int handle, const char *data, int data_len);
-bool sensord_send_command(int handle, const char *command, int command_len);
+__attribute__ ((visibility("default"))) bool sensord_send_sensorhub_data(int handle, const char *data, int data_len);
+__attribute__ ((visibility("default"))) bool sensord_send_command(int handle, const char *command, int command_len);
/**
* @brief get sensor data from a connected sensor
* @param[out] sensor_data data from connected sensor
* @return true on success, otherwise false.
*/
-bool sensord_get_data(int handle, unsigned int data_id, sensor_data_t* sensor_data);
+__attribute__ ((visibility("default"))) bool sensord_get_data(int handle, unsigned int data_id, sensor_data_t* sensor_data);
/**
* @brief flush sensor data from a connected sensor
* @param[in] handle a handle represensting a connected context sensor.
* @return true on success, otherwise false.
*/
-bool sensord_flush(int handle);
+__attribute__ ((visibility("default"))) bool sensord_flush(int handle);
typedef void (*sensor_external_command_cb_t)(int handle, const char* data, int data_cnt, void *user_data);
-int sensord_external_connect(const char *key, sensor_external_command_cb_t cb, void *user_data);
-bool sensord_external_disconnect(int handle);
-bool sensord_external_post(int handle, unsigned long long timestamp, const float* data, int data_cnt);
+__attribute__ ((visibility("default"))) int sensord_external_connect(const char *key, sensor_external_command_cb_t cb, void *user_data);
+__attribute__ ((visibility("default"))) bool sensord_external_disconnect(int handle);
+__attribute__ ((visibility("default"))) bool sensord_external_post(int handle, unsigned long long timestamp, const float* data, int data_cnt);
-bool sensord_set_passive_mode(int handle, bool passive);
+__attribute__ ((visibility("default"))) bool sensord_set_passive_mode(int handle, bool passive);
/**
* @}
*/
* @param[in] sensor_type your desired sensor type
* @return if it succeed, it return handle value( >=0 ), otherwise negative value return
*/
-DEPRECATED int sf_connect(sensor_type_t sensor_type);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_connect(sensor_type_t sensor_type);
/**
* @fn int sf_disconnect(int handle)
* @param[in] handle received handle value by sf_connect()
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_disconnect(int handle);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_disconnect(int handle);
/**
* @fn int sf_start(int handle, int option)
* @param[in] option With SENSOR_OPTION_DEFAULT, it stops to sense when LCD is off, and with SENSOR_OPTION_ALWAYS_ON, it continues to sense even when LCD is off
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_start(int handle, int option);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_start(int handle, int option);
/**
* @fn int sf_stop(int handle)
* @param[in] handle received handle value by sf_connect()
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_stop(int handle);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_stop(int handle);
/**
* @fn int sf_register_event(int handle, unsigned int event_type, event_conditon_t *event_condition, sensor_callback_func_t cb, void *user_data)
* @param[in] user_data your option data that will be send when your define callback function called. if you don't have any option data, just use a NULL value
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_register_event(int handle, unsigned int event_type, event_condition_t *event_condition, sensor_callback_func_t cb, void *user_data);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_register_event(int handle, unsigned int event_type, event_condition_t *event_condition, sensor_callback_func_t cb, void *user_data);
/**
* @fn int sf_unregister_event(int handle, unsigned int event_type)
* @param[in] event_type your desired event_type that you want to unregister event
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_unregister_event(int handle, unsigned int event_type);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_unregister_event(int handle, unsigned int event_type);
/**
* @fn int sf_get_data(int handle, unsigned int data_id, sensor_data_t* values)
* @param[out] values return values
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_get_data(int handle, unsigned int data_id, sensor_data_t* values);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_get_data(int handle, unsigned int data_id, sensor_data_t* values);
/**
* @fn int sf_change_event_condition(int handle, unsigned int event_type, event_condition_t *event_condition)
* @param[in] event_condition your desired event condition that you want to change event
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_change_event_condition(int handle, unsigned int event_type, event_condition_t *event_condition);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_change_event_condition(int handle, unsigned int event_type, event_condition_t *event_condition);
/**
* @fn int sf_change_sensor_option(int handle, int option)
* @return if it succeed, it return zero value, otherwise negative value return
*/
-DEPRECATED int sf_change_sensor_option(int handle, int option);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_change_sensor_option(int handle, int option);
/**
* @fn int sf_send_sensorhub_data(int handle, const char* buffer, int data_len)
* @param[in] data_len the length of data
* @return if it succeed, it returns zero, otherwise negative value
*/
-DEPRECATED int sf_send_sensorhub_data(int handle, const char* data, int data_len);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_send_sensorhub_data(int handle, const char* data, int data_len);
-DEPRECATED int sf_check_rotation(unsigned long *rotation);
+__attribute__ ((visibility("default"))) DEPRECATED int sf_check_rotation(unsigned long *rotation);
#ifdef __cplusplus
}