0 | {-
 1 | UUID: UUIDs for Idris2
 2 |
 3 | Copyright (C) 2026  Joel Berkeley
 4 |
 5 | This program is free software: you can redistribute it and/or modify
 6 | it under the terms of the GNU Affero General Public License as published
 7 | by the Free Software Foundation, either version 3 of the License, or
 8 | (at your option) any later version.
 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 Affero General Public License for more details.
14 |
15 | You should have received a copy of the GNU Affero General Public License
16 | along with this program.  If not, see <https://www.gnu.org/licenses/>.
17 | -}
18 | module UUID.Support.C
19 |
20 | export
21 | %foreign "C:sizeof_uuid_t,libidris2_uuid"
22 | sizeOfUUID_t : Bits64
23 |
24 | export
25 | %foreign "C:uuid_set,libidris2_uuid"
26 | prim__uuidSetByte : GCAnyPtr -> Bits64 -> Bits8 -> PrimIO ()
27 |
28 | export
29 | %foreign "C:idris2_uuid_compare,libuuid"
30 | prim__uuidCompare : GCAnyPtr -> GCAnyPtr -> Int
31 |
32 | export
33 | %foreign "C:idris2_uuid_generate_random,libuuid"
34 | prim__uuidGenerateRandom : GCAnyPtr -> PrimIO ()
35 |
36 | export
37 | %foreign "C:idris2_uuid_generate_time_safe,libuuid"
38 | prim__uuidGenerateTimeSafe : GCAnyPtr -> PrimIO Int
39 |
40 | export
41 | %foreign "C:idris2_uuid_generate_md5,libuuid"
42 | prim__uuidGenerateMD5 : GCAnyPtr -> GCAnyPtr -> String -> Bits64 -> PrimIO ()
43 |
44 | export
45 | %foreign "C:idris2_uuid_generate_sha1,libuuid"
46 | prim__uuidGenerateSHA1 : GCAnyPtr -> GCAnyPtr -> String -> Bits64 -> PrimIO ()
47 |
48 | export
49 | %foreign "C:idris2_uuid_parse,libuuid"
50 | prim__uuidParse : String -> GCAnyPtr -> PrimIO Int
51 |
52 | export
53 | %foreign "C:idris2_uuid_unparse,libidris2_uuid"
54 | prim__uuidUnparse : GCAnyPtr -> PrimIO String
55 |