Client to test complex types (arrays, structs, dicts) against a provided server (complex-types-server.c)
Client to test complex types (arrays, structs, dicts) against a provided server (complex-types-server.c)
#include "Eldbus.h"
#include <Ecore.h>
#define BUS "com.profusion"
#define PATH "/com/profusion/Test"
#define IFACE "com.profusion.Test"
{
printf("\nFishing...\n");
}
static void
{
int num2 = 0;
{
printf("Message error\n\n");
return;
}
{
printf("Error getting arguments.");
return;
}
printf("on_plus_one() %d\n", num2);
}
static void
{
const char *errname;
const char *errmsg;
printf("set_property_resp2()\n");
{
printf("Message error %s - %s\n\n", errname, errmsg);
return;
}
}
static void
{
char *type;
char *resp2;
const char *errname;
const char *errmsg;
printf("get_property_resp2()\n");
{
printf("Message error %s - %s\n\n", errname, errmsg);
return;
}
{
printf("Error getting arguments.");
return;
}
if (type[1])
{
printf("It is a complex type, not handle yet.\n\n");
return;
}
if (type[0] != 's')
{
printf("Expected type is string.\n\n");
return;
}
{
printf("error in eldbus_message_iter_arguments_get()\n\n");
return;
}
printf("resp2=%s\n", resp2);
free(type);
}
static void
{
int num;
printf("on_send_array_int()\n");
{
printf("Message error\n\n");
return;
}
{
printf("Error getting arguments.");
return;
}
{
printf("%d\n", num);
}
}
static void
{
char *txt = NULL;
char *string[10];
int i = 0;
int z;
printf("on_send_array()\n");
{
printf("Message error\n\n");
return;
}
{
printf("Error getting arguments.");
return;
}
{
string[i] = txt;
i++;
}
for (z = 0; z < i; z++)
printf("string = %s\n", string[z]);
}
static void
{
const char *errname;
const char *errmsg;
printf("on_receive_array_with_size()\n");
{
fprintf(stderr, "Error: %s %s\n", errname, errmsg);
}
}
static void
{
printf("on_send_variant()\n\n");
}
static void
{
const char *errname;
const char *errmsg;
printf("on_receive_array()\n");
{
fprintf(stderr, "Error: %s %s\n", errname, errmsg);
}
}
int
main(void)
{
int size_of_array = 5;
const char *array[5] = { "aaaa", "bbbb", "cccc", "dddd", "eeee" };
int i;
int plus_one = 24;
if (!array_of_string) printf("array_of_string == NULL\n\n");
for (i = 0; i < 5; i++)
if (!pending) printf("Error in eldbus_proxy_send()\n\n");
printf("error on eldbus_massage_iterator_arguments_set()\n\n");
for (i = 0; i < size_of_array; i++)
{
}
for (i = 0; i < 5; i++)
{
}
for (i = 0; i < 7; i++)
{
}
-1 , "");
-1 , "");
-1 , "i", plus_one);
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_quit(void)
Quits the main loop once all the events currently on the queue have been processed.
Definition: ecore_main.c:1321
#define ECORE_CALLBACK_CANCEL
Return value to remove a callback.
Definition: Ecore_Common.h:152
void ecore_main_loop_begin(void)
Runs the application main loop.
Definition: ecore_main.c:1311
Ecore_Timer * ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
Creates a timer to call the given function in the given period of time.
Definition: ecore_timer.c:189
unsigned char Eina_Bool
Type to mimic a boolean.
Definition: eina_types.h:527
#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
Eldbus_Pending * eldbus_proxy_property_set(Eldbus_Proxy *proxy, const char *name, const char *sig, const void *value, Eldbus_Message_Cb cb, const void *data)
Set a property.
Definition: eldbus_proxy.c:704
Eldbus_Pending * eldbus_proxy_property_get(Eldbus_Proxy *proxy, const char *name, Eldbus_Message_Cb cb, const void *data)
Get a property.
Definition: eldbus_proxy.c:681
Eina_Bool eldbus_message_iter_container_close(Eldbus_Message_Iter *iter, Eldbus_Message_Iter *sub)
Closes a container-typed value appended to the message.
Definition: eldbus_message.c:548
Eina_Bool eldbus_message_iter_get_and_next(Eldbus_Message_Iter *iter, char signature,...)
Useful when iterating over arrays.
Definition: eldbus_message.c:736
Eldbus_Message_Iter * eldbus_message_iter_container_new(Eldbus_Message_Iter *iter, int type, const char *contained_signature)
Create and append a typed iterator to another iterator.
Definition: eldbus_message.c:526
char * eldbus_message_iter_signature_get(Eldbus_Message_Iter *iter)
Returns the current signature of a message iterator.
Definition: eldbus_message.c:605
Eldbus_Message_Iter * eldbus_message_iter_get(const Eldbus_Message *msg)
Get the main Eldbus_Message_Iter from the Eldbus_Message.
Definition: eldbus_message.c:264
Eina_Bool eldbus_message_iter_arguments_append(Eldbus_Message_Iter *iter, const char *signature,...)
Append an argument into an Eldbus_Message_Iter.
Definition: eldbus_message.c:379
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_iter_basic_append(Eldbus_Message_Iter *iter, int type,...)
Append a basic type into an Eldbus_Iterator.
Definition: eldbus_message.c:558
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
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
Eldbus_Message * eldbus_proxy_method_call_new(Eldbus_Proxy *proxy, const char *member)
Constructs a new message to invoke a method on a remote interface.
Definition: eldbus_proxy.c:592
Eldbus_Pending * eldbus_proxy_send(Eldbus_Proxy *proxy, Eldbus_Message *msg, Eldbus_Message_Cb cb, const void *cb_data, double timeout)
Send a message.
Definition: eldbus_proxy.c:574
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