[PATCH 1/3] annotations: replaced GObject.ParamSpec with uint



As gjs currently doesn't support GParamSpecs (see #626047), this
patch works around it by replacing them with uints.

Signed-off-by: Simón Pena <spenap gmail com>
---
 src/data/grl-data.c       |   26 +++++++++++++-------------
 src/grl-media-source.c    |   16 ++++++++--------
 src/grl-metadata-key.c    |    4 ++--
 src/grl-metadata-source.c |   32 ++++++++++++++++----------------
 src/grl-metadata-source.h |    2 +-
 src/grl-multiple.c        |    4 ++--
 src/grl-plugin-registry.c |    6 +++---
 7 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/data/grl-data.c b/src/data/grl-data.c
index 81a30f9..6a3c726 100644
--- a/src/data/grl-data.c
+++ b/src/data/grl-data.c
@@ -163,7 +163,7 @@ grl_data_new (void)
 /**
  * grl_data_get:
  * @data: data to retrieve value
- * @key: (type GObject.ParamSpec): key to look up.
+ * @key: (type uint): key to look up.
  *
  * Get the value associated with the key. If it does not contain any value, NULL
  * will be returned.
@@ -182,7 +182,7 @@ grl_data_get (GrlData *data, GrlKeyID key)
 /**
  * grl_data_set:
  * @data: data to modify
- * @key: (type GObject.ParamSpec): key to change or add
+ * @key: (type uint): key to change or add
  * @value: the new value
  *
  * Sets the value associated with the key. If key already has a value and
@@ -226,7 +226,7 @@ grl_data_set (GrlData *data, GrlKeyID key, const GValue *value)
 /**
  * grl_data_set_string:
  * @data: data to modify
- * @key: (type GObject.ParamSpec): key to change or add
+ * @key: (type uint): key to change or add
  * @strvalue: the new value
  *
  * Sets the value associated with the key. If key already has a value and
@@ -251,7 +251,7 @@ grl_data_set_string (GrlData *data,
 /**
  * grl_data_get_string:
  * @data: data to inspect
- * @key: (type GObject.ParamSpec): key to use
+ * @key: (type uint): key to use
  *
  * Returns the value associated with the key. If key has no value, or value is
  * not string, or key is not in data, then NULL is returned.
@@ -273,7 +273,7 @@ grl_data_get_string (GrlData *data, GrlKeyID key)
 /**
  * grl_data_set_int:
  * @data: data to change
- * @key: (type GObject.ParamSpec): key to change or add
+ * @key: (type uint): key to change or addd
  * @intvalue: the new value
  *
  * Sets the value associated with the key. If key already has a value and
@@ -291,7 +291,7 @@ grl_data_set_int (GrlData *data, GrlKeyID key, gint intvalue)
 /**
  * grl_data_get_int:
  * @data: data to inspect
- * @key: (type GObject.ParamSpec): key to use
+ * @key: (type uint): key to use
  *
  * Returns the value associated with the key. If key has no value, or value is
  * not a gint, or key is not in data, then 0 is returned.
@@ -313,7 +313,7 @@ grl_data_get_int (GrlData *data, GrlKeyID key)
 /**
  * grl_data_set_float:
  * @data: data to change
- * @key: (type GObject.ParamSpec): key to change or add
+ * @key: (type uint): key to change or add
  * @floatvalue: the new value
  *
  * Sets the value associated with the key. If key already has a value and
@@ -331,7 +331,7 @@ grl_data_set_float (GrlData *data, GrlKeyID key, float floatvalue)
 /**
  * grl_data_get_float:
  * @data: data to inspect
- * @key: (type GObject.ParamSpec): key to use
+ * @key: (type uint): key to use
  *
  * Returns the value associated with the key. If key has no value, or value is
  * not a gfloat, or key is not in data, then 0 is returned.
@@ -353,7 +353,7 @@ grl_data_get_float (GrlData *data, GrlKeyID key)
 /**
  * grl_data_add:
  * @data: data to change
- * @key: (type GObject.ParamSpec): key to add
+ * @key: (type uint): key to add
  *
  * Adds a new key to data, with no value. If key already exists, it does
  * nothing.
@@ -369,7 +369,7 @@ grl_data_add (GrlData *data, GrlKeyID key)
 /**
  * grl_data_remove:
  * @data: data to change
- * @key: (type GObject.ParamSpec): key to remove
+ * @key: (type uint): key to remove
  *
  * Removes key from data, freeing its value. If key is not in data, then
  * it does nothing.
@@ -385,7 +385,7 @@ grl_data_remove (GrlData *data, GrlKeyID key)
 /**
  * grl_data_has_key:
  * @data: data to inspect
- * @key: (type GObject.ParamSpec): key to search
+ * @key: (type uint): key to search
  *
  * Checks if key is in data.
  *
@@ -405,7 +405,7 @@ grl_data_has_key (GrlData *data, GrlKeyID key)
  *
  * Returns a list with keys contained in data.
  *
- * Returns: (transfer container) (element-type GObject.ParamSpec): an array with
+ * Returns: (transfer container) (element-type uint): an array with
  * the keys. The content of the list should not be modified or freed. Use g_list_free()
  * when done using the list.
  **/
@@ -424,7 +424,7 @@ grl_data_get_keys (GrlData *data)
 /**
  * grl_data_key_is_known:
  * @data: data to inspect
- * @key: (type GObject.ParamSpec): key to search
+ * @key: (type uint): key to search
  *
  * Checks if the key has a value.
  *
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index 9aa3873..3efe0d9 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1186,7 +1186,7 @@ metadata_full_resolution_ctl_cb (GrlMediaSource *source,
  * grl_media_source_browse:
  * @source: a media source
  * @container: (allow-none): a container of data transfer objects
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the browse operation
  * @count: the number of elements to retrieve in the browse operation
@@ -1323,7 +1323,7 @@ grl_media_source_browse (GrlMediaSource *source,
  * grl_media_source_browse_sync:
  * @source: a media source
  * @container: (allow-none): a container of data transfer objects
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the browse operation
  * @count: the number of elements to retrieve in the browse operation
@@ -1382,7 +1382,7 @@ grl_media_source_browse_sync (GrlMediaSource *source,
  * grl_media_source_search:
  * @source: a media source
  * @text: the text to search
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the search operation
  * @count: the number of elements to retrieve in the search operation
@@ -1509,7 +1509,7 @@ grl_media_source_search (GrlMediaSource *source,
  * grl_media_source_search_sync:
  * @source: a media source
  * @text: the text to search
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the search operation
  * @count: the number of elements to retrieve in the search operation
@@ -1568,7 +1568,7 @@ grl_media_source_search_sync (GrlMediaSource *source,
  * grl_media_source_query:
  * @source: a media source
  * @query: the query to process
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the query operation
  * @count: the number of elements to retrieve in the query operation
@@ -1701,7 +1701,7 @@ grl_media_source_query (GrlMediaSource *source,
  * grl_media_source_query_sync:
  * @source: a media source
  * @query: the query to process
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @skip: the number if elements to skip in the query operation
  * @count: the number of elements to retrieve in the query operation
@@ -1760,7 +1760,7 @@ grl_media_source_query_sync (GrlMediaSource *source,
  * grl_media_source_metadata:
  * @source: a media source
  * @media: (allow-none): a data transfer object
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @flags: the resolution mode
  * @callback: (scope notified): the user defined callback
@@ -1871,7 +1871,7 @@ grl_media_source_metadata (GrlMediaSource *source,
  * grl_media_source_metadata_sync:
  * @source: a media source
  * @media: (allow-none): a data transfer object
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID<!-- -->s to request
  * @flags: the resolution mode
  * @error: a #GError, or @NULL
diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c
index 56c44c0..2e3c193 100644
--- a/src/grl-metadata-key.c
+++ b/src/grl-metadata-key.c
@@ -285,7 +285,7 @@ GRL_METADATA_KEY_STUDIO =
 
 /**
  * grl_metadata_key_get_name:
- * @key: (type GObject.ParamSpec): key to look up
+ * @key: (type uint): key to look up
  *
  * Retrieves the name associated with the key
  *
@@ -299,7 +299,7 @@ grl_metadata_key_get_name (GrlKeyID key)
 
 /**
  * grl_metadata_key_get_desc:
- * @key: (type GObject.ParamSpec): key to look up
+ * @key: (type uint): key to look up
  *
  * Retrieves the description associated with the key
  *
diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 086dc40..72ae602 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -506,7 +506,7 @@ analyze_keys_to_write (GrlMetadataSource *source,
  * Get a list of #GrlKeyID, which describe a metadata types that this
  * source can fetch and store.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer none): a #GList with the keys
+ * Returns: (element-type uint) (transfer none): a #GList with the keys
  */
 const GList *
 grl_metadata_source_supported_keys (GrlMetadataSource *source)
@@ -527,7 +527,7 @@ grl_metadata_source_supported_keys (GrlMetadataSource *source)
  * are marked as slow because of the amount of traffic/processing needed
  * to fetch them.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer none): a #GList with the keys
+ * Returns: (element-type uint) (transfer none): a #GList with the keys
  */
 const GList *
 grl_metadata_source_slow_keys (GrlMetadataSource *source)
@@ -543,12 +543,12 @@ grl_metadata_source_slow_keys (GrlMetadataSource *source)
 /**
  * grl_metadata_source_key_depends:
  * @source: a metadata source
- * @key_id: (type GObject.ParamSpec): the requested metadata key
+ * @key_id: (type uint): the requested metadata key
  *
  * Get the list of #GrlKeyID which are needed a priori, in order to fetch
  * and store the requested @key_id
  *
- * Returns: (element-type GObject.ParamSpec) (transfer none):
+ * Returns: (element-type uint) (transfer none):
  * a #GList with the keys, or @NULL if it can not resolve @key_id
  */
 const GList *
@@ -571,7 +571,7 @@ grl_metadata_source_key_depends (GrlMetadataSource *source, GrlKeyID key_id)
  * are marked as writable, meaning the source allows the client 
  * to provide new values for these keys that will be stored permanently.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer none):
+ * Returns: (element-type uint) (transfer none):
  * a #GList with the keys
  */
 const GList *
@@ -588,7 +588,7 @@ grl_metadata_source_writable_keys (GrlMetadataSource *source)
 /**
  * grl_metadata_source_resolve:
  * @source: a metadata source
- * @keys: (element-type GObject.ParamSpec) (allow-none): the #GList
+ * @keys: (element-type uint) (allow-none): the #GList
  * of #GrlKeyID to retrieve
  * @media: Transfer object where all the metadata is stored.
  * @flags: bitwise mask of #GrlMetadataResolutionFlags with the resolution
@@ -652,7 +652,7 @@ grl_metadata_source_resolve (GrlMetadataSource *source,
 /**
  * grl_metadata_source_resolve_sync:
  * @source: a metadata source
- * @keys: (element-type GObject.ParamSpec) (allow-none): the #GList
+ * @keys: (element-type uint) (allow-none): the #GList
  * of #GrlKeyID to retrieve
  * @media: Transfer object where all the metadata is stored
  * @flags: bitwise mask of #GrlMetadataResolutionFlags with the resolution
@@ -702,7 +702,7 @@ grl_metadata_source_resolve_sync (GrlMetadataSource *source,
 /**
  * grl_metadata_source_filter_supported:
  * @source: a metadata source
- * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout):
+ * @keys: (element-type uint) (transfer container) (allow-none) (inout):
  * the list of keys to filter out
  * @return_filtered: if %TRUE the return value shall be a new list with
  * the matched keys
@@ -710,7 +710,7 @@ grl_metadata_source_resolve_sync (GrlMetadataSource *source,
  * Compares the received @keys list with the supported key list by the
  * metadata @source, and will delete those keys which are supported.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer container):
+ * Returns: (element-type uint) (transfer container):
  * if @return_filtered is %TRUE will return the list of intersected keys;
  * otherwise %NULL
  */
@@ -762,7 +762,7 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source,
 /**
  * grl_metadata_source_filter_slow:
  * @source: a metadata source
- * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout):
+ * @keys: (element-type uint) (transfer container) (allow-none) (inout):
  * the list of keys to filter out
  * @return_filtered: if %TRUE the return value shall be a new list with
  * the matched keys
@@ -770,7 +770,7 @@ grl_metadata_source_filter_supported (GrlMetadataSource *source,
  * Similar to grl_metadata_source_filter_supported() but applied to
  * the slow keys in grl_metadata_source_slow_keys()
  *
- * Returns: (element-type GObject.ParamSpec) (transfer container):
+ * Returns: (element-type uint) (transfer container):
  * if @return_filtered is %TRUE will return the list of intersected keys;
  * otherwise %NULL
  */
@@ -829,7 +829,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source,
 /**
  * grl_metadata_source_filter_writable:
  * @source: a metadata source
- * @keys: (element-type GObject.ParamSpec) (transfer container) (allow-none) (inout):
+ * @keys: (element-type uint) (transfer container) (allow-none) (inout):
  * the list of keys to filter out
  * @return_filtered: if %TRUE the return value shall be a new list with
  * the matched keys
@@ -837,7 +837,7 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source,
  * Similar to grl_metadata_source_filter_supported() but applied to
  * the writable keys in grl_metadata_source_writable_keys()
  *
- * Returns: (element-type GObject.ParamSpec) (transfer container):
+ * Returns: (element-type uint) (transfer container):
  * if @return_filtered is %TRUE will return the list of intersected keys;
  * otherwise %NULL
  */
@@ -1111,7 +1111,7 @@ grl_metadata_source_get_description (GrlMetadataSource *source)
  * grl_metadata_source_set_metadata:
  * @source: a metadata source
  * @media: the #GrlMedia object that we want to operate on.
- * @keys: (element-type GObject.ParamSpec) (allow-none): a list
+ * @keys: (element-type uint) (allow-none): a list
  * of #GrlKeyID whose values we want to change.
  * @flags: Flags to configure specific behaviors of the operation.
  * @callback: (scope notified): the callback to execute when the operation is finished.
@@ -1174,7 +1174,7 @@ grl_metadata_source_set_metadata (GrlMetadataSource *source,
  * grl_metadata_source_set_metadata_sync:
  * @source: a metadata source
  * @media: the #GrlMedia object that we want to operate on
- * @keys: (element-type GObject.ParamSpec) (allow-none): a list of
+ * @keys: (element-type uint) (allow-none): a list of
  * #GrlKeyID whose values we want to change
  * @flags: Flags to configure specific behaviors of the operation.
  * @error: a #GError, or @NULL
@@ -1186,7 +1186,7 @@ grl_metadata_source_set_metadata (GrlMetadataSource *source,
  *
  * This function is synchronous.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer container):
+ * Returns: (element-type uint) (transfer container):
  * a #GList of keys that could not be updated, or @NULL
  */
 GList *
diff --git a/src/grl-metadata-source.h b/src/grl-metadata-source.h
index e225e28..9121cca 100644
--- a/src/grl-metadata-source.h
+++ b/src/grl-metadata-source.h
@@ -123,7 +123,7 @@ typedef void (*GrlMetadataSourceResolveCb) (GrlMetadataSource *source,
  * GrlMetadataSourceSetMetadataCb:
  * @source: a metadata source
  * @media: (transfer full): a #GrlMedia transfer object
- * @failed_keys: (element-type GObject.ParamSpec) (transfer container): #GList of
+ * @failed_keys: (element-type uint) (transfer container): #GList of
  * keys that could not be updated, if any
  * @user_data: user data passed to grl_metadata_source_set_metadata()
  * @error: (not-error) (type uint): possible #GError generated when updating the metadata
diff --git a/src/grl-multiple.c b/src/grl-multiple.c
index d651fa0..9b5dd42 100644
--- a/src/grl-multiple.c
+++ b/src/grl-multiple.c
@@ -437,7 +437,7 @@ multiple_search_cb (GrlMediaSource *source,
  * a #GList of #GrlMediaSource<!-- -->s to search from (%NULL for all
  * searchable sources)
  * @text: the text to search for
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID to retrieve
  * @count: the maximum number of elements to retrieve
  * @flags: the operation flags
@@ -571,7 +571,7 @@ grl_multiple_cancel (guint search_id)
  * a #GList of #GrlMediaSource<!-- -->s where to search from (%NULL for all
  * available sources with search capability)
  * @text: the text to search for
- * @keys: (element-type GObject.ParamSpec): the #GList of
+ * @keys: (element-type uint): the #GList of
  * #GrlKeyID to retrieve
  * @count: the maximum number of elements to retrieve
  * @flags: the operation flags
diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c
index 4be7b94..8791995 100644
--- a/src/grl-plugin-registry.c
+++ b/src/grl-plugin-registry.c
@@ -674,7 +674,7 @@ grl_plugin_registry_unload (GrlPluginRegistry *registry,
  *
  * Registers a metadata key
  *
- * Returns: (type GObject.ParamSpec) (transfer none): The #GrlKeyID registered
+ * Returns: (type uint) (transfer none): The #GrlKeyID registered
  */
 GrlKeyID
 grl_plugin_registry_register_metadata_key (GrlPluginRegistry *registry,
@@ -706,7 +706,7 @@ grl_plugin_registry_register_metadata_key (GrlPluginRegistry *registry,
  *
  * Look up for the metadata key with name @key_name.
  *
- * Returns: (type GObject.ParamSpec) (transfer none): The metadata key, or @NULL if not found
+ * Returns: (type uint) (transfer none): The metadata key, or @NULL if not found
  */
 GrlKeyID
 grl_plugin_registry_lookup_metadata_key (GrlPluginRegistry *registry,
@@ -727,7 +727,7 @@ grl_plugin_registry_lookup_metadata_key (GrlPluginRegistry *registry,
  *
  * Returns a list with all registered keys in system.
  *
- * Returns: (element-type GObject.ParamSpec) (transfer container): a #GList
+ * Returns: (element-type uint) (transfer container): a #GList
  * with all the available #GrlKeyID<!-- -->s. The content of the list should
  * not be modified or freed. Use g_list_free() when done using the list.
  **/
-- 
1.7.0.4



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