{
NOTI_EX_ITEM_POLICY_NONE,
NOTI_EX_ITEM_POLICY_ON_BOOT_CLEAR,
- NOTI_EX_ITEM_POLICY_SIM_MODE
+ NOTI_EX_ITEM_POLICY_SIM_MODE,
+ NOTI_EX_ITEM_POLICY_DISABLE_AUTO_DELETE
};
nRet = CreateButton();
return 0;
}
+//& type : auto
+//& purpose: Sets and gets extenasion data for notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_extension_data_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets extenasion data for notification_ex item.
+* @scenario Creates the notification_ex text item and create bundle value.\n
+* Set items extension, Get it again with the same key and check for Pass/Fail.
+* @apicovered noti_ex_item_set_extension_data, noti_ex_item_get_extension_data
+* @passcase noti_ex_item_set_extension_data, noti_ex_item_get_extension_data are successful and return correct value
+* @failcase noti_ex_item_set_extension_data, noti_ex_item_get_extension_data failed.
+* @precondition NA
+* @postcondition free bundle and Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_extension_data_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemText = NULL;
+
+ const char *pszTextID = "text_id";
+ const char *pszTextTitle = "textTitle";
+ const char *pszTextHyperLink = "testHyperLink";
+ const char *pszKey = "TEST_KEY";
+ const char *pszVal = "TEST_VALUE";
+ const char *pszExtKey = "key";
+
+ nRet = noti_ex_item_text_create(&hItemText, pszTextID, pszTextTitle, pszTextHyperLink);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemText, "noti_ex_item_text_create");
+
+ bundle *retBundleVal = NULL;
+ bundle *BundleVal = NULL;
+
+ BundleVal = bundle_create();
+ CHECK_HANDLE_CLEANUP(BundleVal, "bundle_create", noti_ex_item_destroy(hItemText));
+
+ nRet = bundle_add_str(BundleVal, pszKey, pszVal);
+ PRINT_RESULT_CLEANUP(BUNDLE_ERROR_NONE, nRet, "bundle_add_str", NotificationExGetError(nRet), bundle_free(BundleVal);noti_ex_item_destroy(hItemText));
+
+ //Target API
+ nRet = noti_ex_item_set_extension_data(hItemText, pszExtKey, BundleVal);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_extension_data", NotificationExGetError(nRet), bundle_free(BundleVal);noti_ex_item_destroy(hItemText));
+ bundle_free(BundleVal);
+
+ //Target API
+ nRet = noti_ex_item_get_extension_data(hItemText, pszExtKey, &retBundleVal);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_extension_data", NotificationExGetError(nRet), bundle_free(retBundleVal);noti_ex_item_destroy(hItemText));
+ CHECK_HANDLE_CLEANUP(retBundleVal, "noti_ex_item_get_extension_data", noti_ex_item_destroy(hItemText); bundle_free(retBundleVal));
+ bundle_free(retBundleVal);
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
/** @} */ //end of itc-notification-ex
/** @} */ //end of itc-notification-testcases
extern int ITc_noti_ex_item_checkbox_set_get_check_state_p(void);
extern int ITc_noti_ex_item_entry_set_multi_language_p(void);
extern int ITc_noti_ex_item_input_selector_set_multi_language_contents_p(void);
+extern int ITc_noti_ex_item_set_get_extension_data_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p",ITc_notification_clone_p,ITs_notification_startup,ITs_notification_cleanup},
{"ITc_noti_ex_item_checkbox_set_get_check_state_p", ITc_noti_ex_item_checkbox_set_get_check_state_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_entry_set_multi_language_p", ITc_noti_ex_item_entry_set_multi_language_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_input_selector_set_multi_language_contents_p", ITc_noti_ex_item_input_selector_set_multi_language_contents_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
+ {"ITc_noti_ex_item_set_get_extension_data_p", ITc_noti_ex_item_set_get_extension_data_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{NULL, NULL}
};
extern int ITc_noti_ex_item_checkbox_set_get_check_state_p(void);
extern int ITc_noti_ex_item_entry_set_multi_language_p(void);
extern int ITc_noti_ex_item_input_selector_set_multi_language_contents_p(void);
+extern int ITc_noti_ex_item_set_get_extension_data_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p",ITc_notification_clone_p,ITs_notification_startup,ITs_notification_cleanup},
{"ITc_noti_ex_item_checkbox_set_get_check_state_p", ITc_noti_ex_item_checkbox_set_get_check_state_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_entry_set_multi_language_p", ITc_noti_ex_item_entry_set_multi_language_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_input_selector_set_multi_language_contents_p", ITc_noti_ex_item_input_selector_set_multi_language_contents_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
+ {"ITc_noti_ex_item_set_get_extension_data_p", ITc_noti_ex_item_set_get_extension_data_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{NULL, NULL}
};
extern int ITc_noti_ex_item_entry_set_multi_language_p(void);
extern int ITc_noti_ex_item_input_selector_set_multi_language_contents_p(void);
extern int ITc_noti_ex_item_checkbox_set_get_check_state_p(void);
+extern int ITc_noti_ex_item_set_get_extension_data_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p",ITc_notification_clone_p,ITs_notification_startup,ITs_notification_cleanup},
{"ITc_noti_ex_item_entry_set_multi_language_p", ITc_noti_ex_item_entry_set_multi_language_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_input_selector_set_multi_language_contents_p", ITc_noti_ex_item_input_selector_set_multi_language_contents_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{"ITc_noti_ex_item_checkbox_set_get_check_state_p", ITc_noti_ex_item_checkbox_set_get_check_state_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
+ {"ITc_noti_ex_item_set_get_extension_data_p", ITc_noti_ex_item_set_get_extension_data_p, ITs_notification_ex_startup, ITs_notification_ex_cleanup},
{NULL, NULL}
};