From: Somin Kim Date: Mon, 14 Mar 2016 05:26:53 +0000 (+0900) Subject: EVENT_CONTACTS_DB_CHANGED added X-Git-Tag: submit/tizen/20160315.040147~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F62111%2F6;p=platform%2Fcore%2Fapi%2Fcontext.git EVENT_CONTACTS_DB_CHANGED added Change-Id: I4ac407807e1b2763207efa84b60f9e3eb690fddb Signed-off-by: Somin Kim --- diff --git a/include/context_trigger.h b/include/context_trigger.h index c3d6d23..d219bd0 100644 --- a/include/context_trigger.h +++ b/include/context_trigger.h @@ -177,6 +177,14 @@ extern "C" { */ #define CONTEXT_TRIGGER_TYPE "Type" +/** + * @brief The attribute key denoting "view". + * @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 3.0 + */ +#define CONTEXT_TRIGGER_VIEW "View" + /** * @brief The attribute key denoting "event". * @details This can be used as left operands of context_trigger_rule_entry_add_comparison_string().@n @@ -483,6 +491,22 @@ extern "C" { */ #define CONTEXT_TRIGGER_MMS "MMS" +/** + * @brief 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 + */ +#define CONTEXT_TRIGGER_MY_PROFILE "MyProfile" + +/** + * @brief 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 + */ +#define CONTEXT_TRIGGER_PERSON "Person" + /** * @brief The attribute value denoting the "detected" event. * @details This can be used as right operands of context_trigger_rule_entry_add_comparison_string().@n @@ -543,6 +567,7 @@ typedef enum { CONTEXT_TRIGGER_EVENT_CALL = 0x10300, /**< Call state changed @n Privilege: http://tizen.org/privilege/telephony */ CONTEXT_TRIGGER_EVENT_EMAIL, /**< Email sent/received */ CONTEXT_TRIGGER_EVENT_MESSAGE, /**< Message sent/received @n Privilege: http://tizen.org/privilege/message.read */ + CONTEXT_TRIGGER_EVENT_CONTACTS_DB_CHANGED, /**< Contacts db changed (Since Tizen 3.0) @n Privilege: http://tizen.org/privilege/contact.read */ CONTEXT_TRIGGER_EVENT_ACTIVITY_STATIONARY = 0x10400, /**< 'Stationary' activity detected */ CONTEXT_TRIGGER_EVENT_ACTIVITY_WALKING, /**< 'Walking' activity detected */ CONTEXT_TRIGGER_EVENT_ACTIVITY_RUNNING, /**< 'Running' activity detected */ @@ -597,17 +622,12 @@ typedef struct _context_trigger_rule_entry_s* context_trigger_rule_entry_h; * A rule only can be enabled, disabled, or removed by the application that has registered the rule. * @since_tizen 2.4 * - * @privlevel public - * @privilege http://tizen.org/privilege/alarm.set @n - * http://tizen.org/privilege/telephony @n - * http://tizen.org/privilege/message.read @n - * http://tizen.org/privilege/network.get - * * @remarks When registering a new rule, * regarding the event and condition items used to compose the rule, * the application may require one or more privileges. * If the application does not have a necessary privilege, * #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED is returned. + * See #context_trigger_event_e and #context_trigger_condition_e for the necessary privileges. * * @param[in] rule The rule to register * @param[out] rule_id The ID assigned to the @c rule diff --git a/include/context_trigger_types_internal.h b/include/context_trigger_types_internal.h index 3c591d3..d2389ca 100644 --- a/include/context_trigger_types_internal.h +++ b/include/context_trigger_types_internal.h @@ -78,6 +78,7 @@ #define CT_EVENT_CALL "social/call" #define CT_EVENT_EMAIL "social/email" #define CT_EVENT_MESSAGE "social/message" +#define CT_EVENT_CONTACTS_DB_CHANGED "social/contacts" #define CT_EVENT_ACTIVITY_STATIONARY "activity/stationary" #define CT_EVENT_ACTIVITY_WALKING "activity/walking" #define CT_EVENT_ACTIVITY_RUNNING "activity/running" diff --git a/src/context_trigger.cpp b/src/context_trigger.cpp index dd10552..768a209 100644 --- a/src/context_trigger.cpp +++ b/src/context_trigger.cpp @@ -1012,6 +1012,9 @@ std::string convert_event_to_string(context_trigger_event_e item) case CONTEXT_TRIGGER_EVENT_MESSAGE: str = CT_EVENT_MESSAGE; break; + case CONTEXT_TRIGGER_EVENT_CONTACTS_DB_CHANGED: + str = CT_EVENT_CONTACTS_DB_CHANGED; + break; case CONTEXT_TRIGGER_EVENT_ACTIVITY_STATIONARY: str = CT_EVENT_ACTIVITY_STATIONARY; break;