dbus-init.cpp revision 9e3c85629496fe7ebe4296acb751b5b900c10e5b
/*
* This is where Inkscape connects to the DBus when it starts and
* registers the main interface.
*
* Also where new interfaces are registered when a new document is created.
* (Not called directly by application-interface but called indirectly.)
*
* Authors:
* Soren Berg <Glimmer07@gmail.com>
*
* Copyright (C) 2009 Soren Berg
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <dbus/dbus-glib.h>
#include "dbus-init.h"
#include "application-interface.h"
#include "application-server-glue.h"
#include "document-interface.h"
#include "document-server-glue.h"
#include "inkscape.h"
#include "document.h"
#include "desktop.h"
#include "file.h"
#include "verbs.h"
#include <algorithm>
#include <iostream>
#include <sstream>
namespace Inkscape {
namespace Extension {
namespace Dbus {
/* PRIVATE get a connection to the session bus */
if (error) {
return NULL;
}
else
return connection;
}
/* PRIVATE create a proxy object for a bus.*/
return dbus_g_proxy_new_for_name (connection,
}
/* PRIVATE register an object on a bus */
static gpointer
const DBusGObjectInfo *info,
{
return object;
}
/* Initialize a Dbus service */
void
init (void)
{
"org.inkscape",
//create interface for application
} //init
gchar *
init_document (void) {
} //init_document
gchar *
{
NULL,
//printf("DKEY: %d\n, NUMBER %d\n NAME: %s\n", dt->dkey, dt->number, name.c_str());
}
gchar *
init_desktop (void) {
//this function will create a new desktop and call
//dbus_init_desktop_interface.
} //init_desktop
} } } /* namespace Inkscape::Extension::Dbus */