[gnome-photos] Add PhotosCollectionManager



commit 8d977acdf2c9e47e7d6cbfc181744b22ac793b6e
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Apr 26 12:36:41 2012 +0200

    Add PhotosCollectionManager

 src/Makefile.am                 |    2 +
 src/photos-collection-manager.c |   70 +++++++++++++++++++++++++++++++++++++++
 src/photos-collection-manager.h |   70 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index f89eabd..e6d18fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,8 @@ gnome_photos_SOURCES = \
 	photos-application.h \
 	photos-base-manager.c \
 	photos-base-manager.h \
+	photos-collection-manager.c \
+	photos-collection-manager.h \
 	photos-view-embed.c \
 	photos-view-embed.h \
 	photos-main-toolbar.c \
diff --git a/src/photos-collection-manager.c b/src/photos-collection-manager.c
new file mode 100644
index 0000000..bfd39a6
--- /dev/null
+++ b/src/photos-collection-manager.c
@@ -0,0 +1,70 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright  2012 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+
+#include "config.h"
+
+#include <glib.h>
+
+#include "photos-collection-manager.h"
+
+
+G_DEFINE_TYPE (PhotosCollectionManager, photos_collection_manager, PHOTOS_TYPE_BASE_MANAGER);
+
+
+static GObject *
+photos_collection_manager_constructor (GType                  type,
+                                       guint                  n_construct_params,
+                                       GObjectConstructParam *construct_params)
+{
+  static GObject *self = NULL;
+
+  if (self == NULL)
+    {
+      self = G_OBJECT_CLASS (photos_collection_manager_parent_class)->constructor (type,
+                                                                                   n_construct_params,
+                                                                                   construct_params);
+      g_object_add_weak_pointer (self, (gpointer) &self);
+      return self;
+    }
+
+  return g_object_ref (self);
+}
+
+
+static void
+photos_collection_manager_init (PhotosCollectionManager *self)
+{
+}
+
+
+static void
+photos_collection_manager_class_init (PhotosCollectionManagerClass *class)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (class);
+  object_class->constructor = photos_collection_manager_constructor;
+}
+
+
+PhotosBaseManager *
+photos_collection_manager_new (void)
+{
+  return g_object_new (PHOTOS_TYPE_COLLECTION_MANAGER, NULL);
+}
diff --git a/src/photos-collection-manager.h b/src/photos-collection-manager.h
new file mode 100644
index 0000000..4a04a3d
--- /dev/null
+++ b/src/photos-collection-manager.h
@@ -0,0 +1,70 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright  2012 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#ifndef PHOTOS_COLLECTION_MANAGER_H
+#define PHOTOS_COLLECTION_MANAGER_H
+
+#include "photos-base-manager.h"
+
+G_BEGIN_DECLS
+
+#define PHOTOS_TYPE_COLLECTION_MANAGER (photos_base_manager_get_type ())
+#define PHOTOS_COLLECTION_MANAGER(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+   PHOTOS_TYPE_COLLECTION_MANAGER, PhotosCollectionManager))
+
+#define PHOTOS_COLLECTION_MANAGER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), \
+   PHOTOS_TYPE_COLLECTION_MANAGER, PhotosCollectionManagerClass))
+
+#define PHOTOS_IS_COLLECTION_MANAGER(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+   PHOTOS_TYPE_COLLECTION_MANAGER))
+
+#define PHOTOS_IS_COLLECTION_MANAGER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+   PHOTOS_TYPE_COLLECTION_MANAGER))
+
+#define PHOTOS_COLLECTION_MANAGER_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+   PHOTOS_TYPE_COLLECTION_MANAGER, PhotosCollectionManagerClass))
+
+typedef struct _PhotosCollectionManager        PhotosCollectionManager;
+typedef struct _PhotosCollectionManagerClass   PhotosCollectionManagerClass;
+typedef struct _PhotosCollectionManagerPrivate PhotosCollectionManagerPrivate;
+
+struct _PhotosCollectionManager
+{
+  PhotosBaseManager parent_instance;
+  PhotosCollectionManagerPrivate *priv;
+};
+
+struct _PhotosCollectionManagerClass
+{
+  PhotosBaseManagerClass parent_class;
+};
+
+GType                     photos_collection_manager_get_type           (void) G_GNUC_CONST;
+
+PhotosBaseManager        *photos_collection_manager_new                (void);
+
+G_END_DECLS
+
+#endif /* PHOTOS_COLLECTION_MANAGER_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]