[PATCH 1/9] core: Add references counter to GrlMediaSourceFooSpec structures
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 1/9] core: Add references counter to GrlMediaSourceFooSpec structures
- Date: Fri, 9 Jul 2010 18:53:58 +0200
Heavily inspired by GHashTable, add references counters to these
specifications, so later we can add _ref() and _unref() methods.
---
src/grl-media-source.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/grl-media-source.h b/src/grl-media-source.h
index bc167c0..d275876 100644
--- a/src/grl-media-source.h
+++ b/src/grl-media-source.h
@@ -153,6 +153,7 @@ typedef void (*GrlMediaSourceRemoveCb) (GrlMediaSource *source,
* @flags: the resolution mode
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* browse vmethod.
@@ -167,6 +168,7 @@ typedef struct {
GrlMetadataResolutionFlags flags;
GrlMediaSourceResultCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceBrowseSpec;
/**
@@ -180,6 +182,7 @@ typedef struct {
* @flags: the resolution mode
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* search vmethod.
@@ -194,6 +197,7 @@ typedef struct {
GrlMetadataResolutionFlags flags;
GrlMediaSourceResultCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceSearchSpec;
/**
@@ -207,6 +211,7 @@ typedef struct {
* @flags: the resolution mode
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* query vmethod.
@@ -221,6 +226,7 @@ typedef struct {
GrlMetadataResolutionFlags flags;
GrlMediaSourceResultCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceQuerySpec;
/**
@@ -231,6 +237,7 @@ typedef struct {
* @flags: the resolution mode
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* metadata vmethod.
@@ -242,6 +249,7 @@ typedef struct {
GrlMetadataResolutionFlags flags;
GrlMediaSourceMetadataCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceMetadataSpec;
/**
@@ -251,6 +259,7 @@ typedef struct {
* @media: a data transfer object
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* store vmethod.
@@ -261,6 +270,7 @@ typedef struct {
GrlMedia *media;
GrlMediaSourceStoreCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceStoreSpec;
/**
@@ -270,6 +280,7 @@ typedef struct {
* @media: a data transfer object
* @callback: the user defined callback
* @user_data: the user data to pass in the callback
+ * @ref_count: references counter
*
* Data transport structure used internally by the plugins which support
* store vmethod.
@@ -280,6 +291,7 @@ typedef struct {
GrlMedia *media;
GrlMediaSourceRemoveCb callback;
gpointer user_data;
+ volatile gint ref_count;
} GrlMediaSourceRemoveSpec;
/* GrlMediaSource class */
--
1.7.0.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]