From ab8cb652c83d77471b2e0f56b270d4ef8704dae9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 10 Jul 2010 22:30:04 -0400 Subject: [PATCH] Fix a typo --- docs/reference/glib/tmpl/bookmarkfile.sgml | 100 +++------------------ glib/gatomic.c | 2 +- glib/gbookmarkfile.c | 44 +++++++++ glib/gbookmarkfile.h | 30 ++++++- glib/tests/Makefile.am | 3 +- glib/tests/bookmarks.xbel | 23 +++++ 6 files changed, 109 insertions(+), 93 deletions(-) create mode 100644 glib/tests/bookmarks.xbel diff --git a/docs/reference/glib/tmpl/bookmarkfile.sgml b/docs/reference/glib/tmpl/bookmarkfile.sgml index 6ffae8e7c..163eabfc2 100644 --- a/docs/reference/glib/tmpl/bookmarkfile.sgml +++ b/docs/reference/glib/tmpl/bookmarkfile.sgml @@ -2,82 +2,11 @@ Bookmark file parser -parses files containing bookmarks + -#GBookmarkFile lets you parse, edit or create files containing bookmarks -to URI, along with some meta-data about the resource pointed by the URI like -its MIME type, the application that is registering the bookmark and the -icon that should be used to represent the bookmark. The data is stored using -the -Desktop Bookmark -Specification. - - -The syntax of the bookmark files is described in detail inside the Desktop -Bookmark Specification, here is a quick summary: bookmark files use a sub-class -of the -XML Bookmark Exchange Language specification, consisting -of valid UTF-8 encoded XML, under the xbel root element; -each bookmark is stored inside a bookmark element, using -its URI: no relative paths can be used inside a bookmark file. The bookmark -may have a user defined title and description, to be used instead of the URI. -Under the metadata element, with its owner -attribute set to http://freedesktop.org, is stored the -meta-data about a resource pointed by its URI. The meta-data consists of -the resource's MIME type; the applications that have registered a bookmark; -the groups to which a bookmark belongs to; a visibility flag, used to set -the bookmark as "private" to the applications and groups that has it -registered; the URI and MIME type of an icon, to be used when displaying the -bookmark inside a GUI. - - - - - - - - Desktop Bookmarks Spec - - - text/xml - - - - - - Editors - - - - - -]]> - - - -A bookmark file might contain more than one bookmark; each bookmark is accessed -through its URI. - - - -The important caveat of bookmark files is that when you add a new bookmark you -must also add the application that is registering it, using -g_bookmark_file_add_application() or g_bookmark_file_set_app_info(). If a -bookmark has no applications then it won't be dumped when creating the -on disk representation, using g_bookmark_file_to_data() or -g_bookmark_file_to_file(). - - - -The #GBookmarkFile parser was added in GLib 2.12. @@ -93,35 +22,30 @@ The #GBookmarkFile parser was added in GLib 2.12. -The GBookmarkFile struct contains only private data -and should not be used directly. + -Error domain for bookmark file parsing. Errors in this domain will be -from the #GBookmarkFileError enumeration. See #GError for informations -on error domains. + -Error codes returned by bookmark file parsing. + -@G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed -@G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found -@G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not -register a bookmark -@G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found -@G_BOOKMARK_FILE_ERROR_READ: document was ill formed -@G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an -unknown encoding -@G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing -@G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found +@G_BOOKMARK_FILE_ERROR_INVALID_URI: +@G_BOOKMARK_FILE_ERROR_INVALID_VALUE: +@G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: +@G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: +@G_BOOKMARK_FILE_ERROR_READ: +@G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: +@G_BOOKMARK_FILE_ERROR_WRITE: +@G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: diff --git a/glib/gatomic.c b/glib/gatomic.c index d9a97aba6..ae290ecad 100644 --- a/glib/gatomic.c +++ b/glib/gatomic.c @@ -33,7 +33,7 @@ /** * SECTION:atomic_operations * @title: Atomic Operations - * @shot_description: basic atomic integer and pointer operations + * @short_description: basic atomic integer and pointer operations * @see_also: #GMutex * * The following functions can be used to atomically access integers and diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c index a8d580da0..9501fd579 100644 --- a/glib/gbookmarkfile.c +++ b/glib/gbookmarkfile.c @@ -56,6 +56,50 @@ #include "gutils.h" +/** + * SECTION:bookmarkfile + * @title: Bookmark file parser + * @short_description: parses files containing bookmarks + * + * GBookmarkFile lets you parse, edit or create files containing bookmarks + * to URI, along with some meta-data about the resource pointed by the URI + * like its MIME type, the application that is registering the bookmark and + * the icon that should be used to represent the bookmark. The data is stored + * using the + * Desktop Bookmark + * Specification. + * + * The syntax of the bookmark files is described in detail inside the Desktop + * Bookmark Specification, here is a quick summary: bookmark files use a + * sub-class of the XML Bookmark Exchange Language + * specification, consisting of valid UTF-8 encoded XML, under the + * xbel root element; each bookmark is stored inside a + * bookmark element, using its URI: no relative paths can + * be used inside a bookmark file. The bookmark may have a user defined title + * and description, to be used instead of the URI. Under the + * metadata element, with its owner + * attribute set to http://freedesktop.org, is stored the + * meta-data about a resource pointed by its URI. The meta-data consists of + * the resource's MIME type; the applications that have registered a bookmark; + * the groups to which a bookmark belongs to; a visibility flag, used to set + * the bookmark as "private" to the applications and groups that has it + * registered; the URI and MIME type of an icon, to be used when displaying + * the bookmark inside a GUI. + * |[FIXME: MISSING XINCLUDE CONTENT]| + * + * A bookmark file might contain more than one bookmark; each bookmark + * is accessed through its URI. + * + * The important caveat of bookmark files is that when you add a new + * bookmark you must also add the application that is registering it, using + * g_bookmark_file_add_application() or g_bookmark_file_set_app_info(). + * If a bookmark has no applications then it won't be dumped when creating + * the on disk representation, using g_bookmark_file_to_data() or + * g_bookmark_file_to_file(). + * + * The #GBookmarkFile parser was added in GLib 2.12. + */ + /* XBEL 1.0 standard entities */ #define XBEL_VERSION "1.0" #define XBEL_DTD_NICK "xbel" diff --git a/glib/gbookmarkfile.h b/glib/gbookmarkfile.h index bdf97c09f..f663ebf27 100644 --- a/glib/gbookmarkfile.h +++ b/glib/gbookmarkfile.h @@ -29,10 +29,31 @@ G_BEGIN_DECLS -/* GError enumeration +/** + * G_BOOKMARK_FILE_ERROR: + * + * Error domain for bookmark file parsing. + * Errors in this domain will be from the #GBookmarkFileError + * enumeration. See #GError for information on error domains. */ #define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ()) + +/** + * GBookmarkFileError: + * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed + * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found + * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did + * not register a bookmark + * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found + * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed + * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was + * in an unknown encoding + * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing + * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found + * + * Error codes returned by bookmark file parsing. + */ typedef enum { G_BOOKMARK_FILE_ERROR_INVALID_URI, @@ -47,8 +68,11 @@ typedef enum GQuark g_bookmark_file_error_quark (void); -/* - * GBookmarkFile +/** + * GBookmarkFile: + * + * The GBookmarkFile struct contains only + * private data and should not be directly accessed. */ typedef struct _GBookmarkFile GBookmarkFile; diff --git a/glib/tests/Makefile.am b/glib/tests/Makefile.am index 0fbb8fcff..4095574c6 100644 --- a/glib/tests/Makefile.am +++ b/glib/tests/Makefile.am @@ -135,4 +135,5 @@ CLEANFILES = \ EXTRA_DIST += \ 4096-random-bytes \ - keyfiletest.ini + keyfiletest.ini \ + bookmarks.xbel diff --git a/glib/tests/bookmarks.xbel b/glib/tests/bookmarks.xbel new file mode 100644 index 000000000..969332e1d --- /dev/null +++ b/glib/tests/bookmarks.xbel @@ -0,0 +1,23 @@ + + + + + Desktop Bookmarks Spec + + + text/xml + + + + + + Editors + + + + +