]> rtime.felk.cvut.cz Git - frescor/frsh.git/blob - frsh_api/frsh_core.c
Added frsh_init(), frsh_negotiate_contract() and some fixes
[frescor/frsh.git] / frsh_api / frsh_core.c
1 #include <frsh_core.h>
2 #include <fcb.h>
3 #include <forb.h>
4 #include "frsh_forb.h"
5
6 struct frsh_forb global;
7
8 int frsh_init()
9 {
10         global.orb = forb_init(NULL, NULL, "frsh");
11         if (!global.orb) {
12                 if (errno) return errno;
13                 else return -1;
14         }
15
16         global.fcb = forb_resolve_reference(global.orb,
17                                             fres_contract_broker_reg_name);
18         if (!global.fcb) return FRSH_ERR_NOT_INITIALIZED;
19
20         return 0;
21 }