From 359c1034e0b8ccc08f877b46e6218254394fbc3e Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 Nov 2023 16:47:48 +0000 Subject: [PATCH] docs: Move the GUuid SECTION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move it to a separate page as there’s no public struct to hang the docs off. Signed-off-by: Philip Withnall Helps: #3037 --- docs/reference/glib/glib.toml.in | 1 + docs/reference/glib/meson.build | 1 + docs/reference/glib/uuid.md | 25 +++++++++++++++++++++++++ glib/guuid.c | 22 ---------------------- 4 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 docs/reference/glib/uuid.md diff --git a/docs/reference/glib/glib.toml.in b/docs/reference/glib/glib.toml.in index 7a12d232d..3c14921c2 100644 --- a/docs/reference/glib/glib.toml.in +++ b/docs/reference/glib/glib.toml.in @@ -69,6 +69,7 @@ content_files = [ "base64.md", "goption.md", "data-structures.md", + "uuid.md", "unicode.md", "threads-deprecated.md", diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 39b17e28f..151a7794e 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -169,6 +169,7 @@ expand_content_files = [ 'goption.md', 'data-structures.md', 'unicode.md', + 'uuid.md', ] glib_toml = configure_file(input: 'glib.toml.in', output: 'glib.toml', configuration: toml_conf) diff --git a/docs/reference/glib/uuid.md b/docs/reference/glib/uuid.md new file mode 100644 index 000000000..3abebe3be --- /dev/null +++ b/docs/reference/glib/uuid.md @@ -0,0 +1,25 @@ +Title: GUuid +SPDX-License-Identifier: LGPL-2.1-or-later +SPDX-FileCopyrightText: 2017 Bastien Nocera +SPDX-FileCopyrightText: 2017 Marc-André Lureau + +# GUuid + +A UUID, or Universally unique identifier, is intended to uniquely +identify information in a distributed environment. For the +definition of UUID, see [RFC 4122](https://tools.ietf.org/html/rfc4122.html). + +The creation of UUIDs does not require a centralized authority. + +UUIDs are of relatively small size (128 bits, or 16 bytes). The +common string representation (ex: +`1d6c0810-2bd6-45f3-9890-0268422a6f14`) needs 37 bytes. +[func@GLib.uuid_string_is_valid] can be used to check whether a string is a +valid UUID. + +The UUID specification defines 5 versions, and calling +[func@GLib.uuid_string_random] will generate a unique (or rather random) +UUID of the most common version, version 4. + +UUID support was added to GLib in version 2.52. + diff --git a/glib/guuid.c b/glib/guuid.c index 5368465c5..f2d632bae 100644 --- a/glib/guuid.c +++ b/glib/guuid.c @@ -35,28 +35,6 @@ typedef struct { guint8 bytes[16]; } GUuid; -/** - * SECTION:uuid - * @title: GUuid - * @short_description: a universally unique identifier - * - * A UUID, or Universally unique identifier, is intended to uniquely - * identify information in a distributed environment. For the - * definition of UUID, see [RFC 4122](https://tools.ietf.org/html/rfc4122.html). - * - * The creation of UUIDs does not require a centralized authority. - * - * UUIDs are of relatively small size (128 bits, or 16 bytes). The - * common string representation (ex: - * 1d6c0810-2bd6-45f3-9890-0268422a6f14) needs 37 bytes. - * - * The UUID specification defines 5 versions, and calling - * g_uuid_string_random() will generate a unique (or rather random) - * UUID of the most common version, version 4. - * - * Since: 2.52 - */ - /* * g_uuid_to_string: * @uuid: a #GUuid