]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/blob - src/forb/tests-idl/example_client.c
Add 'src/forb/' from commit '1ef7503676513a85e80eda0950d0cae8b60d7cdd'
[frescor/frsh-forb.git] / src / forb / tests-idl / example_client.c
1 #include <stdio.h>
2 #include <forb.h>
3 #include "myinterface.h"  /* IDL compiler generated prototypes etc. */
4
5 int main(int argc, char *argv[])
6 {
7         forb_orb orb;
8         myinterface example;
9         CORBA_Environment env;
10         CORBA_long sum, a, b;
11
12         orb = forb_init(&argc, &argv, NULL); /* FORB initialization */
13
14         /* Find our implementation */
15         example = forb_resolve_reference(orb, "example");
16
17         /* Call our implementation */
18         sum = myinterface_add(example, 2, 3, &env);
19         printf("2+3=%d\n", sum);
20
21         /* Call our implementation again */
22         myinterface_get_last(example, &a, &b, &env);
23         printf("last used values: %d and %d\n", a, b);
24
25         return 0;
26 }