static bool check_invalid_filter(context_history_data_e data_type, context_history_filter_h filter);
// life-cycle
-EXTAPI int context_history_create(context_history_h* handle)
+SO_EXPORT int context_history_create(context_history_h* handle)
{
ASSERT_NOT_NULL(handle);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_destroy(context_history_h handle)
+SO_EXPORT int context_history_destroy(context_history_h handle)
{
ASSERT_NOT_NULL(handle);
delete handle;
}
// Read filter manipulation
-EXTAPI int context_history_filter_create(context_history_filter_h* filter)
+SO_EXPORT int context_history_filter_create(context_history_filter_h* filter)
{
ASSERT_NOT_NULL(filter);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_filter_destroy(context_history_filter_h filter)
+SO_EXPORT int context_history_filter_destroy(context_history_filter_h filter)
{
ASSERT_NOT_NULL(filter);
delete filter;
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_filter_set_int(context_history_filter_h filter, context_history_filter_e filter_type, int val)
+SO_EXPORT int context_history_filter_set_int(context_history_filter_h filter, context_history_filter_e filter_type, int val)
{
ASSERT_NOT_NULL(filter);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_filter_set_string(context_history_filter_h filter, context_history_filter_e filter_type, const char* val)
+SO_EXPORT int context_history_filter_set_string(context_history_filter_h filter, context_history_filter_e filter_type, const char* val)
{
ASSERT_NOT_NULL(filter);
ASSERT_NOT_NULL(val);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_get_list(context_history_h handle, context_history_data_e data_type, context_history_filter_h filter, context_history_list_h* list)
+SO_EXPORT int context_history_get_list(context_history_h handle, context_history_data_e data_type, context_history_filter_h filter, context_history_list_h* list)
{
ASSERT_NOT_NULL(handle);
ASSERT_NOT_NULL(list);
}
// Data object manipulation
-EXTAPI int context_history_list_get_count(context_history_list_h list, int* count)
+SO_EXPORT int context_history_list_get_count(context_history_list_h list, int* count)
{
ASSERT_NOT_NULL(list);
ASSERT_NOT_NULL(count);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_list_get_current(context_history_list_h list, context_history_record_h* record)
+SO_EXPORT int context_history_list_get_current(context_history_list_h list, context_history_record_h* record)
{
ASSERT_NOT_NULL(list);
ASSERT_NOT_NULL(record);
}
-EXTAPI int context_history_list_move_first(context_history_list_h list)
+SO_EXPORT int context_history_list_move_first(context_history_list_h list)
{
ASSERT_NOT_NULL(list);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_list_move_next(context_history_list_h list)
+SO_EXPORT int context_history_list_move_next(context_history_list_h list)
{
ASSERT_NOT_NULL(list);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_list_destroy(context_history_list_h list)
+SO_EXPORT int context_history_list_destroy(context_history_list_h list)
{
ASSERT_NOT_NULL(list);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_record_get_int(context_history_record_h record, const char* key, int* val)
+SO_EXPORT int context_history_record_get_int(context_history_record_h record, const char* key, int* val)
{
ASSERT_NOT_NULL(record && val && key);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_record_get_string(context_history_record_h record, const char* key, char** val)
+SO_EXPORT int context_history_record_get_string(context_history_record_h record, const char* key, char** val)
{
ASSERT_NOT_NULL(record && val && key);
return CONTEXT_HISTORY_ERROR_NONE;
}
-EXTAPI int context_history_record_destroy(context_history_record_h record)
+SO_EXPORT int context_history_record_destroy(context_history_record_h record)
{
ASSERT_NOT_NULL(record);
delete record;
} _context_trigger_rule_entry_h;
// Add a rule
-EXTAPI int context_trigger_add_rule(context_trigger_rule_h rule, int* rule_id)
+SO_EXPORT int context_trigger_add_rule(context_trigger_rule_h rule, int* rule_id)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule && rule_id);
}
// Remove a rule
-EXTAPI int context_trigger_remove_rule(int rule_id)
+SO_EXPORT int context_trigger_remove_rule(int rule_id)
{
_D("BEGIN");
if (rule_id <= 0)
}
// Enable a rule
-EXTAPI int context_trigger_enable_rule(int rule_id)
+SO_EXPORT int context_trigger_enable_rule(int rule_id)
{
_D("BEGIN");
if (rule_id <= 0)
}
// Disable a rule
-EXTAPI int context_trigger_disable_rule(int rule_id)
+SO_EXPORT int context_trigger_disable_rule(int rule_id)
{
_D("BEGIN");
if (rule_id <= 0)
return error;
}
-EXTAPI int context_trigger_get_own_rule_ids(int** enabled_rule_ids, int* enabled_rule_count, int** disabled_rule_ids, int* disabled_rule_count)
+SO_EXPORT int context_trigger_get_own_rule_ids(int** enabled_rule_ids, int* enabled_rule_count, int** disabled_rule_ids, int* disabled_rule_count)
{
_D("BEGIN");
ASSERT_NOT_NULL(enabled_rule_ids && enabled_rule_count && disabled_rule_ids && disabled_rule_count);
return error;
}
-EXTAPI int context_trigger_get_rule_by_id(int rule_id, context_trigger_rule_h* rule)
+SO_EXPORT int context_trigger_get_rule_by_id(int rule_id, context_trigger_rule_h* rule)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule);
}
// Rule creation
-EXTAPI int context_trigger_rule_create(context_trigger_logical_type_e logical_type, context_trigger_rule_h* rule)
+SO_EXPORT int context_trigger_rule_create(context_trigger_logical_type_e logical_type, context_trigger_rule_h* rule)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule);
}
// Rule deletion
-EXTAPI int context_trigger_rule_destroy(context_trigger_rule_h rule)
+SO_EXPORT int context_trigger_rule_destroy(context_trigger_rule_h rule)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule);
}
-EXTAPI int context_trigger_rule_add_entry(context_trigger_rule_h rule, context_trigger_rule_entry_h entry)
+SO_EXPORT int context_trigger_rule_add_entry(context_trigger_rule_h rule, context_trigger_rule_entry_h entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule && entry);
return ret;
}
-EXTAPI int context_trigger_rule_set_action_app_control(context_trigger_rule_h rule, app_control_h app_control)
+SO_EXPORT int context_trigger_rule_set_action_app_control(context_trigger_rule_h rule, app_control_h app_control)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule && app_control);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_set_action_notification(context_trigger_rule_h rule, const char* title, const char* content, const char* icon_path, app_control_h app_control)
+SO_EXPORT int context_trigger_rule_set_action_notification(context_trigger_rule_h rule, const char* title, const char* content, const char* icon_path, app_control_h app_control)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule && title && content);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_set_action_dbus_call(context_trigger_rule_h rule,
+SO_EXPORT int context_trigger_rule_set_action_dbus_call(context_trigger_rule_h rule,
const char *bus_name, const char *object_path, const char *interface_name, const char *method_name, GVariant *param)
{
ASSERT_NOT_NULL(rule && bus_name && object_path && interface_name && method_name);
}
// Set description
-EXTAPI int context_trigger_rule_set_description(context_trigger_rule_h rule, const char* description)
+SO_EXPORT int context_trigger_rule_set_description(context_trigger_rule_h rule, const char* description)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule);
}
// Get rule description
-EXTAPI int context_trigger_rule_get_description(context_trigger_rule_h rule, char** description)
+SO_EXPORT int context_trigger_rule_get_description(context_trigger_rule_h rule, char** description)
{
_D("BEGIN");
ASSERT_NOT_NULL(rule && description);
}
// Event creation
-EXTAPI int context_trigger_rule_event_create(context_trigger_event_e event_item, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
+SO_EXPORT int context_trigger_rule_event_create(context_trigger_event_e event_item, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry);
return error;
}
-EXTAPI int context_trigger_rule_custom_event_create(const char* event_item, const char* provider, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
+SO_EXPORT int context_trigger_rule_custom_event_create(const char* event_item, const char* provider, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(event_item && provider && entry);
}
// Event availability check
-EXTAPI int context_trigger_rule_event_is_supported(context_trigger_event_e event_item, bool* supported)
+SO_EXPORT int context_trigger_rule_event_is_supported(context_trigger_event_e event_item, bool* supported)
{
_D("BEGIN");
ASSERT_NOT_NULL(supported);
}
// Condition creation
-EXTAPI int context_trigger_rule_condition_create(context_trigger_condition_e condition_item, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
+SO_EXPORT int context_trigger_rule_condition_create(context_trigger_condition_e condition_item, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry);
return error;
}
-EXTAPI int context_trigger_rule_custom_condition_create(const char* condition_item, const char* provider, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
+SO_EXPORT int context_trigger_rule_custom_condition_create(const char* condition_item, const char* provider, context_trigger_logical_type_e logical_type, context_trigger_rule_entry_h* entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(condition_item && provider && entry);
}
// Condition availability check
-EXTAPI int context_trigger_rule_condition_is_supported(context_trigger_condition_e condition_item, bool* supported)
+SO_EXPORT int context_trigger_rule_condition_is_supported(context_trigger_condition_e condition_item, bool* supported)
{
_D("BEGIN");
ASSERT_NOT_NULL(supported);
}
// Rule data deletion
-EXTAPI int context_trigger_rule_entry_destroy(context_trigger_rule_entry_h entry)
+SO_EXPORT int context_trigger_rule_entry_destroy(context_trigger_rule_entry_h entry)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_entry_add_option_int(context_trigger_rule_entry_h entry, const char* option_key, int value)
+SO_EXPORT int context_trigger_rule_entry_add_option_int(context_trigger_rule_entry_h entry, const char* option_key, int value)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && option_key);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_entry_add_option_string(context_trigger_rule_entry_h entry, const char* option_key, const char* value)
+SO_EXPORT int context_trigger_rule_entry_add_option_string(context_trigger_rule_entry_h entry, const char* option_key, const char* value)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && option_key && value);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_entry_add_option(context_trigger_rule_entry_h entry, const char* option_key, const char* event_data_key)
+SO_EXPORT int context_trigger_rule_entry_add_option(context_trigger_rule_entry_h entry, const char* option_key, const char* event_data_key)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && option_key && event_data_key);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_entry_add_key(context_trigger_rule_entry_h entry, context_trigger_logical_type_e logical_type, const char* key)
+SO_EXPORT int context_trigger_rule_entry_add_key(context_trigger_rule_entry_h entry, context_trigger_logical_type_e logical_type, const char* key)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && key);
return CONTEXT_TRIGGER_ERROR_NO_DATA;
}
-EXTAPI int context_trigger_rule_entry_add_comparison(context_trigger_rule_entry_h entry, const char* key, const char* op, const char* event_data_key)
+SO_EXPORT int context_trigger_rule_entry_add_comparison(context_trigger_rule_entry_h entry, const char* key, const char* op, const char* event_data_key)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && key && op && event_data_key);
return CONTEXT_TRIGGER_ERROR_NONE;
}
-EXTAPI int context_trigger_rule_entry_add_comparison_int(context_trigger_rule_entry_h entry, const char* key, const char* op, int value)
+SO_EXPORT int context_trigger_rule_entry_add_comparison_int(context_trigger_rule_entry_h entry, const char* key, const char* op, int value)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && key && op);
return error;
}
/*
-EXTAPI int context_trigger_rule_entry_add_comparison_double(context_trigger_rule_entry_h entry, const char* key, const char* op, double value)
+SO_EXPORT int context_trigger_rule_entry_add_comparison_double(context_trigger_rule_entry_h entry, const char* key, const char* op, double value)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && key && op);
return error;
}
*/
-EXTAPI int context_trigger_rule_entry_add_comparison_string(context_trigger_rule_entry_h entry, const char* key, const char* op, const char* value)
+SO_EXPORT int context_trigger_rule_entry_add_comparison_string(context_trigger_rule_entry_h entry, const char* key, const char* op, const char* value)
{
_D("BEGIN");
ASSERT_NOT_NULL(entry && key && op && value);
return error;
}
-EXTAPI int context_trigger_add_custom_item(const char* name, const char* attr_template)
+SO_EXPORT int context_trigger_add_custom_item(const char* name, const char* attr_template)
{
_D("BEGIN");
ASSERT_NOT_NULL(name && attr_template);
return error;
}
-EXTAPI int context_trigger_remove_custom_item(const char* name)
+SO_EXPORT int context_trigger_remove_custom_item(const char* name)
{
_D("BEGIN");
ASSERT_NOT_NULL(name);
return error;
}
-EXTAPI int context_trigger_publish_custom_item(const char* name, const char* fact)
+SO_EXPORT int context_trigger_publish_custom_item(const char* name, const char* fact)
{
_D("BEGIN");
ASSERT_NOT_NULL(name && fact);
static DBusClientListenerImpl __dbusListener;
static DBusClient __dbusClient;
-EXTAPI int ctx::request_handler::subscribe(const char* subject, ctx::Json* option, int* req_id, ctx::Json* request_result)
+SO_EXPORT int ctx::request_handler::subscribe(const char* subject, ctx::Json* option, int* req_id, ctx::Json* request_result)
{
return __dbusClient.subscribe(subject, option ? *option : NULL, req_id, request_result);
}
-EXTAPI int ctx::request_handler::unsubscribe(const char* subject, int req_id)
+SO_EXPORT int ctx::request_handler::unsubscribe(const char* subject, int req_id)
{
return __dbusClient.unsubscribe(subject, req_id);
}
-EXTAPI int ctx::request_handler::read(const char* subject, ctx::Json* option, int* req_id, ctx::Json* request_result)
+SO_EXPORT int ctx::request_handler::read(const char* subject, ctx::Json* option, int* req_id, ctx::Json* request_result)
{
return __dbusClient.read(subject, option ? *option : NULL, req_id, request_result);
}
-EXTAPI int ctx::request_handler::read_sync(const char* subject, ctx::Json* option, int* req_id, ctx::Json* data_read)
+SO_EXPORT int ctx::request_handler::read_sync(const char* subject, ctx::Json* option, int* req_id, ctx::Json* data_read)
{
return __dbusClient.readSync(subject, option ? *option : NULL, req_id, data_read);
}
-EXTAPI int ctx::request_handler::write(const char* subject, ctx::Json* data)
+SO_EXPORT int ctx::request_handler::write(const char* subject, ctx::Json* data)
{
return __dbusClient.write(subject, *data);
}
-EXTAPI int ctx::request_handler::write_with_reply(const char* subject, ctx::Json* data, ctx::Json* request_result)
+SO_EXPORT int ctx::request_handler::write_with_reply(const char* subject, ctx::Json* data, ctx::Json* request_result)
{
return __dbusClient.write(subject, *data, request_result);
}
-EXTAPI int ctx::request_handler::is_supported(const char* subject)
+SO_EXPORT int ctx::request_handler::is_supported(const char* subject)
{
return __dbusClient.isSupported(subject);
}
-EXTAPI bool ctx::request_handler::register_callback(const char* subject, subject_response_cb callback)
+SO_EXPORT bool ctx::request_handler::register_callback(const char* subject, subject_response_cb callback)
{
__dbusListener.setCb(subject, callback);
__dbusClient.addListener(subject, &__dbusListener);