Add data usage type for blocked msg 91/58091/4 accepted/tizen/ivi/20160218.023950 accepted/tizen/mobile/20160211.004016 accepted/tizen/tv/20160211.004028 accepted/tizen/wearable/20160211.004053 submit/tizen/20160205.065005 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
authorJongkyu Koo <jk.koo@samsung.com>
Wed, 27 Jan 2016 11:21:54 +0000 (20:21 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Wed, 3 Feb 2016 09:51:54 +0000 (01:51 -0800)
Change-Id: If4e149b8373eeb1c0b4647b5fad4661a77f6ddd1
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
include/contacts_types.h
server/db/ctsvc_db_plugin_phonelog.c

index 48caf5e..b4452eb 100644 (file)
@@ -264,7 +264,8 @@ typedef enum {
     CONTACTS_USAGE_STAT_TYPE_INCOMING_EMAIL,/**< Incoming email (Since 3.0) */
     CONTACTS_USAGE_STAT_TYPE_MISSED_CALL,     /**< Missed call (Since 3.0) */
     CONTACTS_USAGE_STAT_TYPE_REJECTED_CALL, /**< Rejected call (Since 3.0) */
-    CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL /**< Blocked call (Since 3.0) */
+    CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL, /**< Blocked call (Since 3.0) */
+    CONTACTS_USAGE_STAT_TYPE_BLOCKED_MSG /**< Blocked message (Since 3.0) */
 }contacts_usage_type_e;
 
 /**
index f199eb2..e55edb8 100644 (file)
@@ -385,8 +385,15 @@ static int __ctsvc_db_phonelog_increase_used_count(ctsvc_phonelog_s *phonelog)
        case CONTACTS_PLOG_TYPE_VIDEO_BLOCKED:
                type = CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL;
                break;
+
+       case CONTACTS_PLOG_TYPE_SMS_BLOCKED:
+       case CONTACTS_PLOG_TYPE_MMS_BLOCKED:
+               type = CONTACTS_USAGE_STAT_TYPE_BLOCKED_MSG;
+               break;
+
        default:
-               return CONTACTS_ERROR_NONE;
+               ERR("unknown log type (%d)", phonelog->log_type);
+               return CONTACTS_ERROR_INVALID_PARAMETER;
        }
 
        snprintf(query, sizeof(query),