[PATCH 1/3] [filesystem] Add private struct to filesystem class
- From: Joaquim Rocha <jrocha igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 1/3] [filesystem] Add private struct to filesystem class
- Date: Wed, 2 Jun 2010 15:29:36 +0200
---
src/filesystem/grl-filesystem.c | 13 +++++++++++++
src/filesystem/grl-filesystem.h | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/filesystem/grl-filesystem.c b/src/filesystem/grl-filesystem.c
index 0131955..a6381fa 100644
--- a/src/filesystem/grl-filesystem.c
+++ b/src/filesystem/grl-filesystem.c
@@ -68,6 +68,17 @@
#define LICENSE "LGPL"
#define SITE "http://www.igalia.com"
+/* --- Grilo Filesystem Private --- */
+
+#define GRL_FILESYSTEM_SOURCE_GET_PRIVATE(object) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((object), \
+ GRL_FILESYSTEM_SOURCE_TYPE, \
+ GrlFilesystemSourcePrivate))
+
+struct _GrlFilesystemSourcePrivate {
+ GList *chosen_paths;
+};
+
/* --- Data types --- */
typedef struct {
@@ -140,11 +151,13 @@ grl_filesystem_source_class_init (GrlFilesystemSourceClass * klass)
source_class->browse = grl_filesystem_source_browse;
source_class->metadata = grl_filesystem_source_metadata;
metadata_class->supported_keys = grl_filesystem_source_supported_keys;
+ g_type_class_add_private (klass, sizeof (GrlFilesystemSourcePrivate));
}
static void
grl_filesystem_source_init (GrlFilesystemSource *source)
{
+ source->priv = GRL_FILESYSTEM_SOURCE_GET_PRIVATE (source);
}
G_DEFINE_TYPE (GrlFilesystemSource,
diff --git a/src/filesystem/grl-filesystem.h b/src/filesystem/grl-filesystem.h
index b405154..7e24211 100644
--- a/src/filesystem/grl-filesystem.h
+++ b/src/filesystem/grl-filesystem.h
@@ -52,11 +52,14 @@
GrlFilesystemSourceClass))
typedef struct _GrlFilesystemSource GrlFilesystemSource;
+typedef struct _GrlFilesystemSourcePrivate GrlFilesystemSourcePrivate;
struct _GrlFilesystemSource {
GrlMediaSource parent;
+ /*< private >*/
+ GrlFilesystemSourcePrivate *priv;
};
typedef struct _GrlFilesystemSourceClass GrlFilesystemSourceClass;
--
1.7.0.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]