Exporting exisiting GObject with GDBus.
- From: Nicolas CANIART <nicolas caniart net>
- To: gtk-app-devel-list gnome org
- Subject: Exporting exisiting GObject with GDBus.
- Date: Wed, 22 Jan 2014 02:30:38 +0100
Hi,
I have been trying to wrap my head around this issue, but after a
few trials and lots of headaches I am still not exactly sure how to
proceed.
I have an interface that is partly implemented by an abstract base
class, then fully implemented by a few (final) classes. I would like
to export the Iface interface via D-Bus (it defines a few methods, 1
(construct-only) property and 2 signals: data-received, closed), on
instances of any of the final classes.
What would be the best way to proceed:
- redesign the class hierarchy, inserting the GDBusObjectSkeleton
derivated class provided by gdbus-codegen somewhere in here). Then
what needs to be overridden what's need not.
- create new classes to wrap the intances of the existing classes
and expose them through D-Bus.
- Or am I "doomed" ? I don't think it has been intended to be used
that way (exporting existing non-dbus objects) and I think that I
should not have defined the Iface interface but have used the D-Bus
interface directly.
My class hierarchy looks like this:
Iface (Interface) <--implements-- IfaceBase (Abs. Class)
^
|
+---------------------------------+
| | |
SerialIface UdpIface TcpIface
Thanks in advance for any advice, explanation, simple example.
Regards, Nicolas.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]