#include <DbusConnection.h>
Inheritance diagram for DbusConnection:
Public Member Functions | |
DbusConnection (string nthisapp, string nthatapp, MessageController *ptr) | |
~DbusConnection () | |
bool | sendMessage (shared_ptr< vector< shared_ptr< string > > > messagebody) |
Private Member Functions | |
void | dbus_init () |
Private Attributes | |
shared_ptr< queue< shared_ptr< vector< shared_ptr< string > > > > > | outqueue |
pthread_mutex_t | mutex |
pthread_cond_t | cond |
pthread_t | sendthread |
pthread_t | receivethread |
bool | sendthread_run |
string | thisapp |
string | thatapp |
GMainLoop * | mainloop |
DBusGProxy * | remote_object |
MessageController * | msgcontroller |
Friends | |
void * | sendThread (void *) |
void * | receiveThread (void *) |
gboolean | _send_message (SomeObject *, char **, GError **) |
Definition at line 93 of file DbusConnection.h.
|
Constructor. It initialises Dbus and launches the sendThread and receiveThread.
Definition at line 225 of file DbusConnection.cpp. References cond, dbus_init(), mainloop, msgcontroller, mutex, outqueue, receiveThread, receivethread, sendThread, sendthread, sendthread_run, thatapp, and thisapp. Here is the call graph for this function: ![]() |
|
Definition at line 248 of file DbusConnection.cpp. References mainloop, receivethread, remote_object, sendthread, and sendthread_run. |
|
Initialises Dbus. It connects to the (D)bus, registers the method _send_message on the bus to allow other application on the bus to call it and it creates a remote_object so it can call another function in another application (Traplas in this case). Definition at line 178 of file DbusConnection.cpp. References lose_gerror(), mainloop, SomeObject::mc, msgcontroller, remote_object, SOME_TYPE_OBJECT, thatapp, and thisapp. Referenced by DbusConnection(). Here is the call graph for this function: ![]() |
|
Method used by the MessageController to send messages to Traplas. The message is placed in the outgoing queue.
Implements Comm. Definition at line 264 of file DbusConnection.cpp. |
|
Function called by the glib_mainloop when a message is received. It sends the message to the MessageController. |
|
This thread contains the glib_mainloop which handles the incoming messages from Traplas. Definition at line 90 of file DbusConnection.cpp. Referenced by DbusConnection(). |
|
This thread looks at the outgoing queue and sends messages from that queue to Traplas using Dbus. Definition at line 100 of file DbusConnection.cpp. Referenced by DbusConnection(). |
|
Definition at line 96 of file DbusConnection.h. Referenced by DbusConnection(), sendMessage(), and sendThread(). |
|
Definition at line 106 of file DbusConnection.h. Referenced by dbus_init(), DbusConnection(), and ~DbusConnection(). |
|
Definition at line 114 of file DbusConnection.h. Referenced by dbus_init(), and DbusConnection(). |
|
Definition at line 95 of file DbusConnection.h. Referenced by DbusConnection(), sendMessage(), and sendThread(). |
|
Definition at line 94 of file DbusConnection.h. Referenced by DbusConnection(), sendMessage(), and sendThread(). |
|
Definition at line 99 of file DbusConnection.h. Referenced by DbusConnection(), and ~DbusConnection(). |
|
Definition at line 107 of file DbusConnection.h. Referenced by dbus_init(), sendThread(), and ~DbusConnection(). |
|
Definition at line 98 of file DbusConnection.h. Referenced by DbusConnection(), and ~DbusConnection(). |
|
Definition at line 100 of file DbusConnection.h. Referenced by DbusConnection(), sendThread(), and ~DbusConnection(). |
|
Definition at line 103 of file DbusConnection.h. Referenced by dbus_init(), and DbusConnection(). |
|
Definition at line 102 of file DbusConnection.h. Referenced by dbus_init(), and DbusConnection(). |