X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=send_notification.c;h=a42b9dd3a081c5cec9fc3650144140f54bc53e00;hb=65300b4a47b42a6dfcab8a3350704923b79e39df;hp=52e568647389fd7a38c7edcebb1386054ec163cb;hpb=340924fcd3bcf1f0d0ca1e8fd32bfe75b02ab59b;p=platform%2Fcore%2Fappfw%2Fnotification-service.git diff --git a/send_notification.c b/send_notification.c index 52e5686..a42b9dd 100644 --- a/send_notification.c +++ b/send_notification.c @@ -75,6 +75,7 @@ main(int argc, char **argv) char *icon = NULL; char *image = NULL; int imageType = 0; + Eina_Bool quit = EINA_FALSE; Eina_Bool remove = EINA_FALSE; notification_h noti = NULL; notification_error_e err = NOTIFICATION_ERROR_NONE; @@ -85,7 +86,8 @@ main(int argc, char **argv) ECORE_GETOPT_VALUE_STR(icon), ECORE_GETOPT_VALUE_STR(image), ECORE_GETOPT_VALUE_INT(imageType), - ECORE_GETOPT_VALUE_NONE + ECORE_GETOPT_VALUE_NONE, + ECORE_GETOPT_VALUE_BOOL(quit) }; if (!ecore_init()) { @@ -98,6 +100,9 @@ main(int argc, char **argv) return -1; } + if (quit) + return 0; + noti = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE); @@ -121,7 +126,7 @@ main(int argc, char **argv) } err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, - title ? title : "Default Content", + content ? content : "Default Content", NULL, NOTIFICATION_VARIABLE_TYPE_NONE); if (err != NOTIFICATION_ERROR_NONE) { fprintf(stderr, "Unable to set notification content: %s\n", error_to_string(err));