~ubuntu-branches/ubuntu/quantal/xen/quantal

« back to all changes in this revision

Viewing changes to .pc/upstream-23938:fa04fbd56521-rework/tools/ocaml/libs/uuid/uuid.mli

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-22 04:53:35 UTC
  • mfrom: (0.4.1) (1.3.2) (15.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20111222045335-k2jy47lo9124o7e3
Tags: 4.1.2-2ubuntu1
* Merge from Debian testing.  Remaining changes:
    - libxenstore3.0: Conflict and replaces libxen3.
    - libxen-dev: Conflict and replaces libxen3-dev.
    - xenstore-utils: Conflict and replaces libxen3.
    - xen-utils-4.1: Conflict and replaces libxen3, python-xen-3.3,
      and xen-utils-4.1.
    - Make sure the LDFLAGS value passed is suitable for use by ld
      rather than gcc.
    - Dropped:
      - debian/patches/upstream-23044:d4ca456c0c25
      - debian/patches/upstream-23104:1976adbf2b80
      - debian/patches/upstream-changeset-23146.patch
      - debian/patches/upstream-changeset-23147.patch
      - debian/patches/xen-pirq-resubmit-irq.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(*
 
2
 * Copyright (C) 2006-2010 Citrix Systems Inc.
 
3
 * Author Vincent Hanquez <vincent.hanquez@eu.citrix.com>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU Lesser General Public License as published
 
7
 * by the Free Software Foundation; version 2.1 only. with the special
 
8
 * exception on linking described in file LICENSE.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU Lesser General Public License for more details.
 
14
 *)
 
15
(** Type-safe UUIDs.
 
16
    Probably need to refactor this; UUIDs are used in two places:
 
17
    + to uniquely name things across the cluster
 
18
    + as secure session IDs
 
19
 
 
20
    There is the additional constraint that current Xen tools use 
 
21
    a particular format of UUID (the 16 byte variety generated by fresh ())
 
22
 
 
23
        Also, cookies aren't UUIDs and should be put somewhere else.
 
24
*)
 
25
 
 
26
(** A 128-bit UUID.  Using phantom types ('a) to achieve the requires type-safety. *)
 
27
type 'a t
 
28
 
 
29
(** Create a fresh UUID *)
 
30
val make_uuid : unit -> 'a t
 
31
val make_uuid_prng : unit -> 'a t
 
32
val make_uuid_urnd : unit -> 'a t
 
33
val make_uuid_rnd : unit -> 'a t
 
34
 
 
35
(** Create a UUID from a string. *)
 
36
val of_string : string -> 'a t
 
37
 
 
38
(** Marshal a UUID to a string. *)
 
39
val to_string : 'a t -> string
 
40
 
 
41
(** A null UUID, as if such a thing actually existed.  It turns out to be
 
42
 * useful though. *)
 
43
val null : 'a t
 
44
 
 
45
(** Deprecated alias for {! Uuid.of_string} *)
 
46
val uuid_of_string : string -> 'a t
 
47
 
 
48
(** Deprecated alias for {! Uuid.to_string} *)
 
49
val string_of_uuid : 'a t -> string
 
50
 
 
51
(** Convert an array to a UUID. *)
 
52
val uuid_of_int_array : int array -> 'a t
 
53
 
 
54
(** Convert a UUID to an array. *)
 
55
val int_array_of_uuid : 'a t -> int array
 
56
 
 
57
(** Check whether a string is a UUID. *)
 
58
val is_uuid : string -> bool
 
59
 
 
60
(** A 512-bit cookie. *)
 
61
type cookie
 
62
 
 
63
val make_cookie : unit -> cookie
 
64
 
 
65
val cookie_of_string : string -> cookie
 
66
 
 
67
val string_of_cookie : cookie -> string