dbus-init.cpp revision 2db61e98a77f19ab69a26ed9a5da99035221c8bf
/*
* 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>
// this is reguired so that giomm headers won't barf
#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 */