Client to list networks/services from connman.
Client to list networks/services from connman.
#include "Eldbus.h"
#include <Ecore.h>
static void
{
const char *errname, *errmsg;
{
fprintf(stderr, "Error: %s %s\n", errname, errmsg);
return;
}
{
fprintf(stderr, "Error: could not get array\n");
return;
}
{
const char *path;
{
fprintf(stderr, "Error: could not get entry contents\n");
return;
}
printf("service: %s\n", path);
{
const char *key;
&variant))
{
fprintf(stderr,
"Error: could not get property contents\n");
return;
}
printf("\t%s: type %s\n", key,
}
}
}
int
main(void)
{
if (!conn)
{
fprintf(stderr, "Error: could not get system bus\n");
return EXIT_FAILURE;
}
if (!obj)
{
fprintf(stderr, "Error: could not get object\n");
return EXIT_FAILURE;
}
if (!manager)
{
fprintf(stderr, "Error: could not get proxy\n");
return EXIT_FAILURE;
}
-1, "");
if (!pending)
{
fprintf(stderr, "Error: could not call\n");
return EXIT_FAILURE;
}
return 0;
}
EAPI int ecore_shutdown(void)
Shuts down connections, signal handlers sockets etc.
Definition: ecore.c:371
EAPI int ecore_init(void)
Sets up connections, signal handlers, sockets etc.
Definition: ecore.c:230
void ecore_main_loop_begin(void)
Runs the application main loop.
Definition: ecore_main.c:1311
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition: eina_types.h:339
void eldbus_connection_unref(Eldbus_Connection *conn)
Decrement connection reference count.
Definition: eldbus_core.c:1306
Eldbus_Connection * eldbus_connection_get(Eldbus_Connection_Type type)
Establish a connection to bus and integrate it with the ecore main loop.
Definition: eldbus_core.c:1102
struct _Eldbus_Message_Iter Eldbus_Message_Iter
Represents an iterator over a complex message type (array, dict, struct, or variant).
Definition: Eldbus.h:181
struct _Eldbus_Message Eldbus_Message
Represents the way data is sent and received in DBus.
Definition: Eldbus.h:173
EAPI int eldbus_shutdown(void)
Shutdown eldbus.
Definition: eldbus_core.c:246
struct _Eldbus_Pending Eldbus_Pending
Represents a message that has been sent but has not yet reached its destination.
Definition: Eldbus.h:188
EAPI int eldbus_init(void)
Initialize eldbus.
Definition: eldbus_core.c:128
Eina_Bool eldbus_message_iter_get_and_next(Eldbus_Message_Iter *iter, char signature,...)
Useful when iterating over arrays.
Definition: eldbus_message.c:736
char * eldbus_message_iter_signature_get(Eldbus_Message_Iter *iter)
Returns the current signature of a message iterator.
Definition: eldbus_message.c:605
Eina_Bool eldbus_message_iter_arguments_get(Eldbus_Message_Iter *iter, const char *signature,...)
Get data from Eldbus_Message_Iter, for each complete type must have a pointer to store his value,...
Definition: eldbus_message.c:842
Eina_Bool eldbus_message_error_get(const Eldbus_Message *msg, const char **name, const char **text)
Get the error text and name from a Eldbus_Message.
Definition: eldbus_message.c:233
Eina_Bool eldbus_message_arguments_get(const Eldbus_Message *msg, const char *signature,...)
Get the arguments from an Eldbus_Message.
Definition: eldbus_message.c:274
Eldbus_Object * eldbus_object_get(Eldbus_Connection *conn, const char *bus, const char *path)
Get an object of the given bus and path.
Definition: eldbus_object.c:188
void eldbus_object_unref(Eldbus_Object *obj)
Decrease object reference.
Definition: eldbus_object.c:250
Eldbus_Pending * eldbus_proxy_call(Eldbus_Proxy *proxy, const char *member, Eldbus_Message_Cb cb, const void *cb_data, double timeout, const char *signature,...)
Call a method in proxy.
Definition: eldbus_proxy.c:621
Eldbus_Proxy * eldbus_proxy_get(Eldbus_Object *obj, const char *interface)
Get a proxy of the following interface name in a Eldbus_Object.
Definition: eldbus_proxy.c:208
void eldbus_proxy_unref(Eldbus_Proxy *proxy)
Decrease proxy reference.
Definition: eldbus_proxy.c:263
struct _Eldbus_Connection Eldbus_Connection
Represents a connection of one the type of connection with the DBus daemon.
Definition: Eldbus.h:227
struct _Eldbus_Proxy Eldbus_Proxy
Represents a client object bound to an interface.
Definition: Eldbus.h:221
struct _Eldbus_Object Eldbus_Object
Represents an object path already attached with bus name or unique id.
Definition: Eldbus.h:233