From c320a3b596614aeba748430e185b3740f3672d03 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Mon, 5 Dec 2016 13:41:07 +0900 Subject: [PATCH 01/16] Check validity of newly added record key 'UsedTime' Change-Id: Ib98b3cc64bfc4d1dcd1f842be7b29371b93655ec Signed-off-by: Somin Kim --- src/context_history.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/context_history.cpp b/src/context_history.cpp index 0a0982a..1cb07a0 100644 --- a/src/context_history.cpp +++ b/src/context_history.cpp @@ -386,7 +386,8 @@ bool check_record_key_data_type(int type, std::string key) key.compare(CONTEXT_HISTORY_HOUR_OF_DAY) == 0 || key.compare(CONTEXT_HISTORY_AUDIO_JACK) == 0 || key.compare(CONTEXT_HISTORY_SYSTEM_VOLUME) == 0 || - key.compare(CONTEXT_HISTORY_MEDIA_VOLUME) == 0) { + key.compare(CONTEXT_HISTORY_MEDIA_VOLUME) == 0 || + key.compare(KEY_USED_TIME) == 0) { // Internal use for RecentBatteryUsage return (type == TYPE_NUMERIC); } -- 2.7.4 From 8dca0417b94e1f2d51cf771eb65bb0f06ae0abb6 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Mon, 5 Dec 2016 13:57:53 +0900 Subject: [PATCH 02/16] Version 0.9.9 Change-Id: If266d7600727564b0c796b4c99a0643b02e7e395 Signed-off-by: Somin Kim --- packaging/context.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/context.spec b/packaging/context.spec index 3237426..022203b 100644 --- a/packaging/context.spec +++ b/packaging/context.spec @@ -1,6 +1,6 @@ Name: context Summary: Tizen Context Framework Native API -Version: 0.9.7 +Version: 0.9.9 Release: 1 Group: Service/Context License: Apache-2.0 -- 2.7.4 From 59d9eb0bd08022c8efee73faa8451459c2ea1f58 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Fri, 16 Dec 2016 17:59:46 +0900 Subject: [PATCH 03/16] Doxygen modified Change-Id: I47042fb348741c3479ca8ecaf051ea5bd50b7e94 Signed-off-by: Somin Kim --- include/context_history.h | 64 ++++++++-------- include/context_trigger.h | 188 +++++++++++++++++++++++----------------------- 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/include/context_history.h b/include/context_history.h index 70a91fc..9c388fe 100644 --- a/include/context_history.h +++ b/include/context_history.h @@ -30,70 +30,70 @@ extern "C" { */ /** - * @brief The attribute key denoting "application id" + * @brief Definition for the attribute key denoting "application id". * @details This can be used as a key of context_history_record_get_string(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_APP_ID "AppId" /** - * @brief The attribute key denoting "total count" + * @brief Definition for the attribute key denoting "total count". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_TOTAL_COUNT "TotalCount" /** - * @brief The attribute key denoting "total amount" + * @brief Definition for the attribute key denoting "total amount". * @details This can be used as a key of context_history_record_get_double(). * @since_tizen 3.0 */ #define CONTEXT_HISTORY_TOTAL_AMOUNT "TotalAmount" /** - * @brief The attribute key denoting "total duration" + * @brief Definition for the attribute key denoting "total duration". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_TOTAL_DURATION "TotalDuration" /** - * @brief The attribute key denoting "last time" + * @brief Definition for the attribute key denoting "last time". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_LAST_TIME "LastTime" /** - * @brief The attribute key denoting "hour of day" + * @brief Definition for the attribute key denoting "hour of day". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_HOUR_OF_DAY "HourOfDay" /** - * @brief The attribute key denoting "audio jack status" + * @brief Definition for the attribute key denoting "audio jack status". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_AUDIO_JACK "AudioJack" /** - * @brief The attribute key denoting "system volume" + * @brief Definition for the attribute key denoting "system volume". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_SYSTEM_VOLUME "SystemVolume" /** - * @brief The attribute key denoting "media volume" + * @brief Definition for the attribute key denoting "media volume". * @details This can be used as a key of context_history_record_get_int(). * @since_tizen 2.4 */ #define CONTEXT_HISTORY_MEDIA_VOLUME "MediaVolume" /** - * @brief The attribute key denoting "address" + * @brief Definition for the attribute key denoting "address". * @details This can be used as a key of context_history_record_get_string(). * @since_tizen 2.4 */ @@ -179,25 +179,25 @@ typedef enum { } context_history_filter_communication_type_e; /** - * @brief Context history handle for retrieving statistics and patterns. + * @brief Retrieving statistics and patterns using context history handle. * @since_tizen 2.4 */ typedef struct _context_history_handle_s* context_history_h; /** - * @brief History filter handle to be used to compute statistics and patterns. + * @brief Computing statistics and patterns using history filter handle. * @since_tizen 2.4 */ typedef struct _context_history_filter_handle_s* context_history_filter_h; /** - * @brief History list handle. It contains one or multiple records. + * @brief One or multiple records contained in history list handle. * @since_tizen 2.4 */ typedef struct _context_history_list_handle_s* context_history_list_h; /** - * @brief History record handle. It contains one or multiple attributes. + * @brief One or multiple attributes contained in history list handle. * @since_tizen 2.4 */ typedef struct _context_history_record_handle_s* context_history_record_h; @@ -209,7 +209,7 @@ typedef struct _context_history_record_handle_s* context_history_record_h; * * @param[out] handle Handle to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Out of memory @@ -226,7 +226,7 @@ int context_history_create(context_history_h* handle); * * @param[in] handle Handle to be released * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -241,7 +241,7 @@ int context_history_destroy(context_history_h handle); * * @param[out] filter Filter handle to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Memory allocation failed @@ -257,7 +257,7 @@ int context_history_filter_create(context_history_filter_h* filter); * * @param[in] filter Filter handle to be released * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -274,7 +274,7 @@ int context_history_filter_destroy(context_history_filter_h filter); * @param[in] filter_type The filter type to set * @param[in] value The value to be set * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -292,7 +292,7 @@ int context_history_filter_set_int(context_history_filter_h filter, context_hist * @param[in] filter_type The filter type to set * @param[in] value The value to be set * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -317,7 +317,7 @@ int context_history_filter_set_string(context_history_filter_h filter, context_h * @param[in] filter Filter to be used to compute statistics or patterns. This can not be @c NULL * @param[out] list History data retrieved. This should be freed after use * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed @@ -336,7 +336,7 @@ int context_history_get_list(context_history_h handle, context_history_data_e da * @param[in] list The history data list handle * @param[out] count The count of the data list * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed @@ -356,7 +356,7 @@ int context_history_list_get_count(context_history_list_h list, int* count); * @param[in] list The context history list handle * @param[out] record History data record retrieved * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed @@ -373,7 +373,7 @@ int context_history_list_get_current(context_history_list_h list, context_histor * * @param[in] list The context history list handle * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -389,7 +389,7 @@ int context_history_list_move_first(context_history_list_h list); * * @param[in] list The context history list handle * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_HISTORY_ERROR_NO_DATA Requested data does not exist @@ -406,7 +406,7 @@ int context_history_list_move_next(context_history_list_h list); * * @param[in] list The context history data handle * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -421,10 +421,10 @@ int context_history_list_destroy(context_history_list_h list); * @since_tizen 2.4 * * @param[in] record The record handle - * @param[in] key The key of the attribute to get + * @param[in] key The key of attribute to get * @param[out] value The result value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -442,10 +442,10 @@ int context_history_record_get_int(context_history_record_h record, const char* * @remarks @c value must be released using free(). * * @param[in] record The record handle - * @param[in] key The key of the attribute to get + * @param[in] key The key of attribute to get * @param[out] value The result value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -465,7 +465,7 @@ int context_history_record_get_string(context_history_record_h record, const cha * @param[in] key The key of the attribute to get * @param[out] value The result value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * @@ -481,7 +481,7 @@ int context_history_record_get_double(context_history_record_h record, const cha * * @param[in] record The record handle * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_HISTORY_ERROR_NONE Successful * @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter * diff --git a/include/context_trigger.h b/include/context_trigger.h index 3d3719b..9e83478 100644 --- a/include/context_trigger.h +++ b/include/context_trigger.h @@ -31,7 +31,7 @@ extern "C" { #endif /* __cplusplus */ /** - * @brief The operator "is equal to". + * @brief Definition for the operator "is equal to". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int() * and context_trigger_rule_entry_add_comparison_string(). * @since_tizen 2.4 @@ -39,7 +39,7 @@ extern "C" { #define CONTEXT_TRIGGER_EQUAL_TO "==" /** - * @brief The operator "is not equal to". + * @brief Definition for the operator "is not equal to". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int() * and context_trigger_rule_entry_add_comparison_string(). * @since_tizen 2.4 @@ -47,49 +47,49 @@ extern "C" { #define CONTEXT_TRIGGER_NOT_EQUAL_TO "!=" /** - * @brief The operator "is greater than". + * @brief Definition for the operator "is greater than". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_GREATER_THAN ">" /** - * @brief The operator "is greater than or equal to". + * @brief Definition for the operator "is greater than or equal to". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_GREATER_THAN_OR_EQUAL_TO ">=" /** - * @brief The operator "is less than". + * @brief Definition for the operator "is less than". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_LESS_THAN "<" /** - * @brief The operator "is less than or equal to". + * @brief Definition for the operator "is less than or equal to". * @details This can be used as operators of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_LESS_THAN_OR_EQUAL_TO "<=" /** - * @brief Logical true. + * @brief Definition for the logical true. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_TRUE 1 /** - * @brief Logical false. + * @brief Definition for the logical false. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_int(). * @since_tizen 2.4 */ #define CONTEXT_TRIGGER_FALSE 0 /** - * @brief The attribute key denoting "time of day". + * @brief Definition for the attribute key denoting "time of day". * @details This can be used as a key of context_trigger_rule_entry_add_option_string(), * or left operands of context_trigger_rule_entry_add_comparison_int().@n * When being used as option, it is time interval of the day. For example, "13-15" denotes "from 1 PM to 3 PM". @@ -100,7 +100,7 @@ extern "C" { #define CONTEXT_TRIGGER_TIME_OF_DAY "TimeOfDay" /** - * @brief The attribute key denoting "day of week". + * @brief Definition for the attribute key denoting "day of week". * @details This can be used as a key of context_trigger_rule_entry_add_option_string(), * or left operands of context_trigger_rule_entry_add_comparison_string().@n * As the right operands of this attribute, one of the following values are allowed: @@ -111,7 +111,7 @@ extern "C" { #define CONTEXT_TRIGGER_DAY_OF_WEEK "DayOfWeek" /** - * @brief The attribute key denoting "day of month". + * @brief Definition for the attribute key denoting "day of month". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * The valid range of the corresponding right operands is from 1 to 31. * @since_tizen 2.4 @@ -119,7 +119,7 @@ extern "C" { #define CONTEXT_TRIGGER_DAY_OF_MONTH "DayOfMonth" /** - * @brief The attribute key denoting boolean states of "is connected". + * @brief Definition for the attribute key denoting boolean states of "is connected". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * As the right operands of this attribute, one of the following values are allowed: * #CONTEXT_TRIGGER_TRUE and #CONTEXT_TRIGGER_FALSE. @@ -128,7 +128,7 @@ extern "C" { #define CONTEXT_TRIGGER_IS_CONNECTED "IsConnected" /** - * @brief The attribute key denoting boolean states of "is charging". + * @brief Definition for the attribute key denoting boolean states of "is charging". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * As the right operands of this attribute, one of the following values are allowed: * #CONTEXT_TRIGGER_TRUE and #CONTEXT_TRIGGER_FALSE. @@ -137,7 +137,7 @@ extern "C" { #define CONTEXT_TRIGGER_IS_CHARGING "IsCharging" /** - * @brief The attribute key denoting boolean states of "is enabled". + * @brief Definition for the attribute key denoting boolean states of "is enabled". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * As the right operands of this attribute, one of the following values are allowed: * #CONTEXT_TRIGGER_TRUE and #CONTEXT_TRIGGER_FALSE. @@ -146,7 +146,7 @@ extern "C" { #define CONTEXT_TRIGGER_IS_ENABLED "IsEnabled" /** - * @brief The attribute key denoting "level". + * @brief Definition for the attribute key denoting "level". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands values. * @since_tizen 2.4 @@ -154,7 +154,7 @@ extern "C" { #define CONTEXT_TRIGGER_LEVEL "Level" /** - * @brief The attribute key denoting "state". + * @brief Definition for the attribute key denoting "state". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -162,7 +162,7 @@ extern "C" { #define CONTEXT_TRIGGER_STATE "State" /** - * @brief The attribute key denoting "BSSID". + * @brief Definition for the attribute key denoting "BSSID". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -170,7 +170,7 @@ extern "C" { #define CONTEXT_TRIGGER_BSSID "BSSID" /** - * @brief The attribute key denoting "type". + * @brief Definition for the attribute key denoting "type". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -178,7 +178,7 @@ extern "C" { #define CONTEXT_TRIGGER_TYPE "Type" /** - * @brief The attribute key denoting "event". + * @brief Definition for the attribute key denoting "event". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -186,7 +186,7 @@ extern "C" { #define CONTEXT_TRIGGER_EVENT "Event" /** - * @brief The attribute key denoting "accuracy". + * @brief Definition for the attribute key denoting "accuracy". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -194,7 +194,7 @@ extern "C" { #define CONTEXT_TRIGGER_ACCURACY "Accuracy" /** - * @brief The attribute key denoting "medium". + * @brief Definition for the attribute key denoting "medium". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -202,7 +202,7 @@ extern "C" { #define CONTEXT_TRIGGER_MEDIUM "Medium" /** - * @brief The attribute key denoting "place id". + * @brief Definition for the attribute key denoting "place id". * @details This can be used as a key of context_trigger_rule_entry_add_option_int().@n * See the programming guide to find the corresponding trigger events. * @since_tizen 2.4 @@ -210,7 +210,7 @@ extern "C" { #define CONTEXT_TRIGGER_PLACE_ID "PlaceId" /** - * @brief The attribute key denoting "application id". + * @brief Definition for the attribute key denoting "application id". * @details This can be used as a key of context_trigger_rule_entry_add_option_string().@n * See the programming guide to find the corresponding trigger events. * @since_tizen 2.4 @@ -218,7 +218,7 @@ extern "C" { #define CONTEXT_TRIGGER_APP_ID "AppId" /** - * @brief The attribute key denoting "address". + * @brief Definition for the attribute key denoting "address". * @details This can be used as a key of context_trigger_rule_entry_add_option_string(), * or context_trigger_rule_entry_add_comparison_string().@n * See the programming guide and CAPI_CONTEXT_TRIGGER_MODULE_OPTION_FORMAT to find the corresponding items. @@ -227,7 +227,7 @@ extern "C" { #define CONTEXT_TRIGGER_ADDRESS "Address" /** - * @brief The attribute key denoting "rank". + * @brief Definition for the attribute key denoting "rank". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -235,7 +235,7 @@ extern "C" { #define CONTEXT_TRIGGER_RANK "Rank" /** - * @brief The attribute key denoting "total count". + * @brief Definition for the attribute key denoting "total count". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_int().@n * See the programming guide to find available right operands. * @since_tizen 2.4 @@ -243,7 +243,7 @@ extern "C" { #define CONTEXT_TRIGGER_TOTAL_COUNT "TotalCount" /** - * @brief The attribute value denoting Monday. + * @brief Definition for the attribute value denoting Monday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -252,7 +252,7 @@ extern "C" { #define CONTEXT_TRIGGER_MON "Mon" /** - * @brief The attribute value denoting Tuesday. + * @brief Definition for the attribute value denoting Tuesday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -261,7 +261,7 @@ extern "C" { #define CONTEXT_TRIGGER_TUE "Tue" /** - * @brief The attribute value denoting Wednesday. + * @brief Definition for the attribute value denoting Wednesday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -270,7 +270,7 @@ extern "C" { #define CONTEXT_TRIGGER_WED "Wed" /** - * @brief The attribute value denoting Thursday. + * @brief Definition for the attribute value denoting Thursday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -279,7 +279,7 @@ extern "C" { #define CONTEXT_TRIGGER_THU "Thu" /** - * @brief The attribute value denoting Friday. + * @brief Definition for the attribute value denoting Friday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -288,7 +288,7 @@ extern "C" { #define CONTEXT_TRIGGER_FRI "Fri" /** - * @brief The attribute value denoting Saturday. + * @brief Definition for the attribute value denoting Saturday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -297,7 +297,7 @@ extern "C" { #define CONTEXT_TRIGGER_SAT "Sat" /** - * @brief The attribute value denoting Sunday. + * @brief Definition for the attribute value denoting Sunday. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -306,7 +306,7 @@ extern "C" { #define CONTEXT_TRIGGER_SUN "Sun" /** - * @brief The attribute value denoting Weekdays. + * @brief Definition for the attribute value denoting Weekdays. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -315,7 +315,7 @@ extern "C" { #define CONTEXT_TRIGGER_WEEKDAY "Weekday" /** - * @brief The attribute value denoting Weekends. + * @brief Definition for the attribute value denoting Weekends. * @details This can be used as a value of context_trigger_rule_entry_add_option_string() * or right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding option keys or left operand attribute keys. @@ -324,7 +324,7 @@ extern "C" { #define CONTEXT_TRIGGER_WEEKEND "Weekend" /** - * @brief The attribute value denoting the "empty" state. + * @brief Definition for the attribute value denoting the "empty" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -332,7 +332,7 @@ extern "C" { #define CONTEXT_TRIGGER_EMPTY "Empty" /** - * @brief The attribute value denoting the "critical" state. + * @brief Definition for the attribute value denoting the "critical" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -340,7 +340,7 @@ extern "C" { #define CONTEXT_TRIGGER_CRITICAL "Critical" /** - * @brief The attribute value denoting the "low" state. + * @brief Definition for the attribute value denoting the "low" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -348,7 +348,7 @@ extern "C" { #define CONTEXT_TRIGGER_LOW "Low" /** - * @brief The attribute value denoting the "normal" state. + * @brief Definition for the attribute value denoting the "normal" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -356,7 +356,7 @@ extern "C" { #define CONTEXT_TRIGGER_NORMAL "Normal" /** - * @brief The attribute value denoting the "high" state. + * @brief Definition for the attribute value denoting the "high" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -364,7 +364,7 @@ extern "C" { #define CONTEXT_TRIGGER_HIGH "High" /** - * @brief The attribute value denoting the "full" state. + * @brief Definition for the attribute value denoting the "full" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -372,7 +372,7 @@ extern "C" { #define CONTEXT_TRIGGER_FULL "Full" /** - * @brief The attribute value denoting the "disabled" state. + * @brief Definition for the attribute value denoting the "disabled" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -380,7 +380,7 @@ extern "C" { #define CONTEXT_TRIGGER_DISABLED "Disabled" /** - * @brief The attribute value denoting the "searching" state. + * @brief Definition for the attribute value denoting the "searching" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -388,7 +388,7 @@ extern "C" { #define CONTEXT_TRIGGER_SEARCHING "Searching" /** - * @brief The attribute value denoting the "connecting" state. + * @brief Definition for the attribute value denoting the "connecting" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -396,7 +396,7 @@ extern "C" { #define CONTEXT_TRIGGER_CONNECTING "Connecting" /** - * @brief The attribute value denoting the "connected" state. + * @brief Definition for the attribute value denoting the "connected" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -404,7 +404,7 @@ extern "C" { #define CONTEXT_TRIGGER_CONNECTED "Connected" /** - * @brief The attribute value denoting the "unconnected" state. + * @brief Definition for the attribute value denoting the "unconnected" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -412,7 +412,7 @@ extern "C" { #define CONTEXT_TRIGGER_UNCONNECTED "Unconnected" /** - * @brief The attribute value denoting the "idle" state. + * @brief Definition for the attribute value denoting the "idle" state. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -420,7 +420,7 @@ extern "C" { #define CONTEXT_TRIGGER_IDLE "Idle" /** - * @brief The attribute value denoting the "voice" type. + * @brief Definition for the attribute value denoting the "voice" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -428,7 +428,7 @@ extern "C" { #define CONTEXT_TRIGGER_VOICE "Voice" /** - * @brief The attribute value denoting the "video" type. + * @brief Definition for the attribute value denoting the "video" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -436,7 +436,7 @@ extern "C" { #define CONTEXT_TRIGGER_VIDEO "Video" /** - * @brief The attribute value denoting the "headset" type. + * @brief Definition for the attribute value denoting the "headset" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -444,7 +444,7 @@ extern "C" { #define CONTEXT_TRIGGER_HEADSET "Headset" /** - * @brief The attribute value denoting the "bluetooth" type. + * @brief Definition for the attribute value denoting the "bluetooth" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -452,7 +452,7 @@ extern "C" { #define CONTEXT_TRIGGER_BLUETOOTH "Bluetooth" /** - * @brief The attribute value denoting the "received" event. + * @brief Definition for the attribute value denoting the "received" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -460,7 +460,7 @@ extern "C" { #define CONTEXT_TRIGGER_RECEIVED "Received" /** - * @brief The attribute value denoting the "sent" event. + * @brief Definition for the attribute value denoting the "sent" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -468,7 +468,7 @@ extern "C" { #define CONTEXT_TRIGGER_SENT "Sent" /** - * @brief The attribute value denoting the "SMS" type. + * @brief Definition for the attribute value denoting the "SMS" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -476,7 +476,7 @@ extern "C" { #define CONTEXT_TRIGGER_SMS "SMS" /** - * @brief The attribute value denoting the "MMS" type. + * @brief Definition for the attribute value denoting the "MMS" type. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -484,7 +484,7 @@ extern "C" { #define CONTEXT_TRIGGER_MMS "MMS" /** - * @brief The attribute value denoting the "my profile" view. + * @brief Definition for the attribute value denoting the "my profile" view. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 3.0 @@ -492,7 +492,7 @@ extern "C" { #define CONTEXT_TRIGGER_MY_PROFILE "MyProfile" /** - * @brief The attribute value denoting the "person" view. + * @brief Definition for the attribute value denoting the "person" view. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 3.0 @@ -500,7 +500,7 @@ extern "C" { #define CONTEXT_TRIGGER_PERSON "Person" /** - * @brief The attribute value denoting the "Changed" event. + * @brief Definition for the attribute value denoting the "Changed" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 3.0 @@ -508,7 +508,7 @@ extern "C" { #define CONTEXT_TRIGGER_CHANGED "Changed" /** - * @brief The attribute value denoting the "detected" event. + * @brief Definition for the attribute value denoting the "detected" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -516,7 +516,7 @@ extern "C" { #define CONTEXT_TRIGGER_DETECTED "Detected" /** - * @brief The attribute value denoting the "in" event. + * @brief Definition for the attribute value denoting the "in" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -524,7 +524,7 @@ extern "C" { #define CONTEXT_TRIGGER_IN "In" /** - * @brief The attribute value denoting the "out" event. + * @brief Definition for the attribute value denoting the "out" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n * See the programming guide to find the corresponding left operand attribute keys. * @since_tizen 2.4 @@ -532,7 +532,7 @@ extern "C" { #define CONTEXT_TRIGGER_OUT "Out" /** - * @brief Enumeration of error codes for context trigger API. + * @brief Enumeration for context trigger API of error codes. * @since_tizen 2.4 */ typedef enum { @@ -605,13 +605,13 @@ typedef enum { } context_trigger_logical_type_e; /** - * @brief Handle for editing a trigger rule. + * @brief Trigger rule editing handle. * @since_tizen 2.4 */ typedef struct _context_trigger_rule_s* context_trigger_rule_h; /** - * @brief Handle for editing an event or a condition, which is added to a rule. + * @brief Editing an event or a condition, which is added to a rule using handle. * @since_tizen 2.4 */ typedef struct _context_trigger_rule_entry_s* context_trigger_rule_entry_h; @@ -629,7 +629,7 @@ typedef struct _context_trigger_rule_entry_s* context_trigger_rule_entry_h; * @param[in] rule The rule to register * @param[out] rule_id The ID assigned to the @a rule * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied @@ -651,7 +651,7 @@ int context_trigger_add_rule(context_trigger_rule_h rule, int* rule_id); * * @param[in] rule_id The ID of the rule to be removed * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -670,7 +670,7 @@ int context_trigger_remove_rule(int rule_id); * * @param[in] rule_id The ID of the rule to be enabled * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Unsupported event/condition contained @@ -690,7 +690,7 @@ int context_trigger_enable_rule(int rule_id); * * @param[in] rule_id The ID of the rule to be disabled * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -713,7 +713,7 @@ int context_trigger_disable_rule(int rule_id); * @param[out] disabled_rule_ids The IDs of the inactive rules * @param[out] disabled_rule_count The number of the inactive rules * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -731,7 +731,7 @@ int context_trigger_get_own_rule_ids(int** enabled_rule_ids, int* enabled_rule_c * @param[in] rule_id The ID of the rule to be retrieved * @param[out] rule The rule retrieved * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -755,7 +755,7 @@ int context_trigger_get_rule_by_id(int rule_id, context_trigger_rule_h* rule); * @param[in] logical_type The logical operator * @param[out] rule The rule handle to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed @@ -770,7 +770,7 @@ int context_trigger_rule_create(context_trigger_logical_type_e logical_type, con * * @param[in] rule The rule handle to be released * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @@ -786,7 +786,7 @@ int context_trigger_rule_destroy(context_trigger_rule_h rule); * @param[in] rule The rule * @param[in] entry The event or condition entry to be added to the rule * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -814,7 +814,7 @@ int context_trigger_rule_add_entry(context_trigger_rule_h rule, context_trigger_ * @param[in] rule The rule * @param[in] app_control The App Control, which will be used to launch an application * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied @@ -841,7 +841,7 @@ int context_trigger_rule_set_action_app_control(context_trigger_rule_h rule, app * @param[in] icon_path The icon file path * @param[in] app_control The app control * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied @@ -858,7 +858,7 @@ int context_trigger_rule_set_action_notification(context_trigger_rule_h rule, co * @param[in] rule The rule * @param[in] description The description to be set * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -877,7 +877,7 @@ int context_trigger_rule_set_description(context_trigger_rule_h rule, const char * @param[in] rule The rule * @param[out] description The description of the rule * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -908,7 +908,7 @@ int context_trigger_rule_get_description(context_trigger_rule_h rule, char** des * @param[in] logical_type The logical operator * @param[out] entry The event entry to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed @@ -925,7 +925,7 @@ int context_trigger_rule_event_create(context_trigger_event_e event_item, contex * @param[in] event_item The contextual event item * @param[out] supported If supported, @c true; Otherwise, @c false * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed @@ -952,7 +952,7 @@ int context_trigger_rule_event_is_supported(context_trigger_event_e event_item, * @param[in] logical_type The logical operator * @param[out] entry The condition entry to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed @@ -969,7 +969,7 @@ int context_trigger_rule_condition_create(context_trigger_condition_e condition_ * @param[in] condition_item The contextual condition item * @param[out] supported If supported, @c true; Otherwise, @c false * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed @@ -982,7 +982,7 @@ int context_trigger_rule_condition_is_supported(context_trigger_condition_e cond * * @param[in] entry The event or condition entry * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @@ -1000,7 +1000,7 @@ int context_trigger_rule_entry_destroy(context_trigger_rule_entry_h entry); * @param[in] option_key The option key * @param[in] value The option value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1020,7 +1020,7 @@ int context_trigger_rule_entry_add_option_int(context_trigger_rule_entry_h entry * @param[in] option_key The option key * @param[in] value The option value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1040,7 +1040,7 @@ int context_trigger_rule_entry_add_option_string(context_trigger_rule_entry_h en * @param[in] option_key The option key * @param[in] event_data_key The event data key of which the corresponding data value will be used as the option parameter * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1061,7 +1061,7 @@ int context_trigger_rule_entry_add_option(context_trigger_rule_entry_h entry, co * @param[in] logical_type The logical operator * @param[in] key The attribute key * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1087,7 +1087,7 @@ int context_trigger_rule_entry_add_key(context_trigger_rule_entry_h entry, conte * @param[in] comp_operator The comparison operator * @param[in] value The right operand value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1112,7 +1112,7 @@ int context_trigger_rule_entry_add_comparison_int(context_trigger_rule_entry_h e * @param[in] comp_operator The comparison operator * @param[in] value The right operand value * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1135,7 +1135,7 @@ int context_trigger_rule_entry_add_comparison_string(context_trigger_rule_entry_ * @param[in] comp_operator The comparison operator * @param[in] event_data_key The event data key of which the corresponding data value will be used as the right operand * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1158,7 +1158,7 @@ int context_trigger_rule_entry_add_comparison(context_trigger_rule_entry_h entry * @param[in] name The name of a custom contextual data item * @param[in] attr_template The attribute template which explains contextual data schema in JSON format * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory @@ -1178,7 +1178,7 @@ int context_trigger_custom_register(const char* name, const char* attr_template) * * @param[in] name The name of a custom contextual data item * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed @@ -1201,7 +1201,7 @@ int context_trigger_custom_unregister(const char* name); * @param[in] name The name of custom contextual data item * @param[in] fact The contextual data to be provided in JSON format * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Unsupported event/condition contained @@ -1221,7 +1221,7 @@ int context_trigger_custom_publish(const char* name, const char* fact); * @param[in] logical_type The logical operator * @param[out] entry The event entry to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed @@ -1245,7 +1245,7 @@ int context_trigger_rule_custom_event_create(const char* event_item, const char* * @param[in] logical_type The logical operator * @param[out] entry The condition entry to be initialized * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, otherwise a negative error value * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed -- 2.7.4 From bd169b532bcd71c6505a056370b44bb6eb90b4be Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Thu, 26 Jan 2017 12:15:55 +0900 Subject: [PATCH 04/16] Fix memory leak(TSAM-12738) Change-Id: Ic8aac37e17e6fae9e2fa71e48cbfa4106ce1d352 Signed-off-by: Somin Kim --- src/context_trigger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/context_trigger.cpp b/src/context_trigger.cpp index 169dbff..dbfee68 100644 --- a/src/context_trigger.cpp +++ b/src/context_trigger.cpp @@ -452,6 +452,8 @@ SO_EXPORT int context_trigger_rule_set_action_notification(context_trigger_rule_ error = pkgmgrinfo_appinfo_get_usr_appinfo(app_id, getuid(), &app_info); g_free(app_id); IF_FAIL_RETURN_TAG(error == PMINFO_R_OK, CONTEXT_TRIGGER_ERROR_INVALID_RULE, _E, "No such app"); + + pkgmgrinfo_appinfo_destroy_appinfo(app_info); } // Set title, content -- 2.7.4 From 0c2002243b2d27245c478653d32a585bfa3edff3 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Tue, 31 Jan 2017 18:49:29 +0900 Subject: [PATCH 05/16] Update doxygen Change-Id: I9a768d5bbfb2162cf6080964828844c1b69d80b3 Signed-off-by: Somin Kim --- doc/context_history_doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/context_history_doc.h b/doc/context_history_doc.h index 617d984..4f040ed 100644 --- a/doc/context_history_doc.h +++ b/doc/context_history_doc.h @@ -31,7 +31,7 @@ * application usage, peak time of activities, and common setting for activities. * See #context_history_data_e for all available statistic items. * After choosing a statistic item to retrieve, a @em filter can be set to narrow down to the data you need.@n - * For more details about the available filter keys, and the data attributes provided by each item, + * For more details about the available filter keys and the data attributes provided by each item, * please refer the programming guide and the tutorial. * */ -- 2.7.4 From 0f103c27c2b7be2a3d11a0b17eb4a1bd7938538d Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Tue, 31 Jan 2017 18:55:49 +0900 Subject: [PATCH 06/16] Revert "Update doxygen" This reverts commit 0c2002243b2d27245c478653d32a585bfa3edff3. --- doc/context_history_doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/context_history_doc.h b/doc/context_history_doc.h index 4f040ed..617d984 100644 --- a/doc/context_history_doc.h +++ b/doc/context_history_doc.h @@ -31,7 +31,7 @@ * application usage, peak time of activities, and common setting for activities. * See #context_history_data_e for all available statistic items. * After choosing a statistic item to retrieve, a @em filter can be set to narrow down to the data you need.@n - * For more details about the available filter keys and the data attributes provided by each item, + * For more details about the available filter keys, and the data attributes provided by each item, * please refer the programming guide and the tutorial. * */ -- 2.7.4 From a2d177eee9bf4f11a39fb6292827ead6d0cc3c24 Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Tue, 31 Jan 2017 18:56:59 +0900 Subject: [PATCH 07/16] Update doxygen Change-Id: I28365912d76c2db7f43780e5dc29d9198f5c419f Signed-off-by: Somin Kim --- doc/context_history_doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/context_history_doc.h b/doc/context_history_doc.h index 617d984..4f040ed 100644 --- a/doc/context_history_doc.h +++ b/doc/context_history_doc.h @@ -31,7 +31,7 @@ * application usage, peak time of activities, and common setting for activities. * See #context_history_data_e for all available statistic items. * After choosing a statistic item to retrieve, a @em filter can be set to narrow down to the data you need.@n - * For more details about the available filter keys, and the data attributes provided by each item, + * For more details about the available filter keys and the data attributes provided by each item, * please refer the programming guide and the tutorial. * */ -- 2.7.4 From 215b533c144691e13dc28ad6312a932eb0457223 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Thu, 2 Mar 2017 11:20:51 +0900 Subject: [PATCH 08/16] Disable my-place automation API While refactoring the context fw for Tizen 4.0, my-place module will not be supported. Change-Id: I9ee84c6cf2c22a03b0481fd2d99913fb0c6c43fd Signed-off-by: Mu-Woong Lee --- src/context_places.cpp | 111 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 89 insertions(+), 22 deletions(-) diff --git a/src/context_places.cpp b/src/context_places.cpp index afef1d6..b4f266e 100644 --- a/src/context_places.cpp +++ b/src/context_places.cpp @@ -14,12 +14,15 @@ * limitations under the License. */ -#include +#include #include +#include +#if 0 +#include #include #include -#include #include "DBusClient.h" +#endif /* XXX: temporary !!!!! Example JSON output: --------------------------------------------------------------------------------------- @@ -103,8 +106,9 @@ struct _context_places_wifi_ap_list_handle_s { } }; -SO_EXPORT int context_places_get_list(context_places_list_h* list) +EXPORT_API int context_places_get_list(context_places_list_h* list) { +#if 0 ASSERT_NOT_NULL(list); *list = NULL; @@ -134,10 +138,13 @@ SO_EXPORT int context_places_get_list(context_places_list_h* list) (*list)->current = 0; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_list_get_count(context_places_list_h list, int* count) +EXPORT_API int context_places_list_get_count(context_places_list_h list, int* count) { +#if 0 ASSERT_NOT_NULL(list && count); *count = 0; @@ -146,10 +153,13 @@ SO_EXPORT int context_places_list_get_count(context_places_list_h list, int* cou *count = result; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_list_get_current(context_places_list_h list, context_places_place_h* record) +EXPORT_API int context_places_list_get_current(context_places_list_h list, context_places_place_h* record) { +#if 0 ASSERT_NOT_NULL(list && record); *record = NULL; @@ -165,19 +175,25 @@ SO_EXPORT int context_places_list_get_current(context_places_list_h list, contex (*record)->jPlace = tmp_record; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_list_move_first(context_places_list_h list) +EXPORT_API int context_places_list_move_first(context_places_list_h list) { +#if 0 ASSERT_NOT_NULL(list); list->current = 0; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_list_move_next(context_places_list_h list) +EXPORT_API int context_places_list_move_next(context_places_list_h list) { +#if 0 ASSERT_NOT_NULL(list); IF_FAIL_RETURN_TAG( @@ -188,19 +204,25 @@ SO_EXPORT int context_places_list_move_next(context_places_list_h list) list->current++; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_list_destroy(context_places_list_h list) +EXPORT_API int context_places_list_destroy(context_places_list_h list) { +#if 0 ASSERT_NOT_NULL(list); delete list; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_get_category(context_places_place_h place, context_places_categ_id_e* value, double* confidence) +EXPORT_API int context_places_place_get_category(context_places_place_h place, context_places_categ_id_e* value, double* confidence) { +#if 0 ASSERT_NOT_NULL(place && value && confidence); int categId; @@ -219,10 +241,13 @@ SO_EXPORT int context_places_place_get_category(context_places_place_h place, co *confidence = categConfidence; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_get_name(context_places_place_h place, char** name) +EXPORT_API int context_places_place_get_name(context_places_place_h place, char** name) { +#if 0 ASSERT_NOT_NULL(place && name); std::string str; @@ -235,10 +260,13 @@ SO_EXPORT int context_places_place_get_name(context_places_place_h place, char** ASSERT_ALLOC(*name); return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_get_location(context_places_place_h place, double* latitude, double* longitude, double* accuracy) +EXPORT_API int context_places_place_get_location(context_places_place_h place, double* latitude, double* longitude, double* accuracy) { +#if 0 ASSERT_NOT_NULL(place && latitude && longitude && accuracy); ctx::Json locationJson; @@ -268,10 +296,13 @@ SO_EXPORT int context_places_place_get_location(context_places_place_h place, do *accuracy = acc; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_get_creation_date(context_places_place_h place, time_t* timestamp) +EXPORT_API int context_places_place_get_creation_date(context_places_place_h place, time_t* timestamp) { +#if 0 ASSERT_NOT_NULL(place && timestamp); int64_t tmp_timestamp; @@ -283,19 +314,25 @@ SO_EXPORT int context_places_place_get_creation_date(context_places_place_h plac *timestamp = static_cast(tmp_timestamp); return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_destroy(context_places_place_h place) +EXPORT_API int context_places_place_destroy(context_places_place_h place) { +#if 0 ASSERT_NOT_NULL(place); delete place; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_place_get_wifi_ap_list(context_places_place_h place, context_places_wifi_ap_list_h* list) +EXPORT_API int context_places_place_get_wifi_ap_list(context_places_place_h place, context_places_wifi_ap_list_h* list) { +#if 0 ASSERT_NOT_NULL(place && list); *list = NULL; @@ -316,10 +353,13 @@ SO_EXPORT int context_places_place_get_wifi_ap_list(context_places_place_h place (*list)->current = 0; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_h list, int* count) +EXPORT_API int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_h list, int* count) { +#if 0 ASSERT_NOT_NULL(list && count); *count = 0; @@ -329,10 +369,13 @@ SO_EXPORT int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_ *count = result; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_wifi_ap_list_get_current(context_places_wifi_ap_list_h list, char** bssid, char** essid) +EXPORT_API int context_places_wifi_ap_list_get_current(context_places_wifi_ap_list_h list, char** bssid, char** essid) { +#if 0 ASSERT_NOT_NULL(list && bssid && essid); ctx::Json wifiAPJson; @@ -360,19 +403,25 @@ SO_EXPORT int context_places_wifi_ap_list_get_current(context_places_wifi_ap_lis ASSERT_ALLOC(*essid); return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_wifi_ap_list_move_first(context_places_wifi_ap_list_h list) +EXPORT_API int context_places_wifi_ap_list_move_first(context_places_wifi_ap_list_h list) { +#if 0 ASSERT_NOT_NULL(list); list->current = 0; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_h list) +EXPORT_API int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_h list) { +#if 0 ASSERT_NOT_NULL(list); IF_FAIL_RETURN_TAG( @@ -383,19 +432,25 @@ SO_EXPORT int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_ list->current++; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_wifi_ap_list_destroy(context_places_wifi_ap_list_h list) +EXPORT_API int context_places_wifi_ap_list_destroy(context_places_wifi_ap_list_h list) { +#if 0 ASSERT_NOT_NULL(list); delete list; return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_is_supported(bool *supported) +EXPORT_API int context_places_is_supported(bool *supported) { +#if 0 ctx::DBusClient dbusClient; int error = dbusClient.isSupported(PLACE_DETECTION_SUBJECT); if (error == ERR_NONE) { @@ -409,10 +464,15 @@ SO_EXPORT int context_places_is_supported(bool *supported) } _D(""); return CONTEXT_PLACES_ERROR_NONE; +#endif + if (supported) + *supported = false; + return TIZEN_ERROR_NONE; } -SO_EXPORT int context_places_consent(bool consent) +EXPORT_API int context_places_consent(bool consent) { +#if 0 _D(""); ctx::Json option; option.set(NULL, PLACE_DETECTION_REQUEST_CONSENT, consent ? MYPLACE_SETTING_VALUE_TRUE : MYPLACE_SETTING_VALUE_FALSE); @@ -424,10 +484,13 @@ SO_EXPORT int context_places_consent(bool consent) _E, "Setting consent value failed"); return CONTEXT_PLACES_ERROR_NONE; +#endif + return TIZEN_ERROR_NOT_SUPPORTED; } -SO_EXPORT int context_places_is_consented(bool *consented) +EXPORT_API int context_places_is_consented(bool *consented) { +#if 0 _D(""); ctx::Json option; option.set(NULL, PLACE_DETECTION_REQUEST, PLACE_DETECTION_REQUEST_CONSENT); @@ -455,4 +518,8 @@ SO_EXPORT int context_places_is_consented(bool *consented) } return CONTEXT_PLACES_ERROR_NONE; +#endif + if (consented) + *consented = false; + return TIZEN_ERROR_NONE; } -- 2.7.4 From 95a0f63149656fafac773f454a58f80c7a668f9c Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Thu, 2 Mar 2017 12:19:43 +0900 Subject: [PATCH 09/16] Update the license date to 2015-2017 Change-Id: I88aa61e4c5a839825b1c78161d455b9c9dd659d8 Signed-off-by: Mu-Woong Lee --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6b17abb..bbb021e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved. +Copyright (c) 2015 - 2017 Samsung Electronics Co., Ltd. All rights reserved. Apache License Version 2.0, January 2004 -- 2.7.4 From 09625cd5d3573254865c3a6934afd855c8b299c0 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Thu, 2 Mar 2017 12:16:05 +0900 Subject: [PATCH 10/16] Rename the package to capi-context from context Change-Id: Ib48e5fbb50bb2643dac33cae28cf6447c5a35257 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 4 +-- context.pc.in => capi-context.pc.in | 0 .../{context.manifest => capi-context.manifest} | 0 packaging/{context.spec => capi-context.spec} | 35 +++++++++------------- testsuite/CMakeLists.txt | 2 +- ...xt-test.manifest => capi-context-test.manifest} | 0 6 files changed, 17 insertions(+), 24 deletions(-) rename context.pc.in => capi-context.pc.in (100%) rename packaging/{context.manifest => capi-context.manifest} (100%) rename packaging/{context.spec => capi-context.spec} (65%) rename testsuite/{context-test.manifest => capi-context-test.manifest} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc56dab..dfc7c2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(context) +PROJECT(capi-context) INCLUDE(GNUInstallDirs) # Targets -SET(target "context") +SET(target ${PROJECT_NAME}) # Source Lists FILE(GLOB_RECURSE SRCS src/*.cpp) diff --git a/context.pc.in b/capi-context.pc.in similarity index 100% rename from context.pc.in rename to capi-context.pc.in diff --git a/packaging/context.manifest b/packaging/capi-context.manifest similarity index 100% rename from packaging/context.manifest rename to packaging/capi-context.manifest diff --git a/packaging/context.spec b/packaging/capi-context.spec similarity index 65% rename from packaging/context.spec rename to packaging/capi-context.spec index 022203b..995597a 100644 --- a/packaging/context.spec +++ b/packaging/capi-context.spec @@ -1,6 +1,6 @@ -Name: context +Name: capi-context Summary: Tizen Context Framework Native API -Version: 0.9.9 +Version: 1.0.0 Release: 1 Group: Service/Context License: Apache-2.0 @@ -14,6 +14,9 @@ BuildRequires: pkgconfig(bundle) BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(pkgmgr-info) +# Backward compatibility +Provides: context + %description Tizen Context Framework Native API @@ -23,29 +26,21 @@ Tizen Context Framework Native API %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -export CFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter" export CXXFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter" - -export CFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls" export CXXFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls" - -export CFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow" export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow" +export CXXFLAGS+=" -Wnon-virtual-dtor -std=c++0x" -export CFLAGS+=" -fno-common" -export CXXFLAGS+=" -Wnon-virtual-dtor" -export CXXFLAGS+=" -std=c++0x" - -#export CFLAGS+=" -Wcast-qual" -#export CXXFLAGS+=" -Wcast-qual" - -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -make %{?jobs:-j%jobs} +%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} +make %{?_smp_mflags} %install -rm -rf %{buildroot} %make_install +# Backward compatibility +ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/context.pc +ln -s lib%{name}.so.%{version} %{buildroot}/%{_libdir}/libcontext.so.0 + %post /sbin/ldconfig @@ -54,7 +49,6 @@ rm -rf %{buildroot} %files %manifest packaging/%{name}.manifest -%defattr(-,root,root,-) %{_libdir}/*.so* %license LICENSE @@ -67,9 +61,8 @@ Requires: %{name} = %{version}-%{release} Tizen Context Framework Native API (Development) %files devel -%defattr(-,root,root,-) %{_includedir}/context-service/*.h -%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/*.pc %package test Summary: Tizen Context Framework Testsuite @@ -79,5 +72,5 @@ Group: Service/Context Tizen Context Framework Testsuite %files test -%manifest testsuite/context-test.manifest +%manifest testsuite/capi-context-test.manifest %{_bindir}/context-test diff --git a/testsuite/CMakeLists.txt b/testsuite/CMakeLists.txt index 30e85d2..2469f29 100644 --- a/testsuite/CMakeLists.txt +++ b/testsuite/CMakeLists.txt @@ -1,5 +1,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(context-test) +PROJECT(capi-context-test) SET(TEST_EXEC context-test) # Source List diff --git a/testsuite/context-test.manifest b/testsuite/capi-context-test.manifest similarity index 100% rename from testsuite/context-test.manifest rename to testsuite/capi-context-test.manifest -- 2.7.4 From 5cc269b9e18d5ccc3d41da1e57c353081589e43d Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 15:48:37 +0900 Subject: [PATCH 11/16] Add a dummy package context-devel to avoid obs unresolvable issues Change-Id: Iccccd3c8c732c69c94604abdb37b93e3e624c27c Signed-off-by: Mu-Woong Lee --- packaging/capi-context.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packaging/capi-context.spec b/packaging/capi-context.spec index 995597a..d96b234 100644 --- a/packaging/capi-context.spec +++ b/packaging/capi-context.spec @@ -74,3 +74,13 @@ Tizen Context Framework Testsuite %files test %manifest testsuite/capi-context-test.manifest %{_bindir}/context-test + + +%package -n context-devel +Summary: Dummy package for OBS build +Group: Framework/context + +%description -n context-devel +Dummy package for OBS build + +%files -n context-devel -- 2.7.4 From 250d3ced43dc45171cb9c380072e92878ab72170 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 16:20:27 +0900 Subject: [PATCH 12/16] Add a dummy package context to avoid obs image creation failure Change-Id: I777808378920357698726f848046d0609569df2f Signed-off-by: Mu-Woong Lee --- packaging/capi-context.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/capi-context.spec b/packaging/capi-context.spec index d96b234..6d8e64d 100644 --- a/packaging/capi-context.spec +++ b/packaging/capi-context.spec @@ -76,6 +76,15 @@ Tizen Context Framework Testsuite %{_bindir}/context-test +%package -n context +Summary: Dummy package for OBS image creation +Group: Framework/context + +%description -n context +Dummy package for OBS build + +%files -n context + %package -n context-devel Summary: Dummy package for OBS build Group: Framework/context -- 2.7.4 From 4463609a0b469738a6bd0500ad104a67efc29293 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 7 Mar 2017 16:35:53 +0900 Subject: [PATCH 13/16] Disable the conflicting virtual package Change-Id: I5707d4d51e2153a6e859c57f1f87a29621a79678 Signed-off-by: Mu-Woong Lee --- packaging/capi-context.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/capi-context.spec b/packaging/capi-context.spec index 6d8e64d..8bf99e1 100644 --- a/packaging/capi-context.spec +++ b/packaging/capi-context.spec @@ -15,7 +15,7 @@ BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(pkgmgr-info) # Backward compatibility -Provides: context +#Provides: context %description Tizen Context Framework Native API @@ -79,6 +79,7 @@ Tizen Context Framework Testsuite %package -n context Summary: Dummy package for OBS image creation Group: Framework/context +Requires: %{name} %description -n context Dummy package for OBS build -- 2.7.4 From 7f318d5d6f72feec4b93069a6ff34ac4dc9e09f0 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Sat, 18 Mar 2017 06:30:04 -0700 Subject: [PATCH 14/16] Remove dummy packages context & context-devel Change-Id: Ic853ad73ea2c4f598e05dfde55633c2024838197 Signed-off-by: Mu-Woong Lee --- packaging/capi-context.spec | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/packaging/capi-context.spec b/packaging/capi-context.spec index 8bf99e1..71c97df 100644 --- a/packaging/capi-context.spec +++ b/packaging/capi-context.spec @@ -1,6 +1,6 @@ Name: capi-context Summary: Tizen Context Framework Native API -Version: 1.0.0 +Version: 1.0.1 Release: 1 Group: Service/Context License: Apache-2.0 @@ -15,7 +15,7 @@ BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(pkgmgr-info) # Backward compatibility -#Provides: context +Provides: context %description Tizen Context Framework Native API @@ -74,23 +74,3 @@ Tizen Context Framework Testsuite %files test %manifest testsuite/capi-context-test.manifest %{_bindir}/context-test - - -%package -n context -Summary: Dummy package for OBS image creation -Group: Framework/context -Requires: %{name} - -%description -n context -Dummy package for OBS build - -%files -n context - -%package -n context-devel -Summary: Dummy package for OBS build -Group: Framework/context - -%description -n context-devel -Dummy package for OBS build - -%files -n context-devel -- 2.7.4 From 386f53aea5827a333e6ae7d5f8625d87e9a4f995 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Wed, 5 Apr 2017 16:55:54 +0900 Subject: [PATCH 15/16] Fix the build script typos and nonconventional so symlink packaging Change-Id: If1e8854fadd882f2b00867635f992fc88af5ced5 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 5 ++--- packaging/capi-context.spec | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc7c2e..9ab14ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ) ADD_DEFINITIONS(-O2 -Wall -fPIC -fdata-sections -ffunction-sections -fvisibility=hidden) -SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-section -Wl,--print-gc-section") +SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-sections -Wl,--print-gc-sections") # Building Library pkg_check_modules(api_pkg REQUIRED ${DEPS}) @@ -46,11 +46,10 @@ SET(VERSION ${FULLVER}) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(PC_NAME ${PROJECT_NAME}) SET(PC_INCLUDE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/context-service") -SET(PC_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +SET(PC_LIBDIR "${CMAKE_INSTALL_LIBDIR}") SET(PC_DESCRIPTION "Tizen Context Framework Native API") SET(PC_REQUIRED ${DEPS}) SET(PC_LDFLAGS -l${target}) -SET(PC_CFLAGS -I\${includedir}/context-service) CONFIGURE_FILE( ${PROJECT_NAME}.pc.in diff --git a/packaging/capi-context.spec b/packaging/capi-context.spec index 71c97df..1e5ee16 100644 --- a/packaging/capi-context.spec +++ b/packaging/capi-context.spec @@ -49,7 +49,7 @@ ln -s lib%{name}.so.%{version} %{buildroot}/%{_libdir}/libcontext.so.0 %files %manifest packaging/%{name}.manifest -%{_libdir}/*.so* +%{_libdir}/*.so.* %license LICENSE %package devel @@ -62,6 +62,7 @@ Tizen Context Framework Native API (Development) %files devel %{_includedir}/context-service/*.h +%{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %package test @@ -74,3 +75,4 @@ Tizen Context Framework Testsuite %files test %manifest testsuite/capi-context-test.manifest %{_bindir}/context-test +%license LICENSE -- 2.7.4 From 9a634b673d1b55faff1c0605da8cdaf334b24bb9 Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Mon, 3 Apr 2017 18:48:28 +0900 Subject: [PATCH 16/16] Doxygen: fix the broken feature page link Change-Id: I6bb4ca4769eb762bffd9ad175020f568626d932e Signed-off-by: Mu-Woong Lee (cherry picked from commit de7bcd549bc2240cb583a3d6c7fb99ac52328b2a) --- doc/context_trigger_doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/context_trigger_doc.h b/doc/context_trigger_doc.h index 8d84f5b..457a951 100644 --- a/doc/context_trigger_doc.h +++ b/doc/context_trigger_doc.h @@ -79,5 +79,5 @@ * To ensure your application is only running on the device with specific features, * please define the features in your manifest file using the manifest editor in the SDK. * More details on featuring your application can be found from - * Feature Element. + * Feature Element. */ -- 2.7.4