- Date
- 2012 (created)
Table of Contents
Introduction
Eldbus is a wrapper around the dbus library, which is a message bus system. It also implements a set of specifications using dbus as interprocess communication.
Modules
How to compile
Eldbus is a library your application links to. The procedure for this is very simple. You simply have to compile your application with the appropriate compiler flags that the pkg-config
script outputs. For example:
Compiling C or C++ files into object files:
gcc -c -o main.o main.c `pkg-config --cflags eldbus`
Linking object files into a binary executable:
gcc -o my_application main.o `pkg-config --libs eldbus`
See pkgconfig
Next Steps
After you understood what Eldbus is and installed it in your system you should proceed understanding the programming interface.
Recommended reading:
- Core for library init, shutdown and getting a connection.
- Proxy to easily bind a client object to an interface.
- Object Mapper to monitor server objects and properties.
Introductory Example
#include "Eldbus.h"
#include <Ecore.h>
static void
{
const char *errname, *errmsg;
const char *call_path;
{
fprintf(stderr, "Error: %s %s\n", errname, errmsg);
return;
}
{
fprintf(stderr, "Error: could not get call path\n");
return;
}
printf("dialed! call path: %s\n", call_path);
}
int
main(int argc, char *argv[])
{
const char *number, *hide_callerid;
if (argc < 2)
{
fprintf(stderr, "Usage:\n\t%s <number> [hide_callerid]\n", argv[0]);
return EXIT_FAILURE;
}
number = argv[1];
hide_callerid = (argc > 2) ? argv[2] : "";
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, "ss", number, hide_callerid);
if (!pending)
{
fprintf(stderr, "Error: could not call\n");
return EXIT_FAILURE;
}
return 0;
}
More examples can be found at Eldbus Examples.