[gnome-photos] Add a PhotosLocalItem skeleton



commit f3e987b99b4ecb6759777acbaec015d4aa2d501a
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat May 5 21:39:00 2012 +0200

    Add a PhotosLocalItem skeleton

 src/Makefile.am         |    2 +
 src/photos-local-item.c |   48 +++++++++++++++++++++++++++++++
 src/photos-local-item.h |   72 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 122 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 7651f2c..098a977 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,6 +39,8 @@ gnome_photos_SOURCES = \
 	photos-item-manager.h \
 	photos-item-model.c \
 	photos-item-model.h \
+	photos-local-item.c \
+	photos-local-item.h \
 	photos-view-embed.c \
 	photos-view-embed.h \
 	photos-main-toolbar.c \
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
new file mode 100644
index 0000000..ded1c90
--- /dev/null
+++ b/src/photos-local-item.c
@@ -0,0 +1,48 @@
+/*
+ * 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-local-item.h"
+
+
+G_DEFINE_TYPE (PhotosLocalItem, photos_local_item, PHOTOS_TYPE_BASE_ITEM);
+
+
+static void
+photos_local_item_init (PhotosLocalItem *self)
+{
+}
+
+
+static void
+photos_local_item_class_init (PhotosLocalItemClass *class)
+{
+}
+
+
+PhotosBaseItem *
+photos_local_item_new (TrackerSparqlCursor *cursor)
+{
+  return g_object_new (PHOTOS_TYPE_LOCAL_ITEM, "cursor", cursor, NULL);
+}
diff --git a/src/photos-local-item.h b/src/photos-local-item.h
new file mode 100644
index 0000000..ea1659a
--- /dev/null
+++ b/src/photos-local-item.h
@@ -0,0 +1,72 @@
+/*
+ * 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_LOCAL_ITEM_H
+#define PHOTOS_LOCAL_ITEM_H
+
+#include <tracker-sparql.h>
+
+#include "photos-base-item.h"
+
+G_BEGIN_DECLS
+
+#define PHOTOS_TYPE_LOCAL_ITEM (photos_local_item_get_type ())
+#define PHOTOS_LOCAL_ITEM(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+   PHOTOS_TYPE_LOCAL_ITEM, PhotosLocalItem))
+
+#define PHOTOS_LOCAL_ITEM_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), \
+   PHOTOS_TYPE_LOCAL_ITEM, PhotosLocalItemClass))
+
+#define PHOTOS_IS_LOCAL_ITEM(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+   PHOTOS_TYPE_LOCAL_ITEM))
+
+#define PHOTOS_IS_LOCAL_ITEM_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+   PHOTOS_TYPE_LOCAL_ITEM))
+
+#define PHOTOS_LOCAL_ITEM_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+   PHOTOS_TYPE_LOCAL_ITEM, PhotosLocalItemClass))
+
+typedef struct _PhotosLocalItem        PhotosLocalItem;
+typedef struct _PhotosLocalItemClass   PhotosLocalItemClass;
+typedef struct _PhotosLocalItemPrivate PhotosLocalItemPrivate;
+
+struct _PhotosLocalItem
+{
+  PhotosBaseItem parent_instance;
+  PhotosLocalItemPrivate *priv;
+};
+
+struct _PhotosLocalItemClass
+{
+  PhotosBaseItemClass parent_class;
+};
+
+GType               photos_local_item_get_type           (void) G_GNUC_CONST;
+
+PhotosBaseItem     *photos_local_item_new                (TrackerSparqlCursor *cursor);
+
+G_END_DECLS
+
+#endif /* PHOTOS_LOCAL_ITEM_H */



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