[tracker] libtracker-sparql: Cleaned up documentation
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-sparql: Cleaned up documentation
- Date: Wed, 8 Dec 2010 13:51:05 +0000 (UTC)
commit 861583acf92e140682c066e55692ca5f918d414a
Author: Martyn Russell <martyn lanedo com>
Date: Wed Dec 8 13:50:08 2010 +0000
libtracker-sparql: Cleaned up documentation
Document tracker_sparql_get_uuid_urn()
.../libtracker-sparql-sections.txt | 2 +-
src/libtracker-sparql/tracker-uri.c | 4 ++--
src/libtracker-sparql/tracker-utils.vala | 13 +++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt b/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
index eb1ddf1..27d4cf5 100644
--- a/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
+++ b/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
@@ -2,12 +2,12 @@
<SECTION>
<FILE>tracker-misc</FILE>
<TITLE>Utilities</TITLE>
+tracker_sparql_get_uuid_urn
tracker_sparql_escape_string
tracker_sparql_escape_uri_printf
tracker_sparql_escape_uri_vprintf
</SECTION>
-
<SECTION>
<FILE>tracker-sparql-builder</FILE>
<TITLE>TrackerSparqlBuilder</TITLE>
diff --git a/src/libtracker-sparql/tracker-uri.c b/src/libtracker-sparql/tracker-uri.c
index 3eeb683..5d0badc 100644
--- a/src/libtracker-sparql/tracker-uri.c
+++ b/src/libtracker-sparql/tracker-uri.c
@@ -126,7 +126,7 @@ find_conversion (const char *format,
/**
* tracker_sparql_escape_uri_vprintf:
* @format: a standard printf() format string, but notice
- * <link linkend="string-precision">string precision pitfalls</link>
+ * <link linkend="string-precision">string precision pitfalls</link> documented in g_strdup_printf()
* @args: the list of parameters to insert into the format string
*
* Similar to the standard C vsprintf() function but safer, since it
@@ -234,7 +234,7 @@ cleanup:
/**
* tracker_sparql_escape_uri_printf:
* @format: a standard printf() format string, but notice
- * <link linkend="string-precision">string precision pitfalls</link>
+ * <link linkend="string-precision">string precision pitfalls</link> documented in g_strdup_printf()
* @Varargs: the parameters to insert into the format string
*
* Calls tracker_sparql_escape_uri_vprintf() with the @Varargs supplied.
diff --git a/src/libtracker-sparql/tracker-utils.vala b/src/libtracker-sparql/tracker-utils.vala
index 4628a44..9b62dce 100644
--- a/src/libtracker-sparql/tracker-utils.vala
+++ b/src/libtracker-sparql/tracker-utils.vala
@@ -92,6 +92,19 @@ namespace Tracker.Sparql {
[CCode (cname = "uuid_unparse_lower")]
private extern static void uuid_unparse_lower ([CCode (array_length = false)] uchar[] uuid, char* out);
+ /**
+ * tracker_sparql_get_uuid_urn:
+ *
+ * Generates a unique universal identifier to be used for urns
+ * when inserting SPARQL into the database. The string returned is
+ * in lower case and has the format "urn:uuid:%s" where
+ * %s is the uuid generated.
+ *
+ * Returns: a newly-allocated string. The returned string should
+ * be freed with g_free() when no longer needed.
+ *
+ * Since: 0.10
+ */
public string get_uuid_urn () {
uchar[] base_uuid = new uchar[16];
string lower = (string) new char[37];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]