changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > demo / ffi/demo.h

changeset 13: 1fedeaa5bfc5
parent: 315fedf35bc7
author: ellis <ellis@rwest.io>
date: Fri, 19 May 2023 22:38:49 -0400
permissions: -rw-r--r--
description: tweaks to ffi and makefile
1 #ifndef demo_h
2 #define demo_h
3 
4 /* Generated with cbindgen:0.24.3 */
5 
6 /* DO NOT TOUCH */
7 
8 #include <stdarg.h>
9 #include <stdbool.h>
10 #include <stdint.h>
11 #include <stdlib.h>
12 
13 #define KEY_LEN 32
14 
15 #define OUT_LEN 32
16 
17 #define OUT_LEN_HEX (OUT_LEN * 2)
18 
19 typedef struct CustomService CustomService;
20 
21 /**
22  * APPLICATION TYPES
23  */
24 typedef struct Service Service;
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif // __cplusplus
29 
30 void free_service(struct Service *ptr);
31 
32 struct Service *service_from_string(const char *ptr);
33 
34 struct Service *service_from_json_string(const char *ptr);
35 
36 char *service_to_json_string(const struct Service *ptr);
37 
38 struct Service *service_from_ron_string(const char *ptr);
39 
40 char *service_to_ron_string(const struct Service *ptr);
41 
42 struct Service *service_decode(const uint8_t *ptr, size_t len);
43 
44 uint8_t *service_encode(const struct Service *ptr);
45 
46 void free_custom_service(struct CustomService *ptr);
47 
48 struct CustomService *custom_service_from_string(const char *ptr);
49 
50 struct CustomService *custom_service_from_json_string(const char *ptr);
51 
52 char *custom_service_to_json_string(const struct CustomService *ptr);
53 
54 struct CustomService *custom_service_from_ron_string(const char *ptr);
55 
56 char *custom_service_to_ron_string(const struct CustomService *ptr);
57 
58 struct CustomService *custom_service_decode(const uint8_t *ptr, size_t len);
59 
60 uint8_t *custom_service_encode(const struct CustomService *ptr);
61 
62 #ifdef __cplusplus
63 } // extern "C"
64 #endif // __cplusplus
65 
66 #endif /* demo_h */