[f-spot/cleanup-backend: 1/23] Add the concept of sources
- From: Mike Gemünde <mgemuende src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot/cleanup-backend: 1/23] Add the concept of sources
- Date: Fri, 16 Jul 2010 17:25:26 +0000 (UTC)
commit aa636441854a14234feb6ffc4668f3939e837d2d
Author: Mike Gemünde <mike gemuende de>
Date: Thu Jul 15 09:29:08 2010 +0200
Add the concept of sources
We are going to introduce the concept of sources, where a source
is responsible for providing photos. This first commit introduces
the ISource and IPhotoSource interface (to be extended). We start
switching our backend to this interfaces, because that allows
hopefully to clean up some code. (This is heavily inspired by
banshee)
src/Core/IPhotoSource.cs | 28 ++++++++++++++++++++++++++++
src/Core/ISource.cs | 20 ++++++++++++++++++++
src/Core/Makefile.am | 2 ++
3 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/IPhotoSource.cs b/src/Core/IPhotoSource.cs
new file mode 100644
index 0000000..ef6180d
--- /dev/null
+++ b/src/Core/IPhotoSource.cs
@@ -0,0 +1,28 @@
+/*
+ * IPhotoSource.cs
+ *
+ * Author(s):
+ * Mike Gemuende <mike gemuende de>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+using System;
+
+namespace FSpot.Sources
+{
+
+
+ public interface IPhotoSource : ISource
+ {
+ IBrowsableCollection Photos { get; }
+
+ void AddPhotos (IBrowsableCollection photos);
+ void RemovePhotos (IBrowsableCollection photos);
+ void DeletePhotos (IBrowsableCollection photos);
+
+ bool CanAddPhotos { get; }
+ bool CanRemovePhotos { get; }
+ bool CanDeletePhotos { get; }
+ }
+}
diff --git a/src/Core/ISource.cs b/src/Core/ISource.cs
new file mode 100644
index 0000000..5620b86
--- /dev/null
+++ b/src/Core/ISource.cs
@@ -0,0 +1,20 @@
+/*
+ * ISource.cs
+ *
+ * Author(s):
+ * Mike Gemuende <mike gemuende de>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+using System;
+
+namespace FSpot.Sources
+{
+
+
+ public interface ISource
+ {
+ string Name { get; }
+ }
+}
diff --git a/src/Core/Makefile.am b/src/Core/Makefile.am
index 49b7583..0493112 100644
--- a/src/Core/Makefile.am
+++ b/src/Core/Makefile.am
@@ -20,6 +20,8 @@ SOURCES = \
IBrowsableItemVersionable.cs \
IBrowsableCollection.cs \
ILoadable.cs \
+ IPhotoSource.cs \
+ ISource.cs \
PhotoChanges.cs \
PhotosChanges.cs \
Roll.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]