Ansel 0.0
A darktable fork - bloat + design vision
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dbus.c File Reference
#include "common/dbus.h"
#include "common/darktable.h"
#include "control/conf.h"
#include "control/control.h"
#include "common/file_location.h"
+ Include dependency graph for dbus.c:

Functions

static void _handle_method_call (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data)
 
static GVariant * _handle_get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
 
static void _on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
 
static void _on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
 
static void _on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data)
 
struct dt_dbus_tdt_dbus_init ()
 
void dt_dbus_destroy (const dt_dbus_t *dbus)
 
gboolean dt_dbus_connected (const dt_dbus_t *dbus)
 

Variables

static const gchar introspection_xml []
 
static const GDBusInterfaceVTable interface_vtable
 

Function Documentation

◆ _handle_get_property()

static GVariant * _handle_get_property ( GDBusConnection *  connection,
const gchar *  sender,
const gchar *  object_path,
const gchar *  interface_name,
const gchar *  property_name,
GError **  error,
gpointer  user_data 
)
static
Todo:
: expose the conf? partly? completely?

References dt_loc_get_datadir(), dt_loc_get_user_config_dir(), FALSE, PATH_MAX, and TRUE.

◆ _handle_method_call()

static void _handle_method_call ( GDBusConnection *  connection,
const gchar *  sender,
const gchar *  object_path,
const gchar *  interface_name,
const gchar *  method_name,
GVariant *  parameters,
GDBusMethodInvocation *  invocation,
gpointer  user_data 
)
static

◆ _on_bus_acquired()

static void _on_bus_acquired ( GDBusConnection *  connection,
const gchar *  name,
gpointer  user_data 
)
static

◆ _on_name_acquired()

static void _on_name_acquired ( GDBusConnection *  connection,
const gchar *  name,
gpointer  user_data 
)
static

References dt_dbus_t::connected.

Referenced by dt_dbus_init().

◆ _on_name_lost()

static void _on_name_lost ( GDBusConnection *  connection,
const gchar *  name,
gpointer  user_data 
)
static

References dt_dbus_t::connected.

Referenced by dt_dbus_init().

◆ dt_dbus_connected()

gboolean dt_dbus_connected ( const dt_dbus_t dbus)

have we managed to get the dbus name? when not, then there is already another instance of darktable running

References dt_dbus_t::connected.

◆ dt_dbus_destroy()

void dt_dbus_destroy ( const dt_dbus_t dbus)

closes down database and frees memory

References dt_dbus_t::dbus_connection, dt_dbus_t::introspection_data, and dt_dbus_t::owner_id.

◆ dt_dbus_init()

Variable Documentation

◆ interface_vtable

const GDBusInterfaceVTable interface_vtable
static
Initial value:
NULL }
static void _handle_method_call(GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data)
Definition dbus.c:75
static GVariant * _handle_get_property(GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
Definition dbus.c:104

Referenced by _on_bus_acquired().

◆ introspection_xml

const gchar introspection_xml[]
static
Initial value:
= "<node>"
" <interface name='org.darktable.service.Remote'>"
" <method name='Quit' />"
" <method name='Open'>"
" <arg type='s' name='FileName' direction='in'/>"
" <arg type='i' name='id' direction='out' />"
" </method>"
" <property type='s' name='DataDir' access='read'/>"
" <property type='s' name='ConfigDir' access='read'/>"
" <property type='b' name='LuaEnabled' access='read'/>"
" </interface>"
"</node>"

Referenced by dt_dbus_init().