banshee r3184 - in trunk/banshee: . src/Extensions/Banshee.DapCore src/Extensions/Banshee.DapCore/Banshee.DapCore src/Extensions/Banshee.DapCore/Resources
- From: rubenv svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3184 - in trunk/banshee: . src/Extensions/Banshee.DapCore src/Extensions/Banshee.DapCore/Banshee.DapCore src/Extensions/Banshee.DapCore/Resources
- Date: Sat, 9 Feb 2008 17:35:18 +0000 (GMT)
Author: rubenv
Date: Sat Feb 9 17:35:18 2008
New Revision: 3184
URL: http://svn.gnome.org/viewvc/banshee?rev=3184&view=rev
Log:
2008-02-09 Ruben Vermeersch <ruben savanne be>
* src/Extensions/Banshee.DapCore/Resources/Banshee.DapCore.addin.xml:
Register a new Extension point /Banshee/Dap/DeviceClass. This will be used
to register new DAP plugins. Each plugin provides a family of devices
(e.g. iPod or MTP).
* src/Extensions/Banshee.DapCore/Banshee.DapCore/DapCore.cs: Handle the
new extension point. Still need to hook up the initialization code.
* src/Extensions/Banshee.DapCore/Banshee.DapCore/IDeviceClass.cs: Added.
Currently empty.
Added:
trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/IDeviceClass.cs
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/DapCore.cs
trunk/banshee/src/Extensions/Banshee.DapCore/Makefile.am
trunk/banshee/src/Extensions/Banshee.DapCore/Resources/Banshee.DapCore.addin.xml
Modified: trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/DapCore.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/DapCore.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/DapCore.cs Sat Feb 9 17:35:18 2008
@@ -29,15 +29,27 @@
using Banshee.ServiceStack;
+using Mono.Addins;
+
namespace Banshee.Dap
{
public class DapCore : IExtensionService
{
void IExtensionService.Initialize() {
+ AddinManager.AddExtensionNodeHandler ("/Banshee/Dap/Device", OnExtensionChanged);
+ }
+ private void OnExtensionChanged (object s, ExtensionNodeEventArgs args) {
+ IDeviceClass device_class = (IDeviceClass) args.ExtensionObject;
+ if (args.Change == ExtensionChange.Add) {
+ // Register device plugin
+ } else {
+ // Unregister device plugin
+ }
}
+
string IService.ServiceName {
get { return "DapCore"; }
}
Added: trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/IDeviceClass.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Extensions/Banshee.DapCore/Banshee.DapCore/IDeviceClass.cs Sat Feb 9 17:35:18 2008
@@ -0,0 +1,34 @@
+//
+// IDeviceClass.cs
+//
+// Author:
+// Ruben Vermeersch <ruben savanne be>
+//
+// Copyright (C) 2007-2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Banshee.Dap
+{
+ public interface IDeviceClass {
+ // Add device specific methods here!
+ }
+}
Modified: trunk/banshee/src/Extensions/Banshee.DapCore/Makefile.am
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.DapCore/Makefile.am (original)
+++ trunk/banshee/src/Extensions/Banshee.DapCore/Makefile.am Sat Feb 9 17:35:18 2008
@@ -5,6 +5,7 @@
SOURCES = \
Banshee.DapCore/DapCore.cs \
Banshee.DapCore/HalCore.cs \
+ Banshee.DapCore/IDeviceClass.cs \
hal-sharp/Device.cs \
hal-sharp/Manager.cs \
hal-sharp/Volume.cs
Modified: trunk/banshee/src/Extensions/Banshee.DapCore/Resources/Banshee.DapCore.addin.xml
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.DapCore/Resources/Banshee.DapCore.addin.xml (original)
+++ trunk/banshee/src/Extensions/Banshee.DapCore/Resources/Banshee.DapCore.addin.xml Sat Feb 9 17:35:18 2008
@@ -20,4 +20,8 @@
<Service class="Banshee.Dap.DapCore"/>
</Extension>
+ <ExtensionPoint path="/Banshee/Dap/DeviceClass">
+ <ExtensionNode name="DeviceClass"/>
+ </ExtensionPoint>
+
</Addin>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]