[UTC][data-control][Non-ACR][Remove wrong app file and add noti consumer]
authorHyunho Kang <hhstark.kang@samsung.com>
Mon, 12 Sep 2016 04:29:22 +0000 (13:29 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Mon, 12 Sep 2016 06:12:47 +0000 (23:12 -0700)
Change-Id: I489764c85cc8a02557aed6b074890b9bb03b1f05
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
16 files changed:
src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-arm.tpk [deleted file]
src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-i386.tpk [deleted file]
src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-arm.tpk [deleted file]
src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-i386.tpk [deleted file]
src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-arm.tpk [deleted file]
src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-i386.tpk [deleted file]
src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-arm.tpk [deleted file]
src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-i386.tpk [deleted file]
src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/data-control/utc-data-control-provider.c
src/utc/data-control/utc-data-control.h

diff --git a/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-arm.tpk b/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-arm.tpk
deleted file mode 100644 (file)
index a194c9d..0000000
Binary files a/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-arm.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-i386.tpk b/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-i386.tpk
deleted file mode 100644 (file)
index 5960649..0000000
Binary files a/src/utc/data-control/res/common_iot/org.tizen.datacontrolconsumer-1.0.0-i386.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk b/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..e9cc475
Binary files /dev/null and b/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk differ
diff --git a/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk b/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..d107f02
Binary files /dev/null and b/src/utc/data-control/res/common_iot/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk differ
diff --git a/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-arm.tpk b/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-arm.tpk
deleted file mode 100644 (file)
index a194c9d..0000000
Binary files a/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-arm.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-i386.tpk b/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-i386.tpk
deleted file mode 100644 (file)
index 5960649..0000000
Binary files a/src/utc/data-control/res/mobile/org.tizen.datacontrolconsumer-1.0.0-i386.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-arm.tpk b/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-arm.tpk
deleted file mode 100644 (file)
index a194c9d..0000000
Binary files a/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-arm.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-i386.tpk b/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-i386.tpk
deleted file mode 100644 (file)
index 5960649..0000000
Binary files a/src/utc/data-control/res/tv/org.tizen.datacontrolconsumer-1.0.0-i386.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk b/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..e9cc475
Binary files /dev/null and b/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk differ
diff --git a/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk b/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..d107f02
Binary files /dev/null and b/src/utc/data-control/res/tv/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk differ
diff --git a/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-arm.tpk b/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-arm.tpk
deleted file mode 100644 (file)
index a194c9d..0000000
Binary files a/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-arm.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-i386.tpk b/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-i386.tpk
deleted file mode 100644 (file)
index 5960649..0000000
Binary files a/src/utc/data-control/res/wearable/org.tizen.datacontrolconsumer-1.0.0-i386.tpk and /dev/null differ
diff --git a/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk b/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..e9cc475
Binary files /dev/null and b/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-arm.tpk differ
diff --git a/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk b/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..d107f02
Binary files /dev/null and b/src/utc/data-control/res/wearable/org.tizen.datacontrolnoticonsumer-1.0.0-i386.tpk differ
index 70a2813..b5f657e 100755 (executable)
@@ -30,7 +30,6 @@ static data_control_h __provider;
 static data_control_provider_sql_cb *sql_callback;
 static data_control_provider_map_cb *map_callback;
 static const char __consumer_app[] = "org.tizen.datacontrolnoticonsumer";
-static bool __is_foreach_check = false;
 
 void __run_normal_app() {
 
@@ -95,7 +94,7 @@ bool change_noti_consumer_list_cb(
     char *consumer_appid,
     void *user_data)
 {
-       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] change_noti_consumer_list_cb @@@@@@", __FUNCTION__, __LINE__);
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] change_noti_consumer_list_cb ", __FUNCTION__, __LINE__);
        normal_exit(0);
        return true;
 }
@@ -105,8 +104,7 @@ static bool consumer_filter_cb(
     char *consumer_appid,
     void *user_data)
 {
-       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] consumer_filter_cb @@@@@@", __FUNCTION__, __LINE__);
-
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] consumer_filter_cb ", __FUNCTION__, __LINE__);
        int ret;
        if (__is_foreach_check) {
                ret = data_control_provider_foreach_data_change_consumer(
@@ -115,7 +113,8 @@ static bool consumer_filter_cb(
                        NULL);
                assert_eq_with_exit(ret, DATA_CONTROL_ERROR_NONE);
        } else {
-               normal_exit(0);
+               /*  check foreach after consumer app's first add noti request (after registered) */
+               __is_foreach_check = true;
        }
        return true;
 }
@@ -536,11 +535,10 @@ int utc_data_control_provider_add_data_change_consumer_filter_cb_p(void)
        sql_callback->update_cb = update_request_cb;
 
        ret = data_control_provider_sql_register_cb(sql_callback, NULL);
-
        ret = data_control_provider_add_data_change_consumer_filter_cb(consumer_filter_cb, NULL, &filter_callback_id);
        assert_eq_with_exit(ret, DATA_CONTROL_ERROR_NONE);
        assert_with_exit(filter_callback_id > 0);
-       __run_normal_app();
+       normal_exit(0);
 
        return 0;
 }
@@ -634,7 +632,7 @@ int utc_data_control_provider_foreach_data_change_consumer_p(void)
        ret = data_control_provider_add_data_change_consumer_filter_cb(consumer_filter_cb, NULL, &filter_callback_id);
        assert_eq_with_exit(ret, DATA_CONTROL_ERROR_NONE);
        assert_with_exit(filter_callback_id > 0);
-       __is_foreach_check = true;
+       __is_foreach_check = false;
        __run_normal_app();
 
        return 0;
index 2082be3..22b95e2 100755 (executable)
@@ -9,6 +9,7 @@ int __result;
 char *__next_operation;
 int __correct_row_cnt;
 const char *__correct_value;
+bool __is_foreach_check;
 
 
 #define assert_with_exit(exp) do { \