Difference between revisions of "LibccLicense"

From Creative Commons
Jump to: navigation, search
(Interface)
(Interface)
Line 9: Line 9:
  
 
=== Interface ===
 
=== Interface ===
* '''get_jurisdiction'''(uri) - returns the jurisdiction for the given license.
+
* get_jurisdiction(uri) ''- returns the jurisdiction for the given license.''
* '''get_jurisdictions'''(short or bitcode) - returns the available jurisdiction for the given short name or bitcode.
+
* get_jurisdictions(short or bitcode) - ''returns the available jurisdiction for the given short name or bitcode.''
* '''get_locale'''(uri) – returns the locale for the given license.
+
* get_locale(uri) – ''returns the locale for the given license.''
* '''get_locales'''(jurisdiction, short or bitcode) – returns the available locales for the given jurisdiction and short name or bitcode.
+
* get_locales(jurisdiction, short or bitcode) – returns the available locales for the given jurisdiction and short name or bitcode.
* '''get_name'''(uri) – returns the name of the license.
+
* get_name(uri) – returns the name of the license.
* '''get_version'''(uri) – returns the version of the license.
+
* get_version(uri) – returns the version of the license.
* '''get_versions'''(short, jurisdiction) - returns the available versions for the given short name or bitcode and jurisdiction.
+
* get_versions(short, jurisdiction) - returns the available versions for the given short name or bitcode and jurisdiction.
* '''get_short'''(uri) - returns the short name for the given uri.
+
* get_short(uri) - returns the short name for the given uri.
* '''has_flag'''(attribute,uri) – returns if the flag is set for the given uri.
+
* has_flag(attribute,uri) – returns if the flag is set for the given uri.
* '''family_flags'''(family) - returns the flags available for a given family.
+
* family_flags(family) - returns the flags available for a given family.
* '''family'''(uri) – returns the family the given uri belongs to.
+
* family(uri) – returns the family the given uri belongs to.
* '''get_notification'''(uri[,url]) - returns the notification string for the given url with an option to provide a verification url.
+
* get_notification(uri[,url]) - returns the notification string for the given url with an option to provide a verification url.
* '''verify_uri'''(uri) - returns whether or not the given uri is recognized by the system.
+
* verify_uri(uri) - returns whether or not the given uri is recognized by the system.
* '''get_license'''(family,flags, jurisdiction,locale) – returns the uri which satisfies the given attributes.
+
* get_license(family,flags, jurisdiction,locale) – returns the uri which satisfies the given attributes.
* '''get_all_licenses'''() - returns all general licenses available.
+
* get_all_licenses() - returns all general licenses available.
* '''get_general_licenses'''(family) - returns all general licenses in a family.
+
* get_general_licenses(family) - returns all general licenses in a family.
* '''get_families'''() – returns a list of available families.
+
* get_families() – returns a list of available families.
  
 
=== Data Structure ===
 
=== Data Structure ===

Revision as of 00:26, 20 June 2007

Purpose

To provide a generic interface to the CC license data, license choice data and license choice logic.

Audience

Application developers who wish to choose and/or verify CC licenses.

Implementation

This library will be implemented in C to provide maximum portability.

Interface

  • get_jurisdiction(uri) - returns the jurisdiction for the given license.
  • get_jurisdictions(short or bitcode) - returns the available jurisdiction for the given short name or bitcode.
  • get_locale(uri) – returns the locale for the given license.
  • get_locales(jurisdiction, short or bitcode) – returns the available locales for the given jurisdiction and short name or bitcode.
  • get_name(uri) – returns the name of the license.
  • get_version(uri) – returns the version of the license.
  • get_versions(short, jurisdiction) - returns the available versions for the given short name or bitcode and jurisdiction.
  • get_short(uri) - returns the short name for the given uri.
  • has_flag(attribute,uri) – returns if the flag is set for the given uri.
  • family_flags(family) - returns the flags available for a given family.
  • family(uri) – returns the family the given uri belongs to.
  • get_notification(uri[,url]) - returns the notification string for the given url with an option to provide a verification url.
  • verify_uri(uri) - returns whether or not the given uri is recognized by the system.
  • get_license(family,flags, jurisdiction,locale) – returns the uri which satisfies the given attributes.
  • get_all_licenses() - returns all general licenses available.
  • get_general_licenses(family) - returns all general licenses in a family.
  • get_families() – returns a list of available families.

Data Structure

  • Data Types (informal)
    • uri
    • name
    • notification
    • deed
    • sampling

Diskwise

  • licenses
    • creative_commons_sampling
    • creative_commons
      • licenses
      • flags
      • name
      • general

Bindings

  • Python

Uses

libccLicense system implementation guidelines

  • Gnome
  • KDE
  • OpenMoko
  • Sugar (OLPC)