Re: [Vala] Using a C library
- From: "Dr. Michael Lauer" <mickey vanille de>
- To: Vala List <vala-list gnome org>
- Subject: Re: [Vala] Using a C library
- Date: Wed, 22 Apr 2015 08:25:45 -0000
Lastly, a question about gobject introspection. I'm totally clueless about
this. So my plan on my project is to release in 3-4/5 parts. The first part
will be the vapi, and a sensible OOP Vala library. The second part is Vala
program that provides a DBus interface to Spotify that obviously any
program could use. The third part is a GTK+ GUI program to interact with
the DBus interface. The fourth part is Gnome Gjs extension that interacts
with the DBus service. The last part, highly depending on popularity, is a
Unity and/or KDE extension that is a port of Gjs extension. Back to the
original question, is that first part (vapi + OOP library) applicable to
use by for GObject introspection or would they other programs need to
interface with the DBus service?
It’s up to you to decide how you want to make the functionality available
and it depends on whether you want a daemon to demultiplex service requests
or let everything concurrently flow through the library interface and let it
deal with demultiplexing.
I don’t know about spotify, but the usual approach for services where
multiple clients written in multiple languages can benefit is to provide the library interface,
create a daemon (using said library interface) which exposes a D-Bus interface and then have
clients in whatever language using that D-Bus interface.
If you want to write the daemon in Vala, you might want to write a dbus introspection
(and documentation) file and use vala-dbus-binding-tool
(https://github.com/freesmartphone/vala-dbus-binding-tool
<https://github.com/freesmartphone/vala-dbus-binding-tool>)
to have it create the stubs. The interface documentation could look like that
http://www.freesmartphone.org/specs/org.freesmartphone.GSM.Call/
<http://www.freesmartphone.org/specs/org.freesmartphone.GSM.Call/>
Cheers,
:M:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]