diff --git a/main.c b/main.c index d323d2f..a942510 100644 --- a/main.c +++ b/main.c @@ -27,15 +27,10 @@ typedef struct service int main(int argc,char *argv[]) { - int i; - - Service serviceSys; - - - + //int i; + //Service serviceSys; DBusConnection *connection=NULL; DBusError error; - // char *result=NULL; dbus_error_init(&error); connection = dbus_bus_get(DBUS_BUS_SYSTEM,&error);//DBUS_BUS_SYSTEM DBUS_BUS_SESSION @@ -81,9 +76,6 @@ int main(int argc,char *argv[]) { fprintf(stderr,"requires a command\n--\n# getSendStatus [objectpath]\n# listUnits\n#set token with GOTIFY_TOKEN=\"sjdfoiasfd\"\n--\n"); } - - - return 0; } /*interactive @@ -97,8 +89,6 @@ int main(int argc,char *argv[]) } */ - - int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check pointer of error!! { int ret=0,i=0; @@ -140,6 +130,7 @@ int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check } return 0; } + int GetSendStatus(DBusConnection *connection,char *objectpath) { char *result=0; @@ -170,7 +161,6 @@ int checkState(char *ServiceName,char *result) return 1; } - int gotify_message(char *url,char *title,char *message) { int ret; @@ -354,7 +344,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p DBusMessageIter variant_iter; DBusMessageIter sub_iter; int ret3; - char *reply_msg=NULL; int ret1,ret2; char *param2 = "org.freedesktop.systemd1.Unit"; @@ -371,7 +360,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p { printf("message created!\n"); } - if(param2 != NULL) {