Rework dbus handling

Remove the Daemon object and remove all dbus code from the main
objects. We can use the signals in a separate module to create and
destroy the DBus interfaces.
Move the dbus protocol in a module
Move the autolink policy to a module
This commit is contained in:
Wim Taymans 2016-11-16 16:57:47 +01:00
parent b9e2b1c0e3
commit dfbfb4c9ee
28 changed files with 1122 additions and 1007 deletions

View file

@ -27,8 +27,6 @@ extern "C" {
typedef struct _PinosCore PinosCore;
typedef struct _PinosGlobal PinosGlobal;
#include <gio/gio.h>
#include <spa/include/spa/log.h>
#include <pinos/server/main-loop.h>
#include <pinos/server/data-loop.h>
@ -36,8 +34,6 @@ typedef struct _PinosGlobal PinosGlobal;
#include <pinos/server/node.h>
#include <pinos/server/link.h>
#include "pinos/dbus/org-pinos.h"
struct _PinosGlobal {
PinosCore *core;
SpaList link;
@ -47,9 +43,6 @@ struct _PinosGlobal {
PINOS_SIGNAL (destroy_signal, (PinosListener *listener,
PinosGlobal *global));
PinosObjectSkeleton *skel;
const char *object_path;
};
/**
@ -60,8 +53,6 @@ struct _PinosGlobal {
struct _PinosCore {
PinosRegistry registry;
GDBusConnection *connection;
SpaList global_list;
SpaList client_list;
SpaList node_list;
@ -111,10 +102,16 @@ void pinos_core_destroy (PinosCore *core);
PinosGlobal * pinos_core_add_global (PinosCore *core,
uint32_t type,
void *object,
PinosObjectSkeleton *skel);
void pinos_core_remove_global (PinosCore *core,
PinosGlobal *global);
void *object);
SpaResult pinos_global_destroy (PinosGlobal *global);
PinosPort * pinos_core_find_port (PinosCore *core,
PinosPort *other_port,
uint32_t id,
PinosProperties *props,
SpaFormat **format_filter,
char **error);
#ifdef __cplusplus
}