return 0;
}
+//& type: auto
+//& purpose: Sets a text input box to reply directly on the notification.
+/**
+* @testcase ITc_notification_set_text_input_p
+* @since_tizen 3.0
+* @author SRID(nibha.sharma)
+* @reviewer SRID(a.pandia1)
+* @type auto
+* @description Sets a text input box to reply directly on the notification.
+* @scenario Create notification handle\n
+* Set Pkg name\n
+* Insert notification handle\n
+* call notification_set_text_input
+* @apicovered notification_set_text_input
+* @passcase notification_set_text_input is successful and behave properly
+* @failcase notification_set_text_input gets failed
+* @precondition NA
+* @postcondition NA
+*/
+
+int ITc_notification_set_text_input_p(void)
+{
+ START_TEST;
+
+ char* pSetAppID = "org.tizen.app"; //dummy app id
+ notification_h hNotification;
+ app_control_h hAppControl;
+
+ hNotification = notification_create(NOTIFICATION_TYPE_NOTI);
+ CHECK_HANDLE(hNotification, "notification_create");
+
+ int nRet = notification_set_text_input(hNotification, 160);
+ PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text_input", NotificationGetError(nRet),FREE_MEMORY(hNotification));
+
+ nRet = notification_set_text(hNotification, NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, "I'm Title", "TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
+ PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", NotificationGetError(nRet),FREE_MEMORY(hNotification));
+
+ nRet = notification_set_text(hNotification, NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, "I'm Title", "TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
+ PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", NotificationGetError(nRet),FREE_MEMORY(hNotification));
+
+ nRet = app_control_create(&hAppControl);
+ PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_create", Application_AppControlGetError(nRet));
+ if(NULL == hAppControl)
+ {
+ FPRINTF("[Line : %d][%s]app_control_create returned NULL handle value\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = app_control_set_app_id(hAppControl, pSetAppID);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", Application_AppControlGetError(nRet), app_control_destroy(hAppControl););
+
+ nRet = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_operation", Application_AppControlGetError(nRet), app_control_destroy(hAppControl););
+
+ nRet = notification_set_event_handler(hNotification, NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON, hAppControl);
+ PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_event_handler", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle();app_control_destroy(hAppControl););
+
+ nRet = app_control_destroy(hAppControl);
+ PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", Application_AppControlGetError(nRet));
+
+ nRet = notification_post(hNotification);
+ PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "notification_post", Application_AppControlGetError(nRet));
+ FREE_MEMORY(hNotification);
+
+ return 0;
+}
/** @} */ //end of itc-notification
/** @} */ //end of itc-notification-testcases
extern int ITc_notification_set_get_auto_remove_p(void);
extern int ITc_notification_create_save_from_template_p(void);
extern int ITc_notification_get_noti_block_state_p(void);
+extern int ITc_notification_set_text_input_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p", ITc_notification_clone_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_set_get_auto_remove_p", ITc_notification_set_get_auto_remove_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_create_save_from_template_p", ITc_notification_create_save_from_template_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_get_noti_block_state_p", ITc_notification_get_noti_block_state_p, ITs_notification_startup, ITs_notification_cleanup},
+ {"ITc_notification_set_text_input_p", ITc_notification_set_text_input_p, ITs_notification_startup, ITs_notification_cleanup},
{NULL, NULL}
};
extern int ITc_notification_set_get_auto_remove_p(void);
extern int ITc_notification_create_save_from_template_p(void);
extern int ITc_notification_get_noti_block_state_p(void);
+extern int ITc_notification_set_text_input_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p", ITc_notification_clone_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_set_get_auto_remove_p", ITc_notification_set_get_auto_remove_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_create_save_from_template_p", ITc_notification_create_save_from_template_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_get_noti_block_state_p", ITc_notification_get_noti_block_state_p, ITs_notification_startup, ITs_notification_cleanup},
+ {"ITc_notification_set_text_input_p", ITc_notification_set_text_input_p, ITs_notification_startup, ITs_notification_cleanup},
{NULL, NULL}
};
extern int ITc_notification_set_get_auto_remove_p(void);
extern int ITc_notification_create_save_from_template_p(void);
extern int ITc_notification_get_noti_block_state_p(void);
+extern int ITc_notification_set_text_input_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p", ITc_notification_clone_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_set_get_auto_remove_p", ITc_notification_set_get_auto_remove_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_create_save_from_template_p", ITc_notification_create_save_from_template_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_get_noti_block_state_p", ITc_notification_get_noti_block_state_p, ITs_notification_startup, ITs_notification_cleanup},
+ {"ITc_notification_set_text_input_p", ITc_notification_set_text_input_p, ITs_notification_startup, ITs_notification_cleanup},
{NULL, NULL}
};
extern int ITc_notification_set_get_auto_remove_p(void);
extern int ITc_notification_create_save_from_template_p(void);
extern int ITc_notification_get_noti_block_state_p(void);
+extern int ITc_notification_set_text_input_p(void);
testcase tc_array[] = {
{"ITc_notification_clone_p", ITc_notification_clone_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_set_get_auto_remove_p", ITc_notification_set_get_auto_remove_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_create_save_from_template_p", ITc_notification_create_save_from_template_p, ITs_notification_startup, ITs_notification_cleanup},
{"ITc_notification_get_noti_block_state_p", ITc_notification_get_noti_block_state_p, ITs_notification_startup, ITs_notification_cleanup},
+ {"ITc_notification_set_text_input_p", ITc_notification_set_text_input_p, ITs_notification_startup, ITs_notification_cleanup},
{NULL, NULL}
};