diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-07-15 13:07:55 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-08-10 10:33:47 +0100 |
commit | c4bab487e700d932626d02c3df0bb4fc3b677358 (patch) | |
tree | 2520eeb255242c5f3afeff02e72b5158031c72de /gst-libs/gst/tag/tag.h | |
parent | fa3e246866220680e1d3b7950de8cd0079809997 (diff) |
tag: add convenience API to handle creative commons licenses
Based on liblicense's RDF files.
API: GstTagLicenseFlags
API: gst_tag_get_licenses()
API: gst_tag_get_license_flags()
API: gst_tag_get_license_nick()
API: gst_tag_get_license_title()
API: gst_tag_get_license_version()
API: gst_tag_get_license_description()
API: gst_tag_get_license_jurisdiction()
https://bugzilla.gnome.org/show_bug.cgi?id=646868
Diffstat (limited to 'gst-libs/gst/tag/tag.h')
-rw-r--r-- | gst-libs/gst/tag/tag.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h index 8eea4111a..6d70bef56 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de> + * Copyright (C) 2006-2011 Tim-Philipp Müller <tim centricular net> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -544,6 +545,82 @@ const gchar * gst_tag_get_language_code_iso_639_2T (const gchar * lang_code); #define gst_tag_get_language_code(lang_code) \ gst_tag_get_language_code_iso_639_1(lang_code) + +/* functions to deal with (mostly) Creative Commons licenses */ + +/** + * GstTagLicenseFlags: + * @GST_TAG_LICENSE_PERMITS_REPRODUCTION: making multiple copies + * is allowed + * @GST_TAG_LICENSE_PERMITS_DISTRIBUTION: distribution, public display + * and public performance are allowed + * @GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS: distribution of derivative + * works is allowed + * @GST_TAG_LICENSE_PERMITS_SHARING: commercial derivatives are allowed, + * but only non-commercial distribution is allowed + * @GST_TAG_LICENSE_REQUIRES_NOTICE: copyright and license notices + * must be kept intact + * @GST_TAG_LICENSE_REQUIRES_ATTRIBUTION: credit must be given to + * copyright holder and/or author + * @GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE: derivative works must be + * licensed under the same terms or compatible terms as the original work + * @GST_TAG_LICENSE_REQUIRES_SOURCE_CODE: source code (the preferred + * form for making modifications) must be provided when exercising some + * rights granted by the license + * @GST_TAG_LICENSE_REQUIRES_COPYLEFT: derivative and combined works + * must be licensed under specified terms, similar to those of the original + * work + * @GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT: derivative works must be + * licensed under specified terms, with at least the same conditions as + * the original work; combinations with the work may be licensed under + * different terms + * @GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE: exercising rights for + * commercial purposes is prohibited + * @GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE: use in a + * non-developing country is prohibited + * @GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE: this license was created + * by the Creative Commons project + * @GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE: this license was + * created by the Free Software Foundation (FSF) + * + * See http://creativecommons.org/ns for more information. + * + * Since: 0.10.36 + */ +typedef enum { + GST_TAG_LICENSE_PERMITS_REPRODUCTION = (1 << 0), + GST_TAG_LICENSE_PERMITS_DISTRIBUTION = (1 << 1), + GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS = (1 << 2), + GST_TAG_LICENSE_PERMITS_SHARING = (1 << 3), + + GST_TAG_LICENSE_REQUIRES_NOTICE = (1 << 8), + GST_TAG_LICENSE_REQUIRES_ATTRIBUTION = (1 << 9), + GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE = (1 << 10), + GST_TAG_LICENSE_REQUIRES_SOURCE_CODE = (1 << 11), + GST_TAG_LICENSE_REQUIRES_COPYLEFT = (1 << 12), + GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT = (1 << 13), + + GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE = (1 << 16), + GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE = (1 << 17), + + GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE = (1 << 24), + GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE = (1 << 25) +} GstTagLicenseFlags; + +gchar ** gst_tag_get_licenses (void); + +GstTagLicenseFlags gst_tag_get_license_flags (const gchar * license_ref); + +const gchar * gst_tag_get_license_nick (const gchar * license_ref); + +const gchar * gst_tag_get_license_title (const gchar * license_ref); + +const gchar * gst_tag_get_license_version (const gchar * license_ref); + +const gchar * gst_tag_get_license_description (const gchar * license_ref); + +const gchar * gst_tag_get_license_jurisdiction (const gchar * license_ref); + G_END_DECLS #endif /* __GST_TAG_TAG_H__ */ |