{
char* pTempBundleStr = NULL;
nRetVal = bundle_get_str(tempBundle, (char *)KEY1, &pTempBundleStr);
- PRINT_RESULT(BUNDLE_ERROR_NONE, nRetVal, "bundle_get_str", BundleGetError(nRetVal));
- CHECK_HANDLE(pTempBundleStr,"bundle_get_str");
+ PRINT_RESULT_CLEANUP(BUNDLE_ERROR_NONE, nRetVal, "bundle_get_str", BundleGetError(nRetVal), FREE_MEMORY(pstBundleRaw);bundle_free(tempBundle));
+ CHECK_HANDLE_CLEANUP(pTempBundleStr,"bundle_get_str",FREE_MEMORY(pstBundleRaw);bundle_free(tempBundle));
if ( strcmp((char *)KEY1_VALUE, pTempBundleStr) != 0 )//not equal
{
- FPRINTF("[Line : %d][%s] bundle_decode failed, error returned = %s\\n", __LINE__, API_NAMESPACE, BundleGetError(nRetVal));
+ FPRINTF("[Line : %d][%s] bundle_get_str failed, error returned = %s\\n", __LINE__, API_NAMESPACE, BundleGetError(nRetVal));
FREE_MEMORY(pstBundleRaw);
bundle_free(tempBundle);
return 1;
eRetNotiErr = notification_set_auto_remove(g_NotificationHandle, bSetAutoRmv);
PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, eRetNotiErr, "notification_set_auto_remove", NotificationGetError(eRetNotiErr), FreeAndDeleteNotificationResourceHandle());
- eRetNotiErr = notification_get_auto_remove(g_NotificationHandle, &bGetAutoRmv);
+ eRetNotiErr = notification_get_auto_remove(g_NotificationHandle, &bGetAutoRmv);
PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, eRetNotiErr, "notification_get_auto_remove", NotificationGetError(eRetNotiErr), FreeAndDeleteNotificationResourceHandle());
- if ( bGetAutoRmv != false )
+ if ( bGetAutoRmv != bSetAutoRmv )
{
FPRINTF("[Line : %d][%s] set and get auto remove mis-match occurs, set auto remove = %d, get auto remove = %d\\n", __LINE__, API_NAMESPACE, bSetAutoRmv, bGetAutoRmv);
FreeAndDeleteNotificationResourceHandle();
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));
if(NULL == hAppControl)
{
FPRINTF("[Line : %d][%s]app_control_create returned NULL handle value\\n", __LINE__, API_NAMESPACE);
+ FREE_MEMORY(hNotification);
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););
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", Application_AppControlGetError(nRet), FREE_MEMORY(hNotification);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););
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_operation", Application_AppControlGetError(nRet), FREE_MEMORY(hNotification);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););
+ PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_event_handler", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle();FREE_MEMORY(hNotification);app_control_destroy(hAppControl););
nRet = app_control_destroy(hAppControl);
- PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", Application_AppControlGetError(nRet));
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", Application_AppControlGetError(nRet),FREE_MEMORY(hNotification));
nRet = notification_post(hNotification);
- PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "notification_post", Application_AppControlGetError(nRet));
+ PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "notification_post", Application_AppControlGetError(nRet));
FREE_MEMORY(hNotification);
return 0;