That's great, having UUIDs in Glib is perfect. I prefer not to write my
own solution, but wait first until Glib has UUDIs and use them.

Until Glib has UUIDs, I was planning to use libuuid, but the comments on
Bugzilla say it's not portable. Why? Does it mean I should prefer OSSP
UUID for a program which I want to compile for non-Linux systems?


On ב', 2013-06-03 at 00:07 +0200, Marc-André Lureau wrote:
> Hi
> 
> 
> On Thu, May 30, 2013 at 4:06 PM, אנטולי קרסנר <[email protected]>
> wrote:
>         Hi,
>         
>         Does Gnome have any guidelines or recommendations related to
>         URIs and
>         UUIDs?
>         
>         I'm writing a desktop app which stores data as RDF, and I want
>         to give
>         URIs to all RDF resources.
>         
>         For the resources the application defines, I assume a good
>         choice is to
>         use a URL, but that's pointless because I don't have any
>         website to
>         point to. And still, I need some format. I can make my own,
>         but before
>         that I'd like to know if Gnome has any guidelines for
>         consistency.
> 
> 
> Not a particular one that I know (if this is related to tracker, you
> should ask on their ML for help)
> 
> 
>         For user-defined resources, I can't use a URI which reveals
>         any
>         information, because some of the user data is private. So I
>         decided to
>         use UUIDs, but there are two UUID libraries (one used by Linux
>         and the
>         other provided by OSSP, with C++ binding) and 5 versions of
>         UUID. So
>         again, I'd like to know if there are any guidelines.
> 
> 
> Useful UUIDs from RFC 4122 are either kind of random numbers (version
> 4) or some digest (version 3 or 5).
> 
> 
> Unless you know you want a digest, you can just use version 4. I have
> proposed the following patch in glib, which you can learn from, copy
> or adapt to your needs:
> 
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=639078
> 


_______________________________________________
gnome-love mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-love

Reply via email to