Re: [Banshee-List] Banshee Plugin creation
- From: Patrick van Staveren <trick vanstaveren us>
- To: banshee-list gnome org
- Subject: Re: [Banshee-List] Banshee Plugin creation
- Date: Sun, 08 Oct 2006 14:27:23 -0500
Joe,
Actually, if you're writing a regular Banshee plugin, you don't need
to use D-Bus to control banshee playback. Just use D-Bus to listen to
gnome-screensaver.
From a plugin, just call PlayerEngineCore.Pause() - check out the
monodoc reference for various PlayerEngineCore commands and what you
can do. Those execute directly - no D-Bus magic needed :)
Cheers,
Patrick
--
Patrick "Trick" van Staveren
http://trick.vanstaveren.us
----- Message from bigjoe1008 gmail com ---------
Date: Sun, 8 Oct 2006 00:47:04 -0400
From: Joe Harnish <bigjoe1008 gmail com>
Reply-To: banshee-list gnome org
Subject: Re: [Banshee-List] Banshee Plugin creation
To: banshee-list gnome org
On 10/6/06, Patrick van Staveren <trick vanstaveren us> wrote:
I agree, this plugin would be very useful. The banshee-sample-plugin
on svn.banshee-project.org should be up to date and provide a good
starting template (I've based every plugin I've written on that).
Also, as a FYI, make sure that you're developing against banshee from
CVS - the D-Bus stuff has changed up quite a bit in the last few weeks
and probably isn't backwards compatible. While it might be nice to
develop against banshee 0.11.0, it'd suck to have to rewrite your
D-Bus code in a month or two for it to work with banshee 0.11.1.
I'm no pro at D-Bus, but I've written a few apps that connect to
Banshee and other software over D-Bus and it'd be just as easy to
connect to gnome-screensaver. You'd probably have to consult with
Abock or Alp on exactly how to do this as I haven't worked at all with
the new managed D-Bus. I wrote an app that connects to banshee over
D-Bus; you can see the classes I've used [1]. You can also peek at
the banshee remote player in the CVS tree that uses the managed D-Bus
[2].
Good luck, and poke me on IRC (trick) if you need any pointers (or
alpha testers!)
Cheers,
Patrick
[1]:
http://sting.vanstaveren.us/trunk/lirc-dbus-relayer/src/Interfaces/BansheeConnection.cs?view=co
[2]:
http://cvs.gnome.org/viewcvs/*checkout*/banshee/tools/BansheeDBusClient.cs
--
Patrick "Trick" van Staveren
http://trick.vanstaveren.us
Thanks for the links Patrick and thanks for the support Luke. Since my
last email I have been scouring the net looking for samples of dbus usage.
I have put some code together that I will try and put up someplace. (it
won't be able to get it up to my subversion tree until Monday my usb drive
with the code on it is on my desk at work). I will put together a quick
page on it too.
From looking at your plugin Patrick it looks like I am heading in the right
direction. The plugin is pretty simple I am just watching the dbus for
gnome-screensaver to generate one of two messages depending on which one
just pass a pause or play to banshee. Would it be cleaner just to us dbus
(like in some of your code Patrick) to send the pause and play commands to
banshee?
I will have to take a look at cvs of banshee for the changes.
I have just started using banshee to replace Rhythmbox kind of out of the
blue but it is great.
Thanks
--Joe
----- End message from bigjoe1008 gmail com -----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]