forked from abort/Prowl-for-C
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
25 lines (21 loc) · 809 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <[email protected]> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return J. Dijkstra (04/29/2010)
* ----------------------------------------------------------------------------
*/
#include "prowl.h"
#include <stdio.h>
#include <stdlib.h>
#define APP_NAME "ProwlExample"
int main(int argc, char** argv) {
if (argc < 4)
{
printf("Usage: prowl <api_key> <priority-number> <event> <description>\n");
return 1;
}
printf("Return code: %d\n", prowl_push_msg(argv[1], atoi(argv[2]), APP_NAME, argv[3], argv[4]));
return 0;
}