cosmetics
This commit is contained in:
parent
a14a2a48dd
commit
15d14d5099
18
main.c
18
main.c
@ -27,15 +27,10 @@ typedef struct service
|
|||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
int i;
|
//int i;
|
||||||
|
//Service serviceSys;
|
||||||
Service serviceSys;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DBusConnection *connection=NULL;
|
DBusConnection *connection=NULL;
|
||||||
DBusError error;
|
DBusError error;
|
||||||
// char *result=NULL;
|
|
||||||
|
|
||||||
dbus_error_init(&error);
|
dbus_error_init(&error);
|
||||||
connection = dbus_bus_get(DBUS_BUS_SYSTEM,&error);//DBUS_BUS_SYSTEM DBUS_BUS_SESSION
|
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");
|
fprintf(stderr,"requires a command\n--\n# getSendStatus [objectpath]\n# listUnits\n#set token with GOTIFY_TOKEN=\"sjdfoiasfd\"\n--\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*interactive
|
/*interactive
|
||||||
@ -97,8 +89,6 @@ int main(int argc,char *argv[])
|
|||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check pointer of error!!
|
int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check pointer of error!!
|
||||||
{
|
{
|
||||||
int ret=0,i=0;
|
int ret=0,i=0;
|
||||||
@ -140,6 +130,7 @@ int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetSendStatus(DBusConnection *connection,char *objectpath)
|
int GetSendStatus(DBusConnection *connection,char *objectpath)
|
||||||
{
|
{
|
||||||
char *result=0;
|
char *result=0;
|
||||||
@ -170,7 +161,6 @@ int checkState(char *ServiceName,char *result)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int gotify_message(char *url,char *title,char *message)
|
int gotify_message(char *url,char *title,char *message)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -354,7 +344,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p
|
|||||||
DBusMessageIter variant_iter;
|
DBusMessageIter variant_iter;
|
||||||
DBusMessageIter sub_iter;
|
DBusMessageIter sub_iter;
|
||||||
int ret3;
|
int ret3;
|
||||||
|
|
||||||
char *reply_msg=NULL;
|
char *reply_msg=NULL;
|
||||||
int ret1,ret2;
|
int ret1,ret2;
|
||||||
char *param2 = "org.freedesktop.systemd1.Unit";
|
char *param2 = "org.freedesktop.systemd1.Unit";
|
||||||
@ -372,7 +361,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p
|
|||||||
printf("message created!\n");
|
printf("message created!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(param2 != NULL)
|
if(param2 != NULL)
|
||||||
{
|
{
|
||||||
dbus_message_iter_init_append(msg,&iter);
|
dbus_message_iter_init_append(msg,&iter);
|
||||||
|
Loading…
Reference in New Issue
Block a user