1 #ifndef LRDF_TYPES_H
2 #define LRDF_TYPES_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <sys/types.h>
9 
10 enum lrdf_objtype {
11 	lrdf_uri,
12 	lrdf_literal
13 };
14 
15 typedef int64_t lrdf_hash;
16 
17 typedef struct _lrdf_statement {
18 	char *subject;
19 	char *predicate;
20 	char *object;
21 	enum lrdf_objtype object_type;
22 	struct _lrdf_statement *next;
23 	lrdf_hash shash;
24 	lrdf_hash phash;
25 	lrdf_hash ohash;
26 	lrdf_hash source;
27 } lrdf_statement;
28 
29 typedef struct _lrdf_string_hash {
30 	lrdf_hash hash;
31 	char *str;
32 	struct _lrdf_string_hash *next;
33 } lrdf_string_hash;
34 
35 typedef struct _lrdf_triple_hash {
36 	lrdf_hash hash;
37 	lrdf_statement *triple;
38 	struct _lrdf_triple_hash *next;
39 } lrdf_triple_hash;
40 
41 typedef struct _lrdf_closure_hash {
42 	lrdf_hash subject;
43 	lrdf_hash object;
44 	struct _lrdf_closure_hash *next;
45 } lrdf_closure_hash;
46 
47 typedef struct {
48 	unsigned long pid;
49 	char         *label;
50 	float         value;
51 } lrdf_portvalue;
52 
53 typedef struct {
54 	unsigned int    count;
55 	lrdf_portvalue *items;
56 } lrdf_defaults;
57 
58 typedef struct {
59 	unsigned int   size;
60 	unsigned int   count;
61 	char         **items;
62 } lrdf_uris;
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif
69