]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/include/openils/oils_idl.h
Use a locally hosted yaz package to avoid strange firewalls
[Evergreen.git] / Open-ILS / include / openils / oils_idl.h
1 #include "opensrf/log.h"
2 #include "opensrf/utils.h"
3 #include "opensrf/osrf_hash.h"
4
5 #ifndef OILS_IDL_API
6 #define OILS_IDL_API
7
8 osrfHash* oilsIDLInit( const char* );
9 osrfHash* oilsIDL(void);
10 osrfHash* oilsIDLFindPath( const char*, ... );
11
12 /* The oilsIDL hash looks like this:
13
14 { aws : {
15         classname       : "aws",
16         fieldmapper     : "actor::workstation",
17         tablename       : "actor.workstation",          optional
18         sequence        : "actor.workstation_id_seq",   optional
19         primarykey      : "id",
20         virtual         : "true",                       optional, "true" | "false"
21         fields          : {
22                 isnew : {
23                         name            : "isnew",
24                         array_position  : "0",
25                         virtual         : "true",       "true" | "false"
26                         primitive       : "number"      optional, JSON primitive (number, string, array,
27                                                         object, bool)
28                 },
29                 ...
30         },
31         links           : {
32                 record : {
33                         field           : "owning_lib", field above that links to another class
34                         rel_type        : "has_a",      link type, "has_a" | "has_many" | "might_have"
35                         class           : "aou",        the foreign class that is linked
36                         key             : "id",         the foreign class's key that creates the link to "field"
37                         map             : []            osrfStringArray used by cstore in "has_many" rel_types to
38                                                         point through a linking class
39                 },
40                 ...
41         },
42         ...
43 }
44
45 */
46
47 int oilsIDL_classIsFieldmapper(const char*);
48 char * oilsIDL_pton(const char *, int);
49 int oilsIDL_ntop(const char *, const char *);
50
51 #endif