Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (38 sloc) 1.24 KB
/*
* This file is part of jacknotifier - Jack Notification Daemon
* Copyright (C) 2012 Maxim A. Mikityanskiy - <maxtram95@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libnotify/notify.h>
#include <stdio.h>
NotifyNotification *notify = NULL;
int jn_notify_init()
{
return notify_init("Jack Notifier");
}
void jn_notify_fini()
{
notify_uninit();
}
void jn_notify_send(const char *message)
{
if (notify == NULL) {
notify = notify_notification_new(message, NULL, "audio-headset");
} else {
notify_notification_update(notify, message, NULL, "audio-headset");
}
notify_notification_show(notify, NULL);
printf("%s\n", message);
}