[PATCH 4/5] core: #define directly core metadata keys
- From: Guillaume Emont <guijemont igalia com>
- To: grilo-list gnome org
- Cc: Guillaume Emont <guijemont igalia com>
- Subject: [PATCH 4/5] core: #define directly core metadata keys
- Date: Wed, 4 May 2011 19:02:02 +0200
This required the use of the new
grl_plugin_registry_register_metadata_key_full().
---
src/grl-metadata-key.c | 756 ++++++++++++++++++++++++------------------------
src/grl-metadata-key.h | 78 +++---
2 files changed, 412 insertions(+), 422 deletions(-)
diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c
index 0096811..3cc047b 100644
--- a/src/grl-metadata-key.c
+++ b/src/grl-metadata-key.c
@@ -26,400 +26,390 @@
#include <stdarg.h>
-GrlKeyID GRL_METADATA_KEY_ALBUM = 0;
-GrlKeyID GRL_METADATA_KEY_ARTIST = 0;
-GrlKeyID GRL_METADATA_KEY_AUTHOR = 0;
-GrlKeyID GRL_METADATA_KEY_DATE = 0;
-GrlKeyID GRL_METADATA_KEY_DESCRIPTION = 0;
-GrlKeyID GRL_METADATA_KEY_GENRE = 0;
-GrlKeyID GRL_METADATA_KEY_ID = 0;
-GrlKeyID GRL_METADATA_KEY_LAST_PLAYED = 0;
-GrlKeyID GRL_METADATA_KEY_LYRICS = 0;
-GrlKeyID GRL_METADATA_KEY_MIME = 0;
-GrlKeyID GRL_METADATA_KEY_SITE = 0;
-GrlKeyID GRL_METADATA_KEY_SOURCE = 0;
-GrlKeyID GRL_METADATA_KEY_THUMBNAIL = 0;
-GrlKeyID GRL_METADATA_KEY_THUMBNAIL_BINARY = 0;
-GrlKeyID GRL_METADATA_KEY_TITLE = 0;
-
-GrlKeyID GRL_METADATA_KEY_URL = 0;
-GrlKeyID GRL_METADATA_KEY_EXTERNAL_URL = 0;
-GrlKeyID GRL_METADATA_KEY_EXTERNAL_PLAYER = 0;
-
-GrlKeyID GRL_METADATA_KEY_BITRATE = 0;
-GrlKeyID GRL_METADATA_KEY_CHILDCOUNT = 0;
-GrlKeyID GRL_METADATA_KEY_DURATION = 0;
-GrlKeyID GRL_METADATA_KEY_HEIGHT = 0;
-GrlKeyID GRL_METADATA_KEY_LAST_POSITION = 0;
-GrlKeyID GRL_METADATA_KEY_PLAY_COUNT = 0;
-GrlKeyID GRL_METADATA_KEY_WIDTH = 0;
-
-GrlKeyID GRL_METADATA_KEY_FRAMERATE = 0;
-GrlKeyID GRL_METADATA_KEY_RATING = 0;
-
-GrlKeyID GRL_METADATA_KEY_STUDIO = 0;
-GrlKeyID GRL_METADATA_KEY_CERTIFICATE = 0;
-GrlKeyID GRL_METADATA_KEY_LICENSE = 0;
-
-GrlKeyID GRL_METADATA_KEY_SEASON = 0;
-GrlKeyID GRL_METADATA_KEY_EPISODE = 0;
-GrlKeyID GRL_METADATA_KEY_SHOW = 0;
-
-GrlKeyID GRL_METADATA_KEY_CREATION_DATE = 0;
-
-GrlKeyID GRL_METADATA_KEY_CAMERA_MODEL = 0;
-GrlKeyID GRL_METADATA_KEY_ORIENTATION = 0;
-GrlKeyID GRL_METADATA_KEY_FLASH_USED = 0;
-GrlKeyID GRL_METADATA_KEY_EXPOSURE_TIME = 0;
-GrlKeyID GRL_METADATA_KEY_ISO_SPEED = 0;
-
void
grl_metadata_key_setup_system_keys (GrlPluginRegistry *registry)
{
- GRL_METADATA_KEY_ALBUM =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("album",
- "Album",
- "Album the media belongs to",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_ARTIST =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("artist",
- "Artist",
- "Main artist",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_AUTHOR =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("author",
- "Author",
- "Creator of the media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_DATE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("date",
- "Date",
- "Publishing or recording date",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_DESCRIPTION =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("description",
- "Description",
- "Description of the media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_GENRE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("genre",
- "Genre",
- "Genre of the media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_ID =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("id",
- "ID",
- "Identifier of media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_LAST_PLAYED =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("last-played-time",
- "LastPlayedTime",
- "Last time the media was played",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_LYRICS =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("lyrics",
- "Lyrics",
- "Song lyrics",
- NULL,
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("album",
+ "Album",
+ "Album the media belongs to",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_ALBUM,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("artist",
+ "Artist",
+ "Main artist",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_ARTIST,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("author",
+ "Author",
+ "Creator of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_AUTHOR,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("date",
+ "Date",
+ "Publishing or recording date",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_DATE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("description",
+ "Description",
+ "Description of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_DESCRIPTION,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("genre",
+ "Genre",
+ "Genre of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_GENRE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("id",
+ "ID",
+ "Identifier of media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_ID,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("last-played-time",
+ "LastPlayedTime",
+ "Last time the media was played",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_LAST_PLAYED,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("lyrics",
+ "Lyrics",
+ "Song lyrics",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_LYRICS,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("mime-type",
+ "MimeType",
+ "Media mime type",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_MIME,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("site",
+ "Site",
+ "Site",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_SITE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("source",
+ "Source",
+ "Source ID prioviding the content",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_SOURCE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("thumbnail",
+ "Thumbnail",
+ "Thumbnail image",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_THUMBNAIL,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_boxed ("thumbnail-binary",
+ "Thumbnail Binary",
+ "Thumbnail binary image",
+ G_TYPE_BYTE_ARRAY,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_THUMBNAIL_BINARY,
+
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("title",
+ "Title",
+ "Title of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_TITLE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("url",
+ "URL",
+ "Media URL",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_URL,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("external-url",
+ "External URL",
+ "External location where the media can be played back, usually a website",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_EXTERNAL_URL,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("external-player",
+ "External Player URL",
+ "URL of an external player that can be used to play the resource (usually a Flash player)",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_EXTERNAL_PLAYER,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("studio",
+ "Studio",
+ "Studio the media is from",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_STUDIO,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("certificate",
+ "Certificate",
+ "Age certificate of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_CERTIFICATE,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("license",
+ "License",
+ "The license of the media",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_LICENSE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("bitrate",
+ "Bitrate",
+ "Media bitrate in KBits/s",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_MIME =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("mime-type",
- "MimeType",
- "Media mime type",
- NULL,
+ GRL_METADATA_KEY_BITRATE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("childcount",
+ "Childcount",
+ "Number of items contained in a container",
+ -1, G_MAXINT,
+ GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_SITE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("site",
- "Site",
- "Site",
- NULL,
+ GRL_METADATA_KEY_CHILDCOUNT,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("duration",
+ "Duration",
+ "Media duration",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_SOURCE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("source",
- "Source",
- "Source ID prioviding the content",
- NULL,
+ GRL_METADATA_KEY_DURATION,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("height",
+ "Height",
+ "Height of media ('y' resolution)",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_THUMBNAIL =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("thumbnail",
- "Thumbnail",
- "Thumbnail image",
- NULL,
+ GRL_METADATA_KEY_HEIGHT,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("playback-interrupted-time",
+ "PlaybackInterruptedTime",
+ "Time at which playback was interrupted",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_THUMBNAIL_BINARY =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_boxed ("thumbnail-binary",
- "Thumbnail Binary",
- "Thumbnail binary image",
- G_TYPE_BYTE_ARRAY,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
-
- NULL);
- GRL_METADATA_KEY_TITLE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("title",
- "Title",
- "Title of the media",
- NULL,
+ GRL_METADATA_KEY_LAST_POSITION,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("play-count",
+ "PlayCount",
+ "How many times media was played",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_URL =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("url",
- "URL",
- "Media URL",
- NULL,
+ GRL_METADATA_KEY_PLAY_COUNT,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("width",
+ "Width",
+ "Width of media ('x' resolution)",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_EXTERNAL_URL =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("external-url",
- "External URL",
- "External location where the media can be played back, usually a website",
- NULL,
+ GRL_METADATA_KEY_WIDTH,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_float ("framerate",
+ "Framerate",
+ "Frames per second",
+ 0, G_MAXFLOAT,
+ 0,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_FRAMERATE,
+ NULL);
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_float ("rating",
+ "Rating",
+ "Media rating",
+ 0, G_MAXFLOAT,
+ 0,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_RATING,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("season",
+ "Season",
+ "Season of a show",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_EXTERNAL_PLAYER =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("external-player",
- "External Player URL",
- "URL of an external player that can be used to play the resource (usually a Flash player)",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
-GRL_METADATA_KEY_STUDIO =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("studio",
- "Studio",
- "Studio the media is from",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_CERTIFICATE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("certificate",
- "Certificate",
- "Age certificate of the media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_LICENSE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("license",
- "License",
- "The license of the media",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_BITRATE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("bitrate",
- "Bitrate",
- "Media bitrate in KBits/s",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_CHILDCOUNT =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("childcount",
- "Childcount",
- "Number of items contained in a container",
- -1, G_MAXINT,
- GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_DURATION =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("duration",
- "Duration",
- "Media duration",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_HEIGHT =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("height",
- "Height",
- "Height of media ('y' resolution)",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_LAST_POSITION =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("playback-interrupted-time",
- "PlaybackInterruptedTime",
- "Time at which playback was interrupted",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_PLAY_COUNT =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("play-count",
- "PlayCount",
- "How many times media was played",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_WIDTH =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("width",
- "Width",
- "Width of media ('x' resolution)",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_FRAMERATE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_float ("framerate",
- "Framerate",
- "Frames per second",
- 0, G_MAXFLOAT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
- GRL_METADATA_KEY_RATING =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_float ("rating",
- "Rating",
- "Media rating",
- 0, G_MAXFLOAT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_SEASON =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("season",
- "Season",
- "Season of a show",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_EPISODE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("episode",
- "Episode",
- "Episode of a show",
- 0, G_MAXINT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_SHOW =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("show",
- "Show",
- "Name of a show",
- NULL,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_CREATION_DATE =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("creation-date",
- "Creation date",
- "Creation date",
- NULL,
+ GRL_METADATA_KEY_SEASON,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("episode",
+ "Episode",
+ "Episode of a show",
+ 0, G_MAXINT,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_CAMERA_MODEL =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_string ("camera-model",
- "Camera model",
- "Name of the camera model used to take the photo",
- NULL,
+ GRL_METADATA_KEY_EPISODE,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("show",
+ "Show",
+ "Name of a show",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_SHOW,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("creation-date",
+ "Creation date",
+ "Creation date",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_CREATION_DATE,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_string ("camera-model",
+ "Camera model",
+ "Name of the camera model used to take the photo",
+ NULL,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_CAMERA_MODEL,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_int ("orientation",
+ "Picture orientation",
+ "Orientation of the photo in degree (clockwise)",
+ 0, 359,
+ 0,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_ORIENTATION =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_int ("orientation",
- "Picture orientation",
- "Orientation of the photo in degree (clockwise)",
- 0, 359,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_FLASH_USED =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_boolean ("flash-used",
- "Flash used",
- "Whether or not a flash was used to take that picture",
- FALSE,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_EXPOSURE_TIME =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_float ("exposure-time",
- "Exposure time",
- "Exposure time of the photo in seconds",
- 0, G_MAXFLOAT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
-
- GRL_METADATA_KEY_ISO_SPEED =
- grl_plugin_registry_register_metadata_key (registry,
- g_param_spec_float ("iso-speed",
- "ISO speed",
- "Photographic film's sensitivity to light as ISO value",
- 0, G_MAXFLOAT,
- 0,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
- NULL);
+ GRL_METADATA_KEY_ORIENTATION,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_boolean ("flash-used",
+ "Flash used",
+ "Whether or not a flash was used to take that picture",
+ FALSE,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_FLASH_USED,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_float ("exposure-time",
+ "Exposure time",
+ "Exposure time of the photo in seconds",
+ 0, G_MAXFLOAT,
+ 0,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_EXPOSURE_TIME,
+ NULL);
+
+
+ grl_plugin_registry_register_metadata_key_full (registry,
+ g_param_spec_float ("iso-speed",
+ "ISO speed",
+ "Photographic film's sensitivity to light as ISO value",
+ 0, G_MAXFLOAT,
+ 0,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+ GRL_METADATA_KEY_ISO_SPEED,
+ NULL);
/* Create the relations */
grl_plugin_registry_register_metadata_key_relation (registry,
@@ -441,7 +431,7 @@ GRL_METADATA_KEY_STUDIO =
/**
* grl_metadata_key_get_name:
- * @key: (type GObject.ParamSpec): key to look up
+ * @key: key to look up
*
* Retrieves the name associated with the key
*
@@ -463,7 +453,7 @@ grl_metadata_key_get_name (GrlKeyID key)
/**
* grl_metadata_key_get_desc:
- * @key: (type GObject.ParamSpec): key to look up
+ * @key: key to look up
*
* Retrieves the description associated with the key
*
diff --git a/src/grl-metadata-key.h b/src/grl-metadata-key.h
index c13046e..890f13b 100644
--- a/src/grl-metadata-key.h
+++ b/src/grl-metadata-key.h
@@ -43,45 +43,45 @@
typedef guint32 GrlKeyID;
-extern GrlKeyID GRL_METADATA_KEY_ALBUM;
-extern GrlKeyID GRL_METADATA_KEY_ARTIST;
-extern GrlKeyID GRL_METADATA_KEY_AUTHOR;
-extern GrlKeyID GRL_METADATA_KEY_BITRATE;
-extern GrlKeyID GRL_METADATA_KEY_CERTIFICATE;
-extern GrlKeyID GRL_METADATA_KEY_CHILDCOUNT;
-extern GrlKeyID GRL_METADATA_KEY_DATE;
-extern GrlKeyID GRL_METADATA_KEY_DESCRIPTION;
-extern GrlKeyID GRL_METADATA_KEY_DURATION;
-extern GrlKeyID GRL_METADATA_KEY_EXTERNAL_PLAYER;
-extern GrlKeyID GRL_METADATA_KEY_EXTERNAL_URL;
-extern GrlKeyID GRL_METADATA_KEY_FRAMERATE;
-extern GrlKeyID GRL_METADATA_KEY_GENRE;
-extern GrlKeyID GRL_METADATA_KEY_HEIGHT;
-extern GrlKeyID GRL_METADATA_KEY_ID;
-extern GrlKeyID GRL_METADATA_KEY_LAST_PLAYED;
-extern GrlKeyID GRL_METADATA_KEY_LAST_POSITION;
-extern GrlKeyID GRL_METADATA_KEY_LICENSE;
-extern GrlKeyID GRL_METADATA_KEY_LYRICS;
-extern GrlKeyID GRL_METADATA_KEY_MIME;
-extern GrlKeyID GRL_METADATA_KEY_PLAY_COUNT;
-extern GrlKeyID GRL_METADATA_KEY_RATING;
-extern GrlKeyID GRL_METADATA_KEY_SITE;
-extern GrlKeyID GRL_METADATA_KEY_SOURCE;
-extern GrlKeyID GRL_METADATA_KEY_STUDIO;
-extern GrlKeyID GRL_METADATA_KEY_THUMBNAIL;
-extern GrlKeyID GRL_METADATA_KEY_THUMBNAIL_BINARY;
-extern GrlKeyID GRL_METADATA_KEY_TITLE;
-extern GrlKeyID GRL_METADATA_KEY_URL;
-extern GrlKeyID GRL_METADATA_KEY_WIDTH;
-extern GrlKeyID GRL_METADATA_KEY_SEASON;
-extern GrlKeyID GRL_METADATA_KEY_EPISODE;
-extern GrlKeyID GRL_METADATA_KEY_SHOW;
-extern GrlKeyID GRL_METADATA_KEY_CREATION_DATE;
-extern GrlKeyID GRL_METADATA_KEY_CAMERA_MODEL;
-extern GrlKeyID GRL_METADATA_KEY_ORIENTATION;
-extern GrlKeyID GRL_METADATA_KEY_FLASH_USED;
-extern GrlKeyID GRL_METADATA_KEY_EXPOSURE_TIME;
-extern GrlKeyID GRL_METADATA_KEY_ISO_SPEED;
+#define GRL_METADATA_KEY_ALBUM 1
+#define GRL_METADATA_KEY_ARTIST 2
+#define GRL_METADATA_KEY_AUTHOR 3
+#define GRL_METADATA_KEY_BITRATE 4
+#define GRL_METADATA_KEY_CERTIFICATE 5
+#define GRL_METADATA_KEY_CHILDCOUNT 6
+#define GRL_METADATA_KEY_DATE 7
+#define GRL_METADATA_KEY_DESCRIPTION 8
+#define GRL_METADATA_KEY_DURATION 9
+#define GRL_METADATA_KEY_EXTERNAL_PLAYER 10
+#define GRL_METADATA_KEY_EXTERNAL_URL 11
+#define GRL_METADATA_KEY_FRAMERATE 12
+#define GRL_METADATA_KEY_GENRE 13
+#define GRL_METADATA_KEY_HEIGHT 14
+#define GRL_METADATA_KEY_ID 15
+#define GRL_METADATA_KEY_LAST_PLAYED 16
+#define GRL_METADATA_KEY_LAST_POSITION 17
+#define GRL_METADATA_KEY_LICENSE 18
+#define GRL_METADATA_KEY_LYRICS 19
+#define GRL_METADATA_KEY_MIME 20
+#define GRL_METADATA_KEY_PLAY_COUNT 21
+#define GRL_METADATA_KEY_RATING 22
+#define GRL_METADATA_KEY_SITE 23
+#define GRL_METADATA_KEY_SOURCE 24
+#define GRL_METADATA_KEY_STUDIO 25
+#define GRL_METADATA_KEY_THUMBNAIL 26
+#define GRL_METADATA_KEY_THUMBNAIL_BINARY 27
+#define GRL_METADATA_KEY_TITLE 28
+#define GRL_METADATA_KEY_URL 29
+#define GRL_METADATA_KEY_WIDTH 30
+#define GRL_METADATA_KEY_SEASON 31
+#define GRL_METADATA_KEY_EPISODE 32
+#define GRL_METADATA_KEY_SHOW 33
+#define GRL_METADATA_KEY_CREATION_DATE 34
+#define GRL_METADATA_KEY_CAMERA_MODEL 35
+#define GRL_METADATA_KEY_ORIENTATION 36
+#define GRL_METADATA_KEY_FLASH_USED 37
+#define GRL_METADATA_KEY_EXPOSURE_TIME 38
+#define GRL_METADATA_KEY_ISO_SPEED 39
const gchar *grl_metadata_key_get_name (GrlKeyID key);
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]