Re-work the bonobo code.
[platform/core/uifw/at-spi2-atk.git] / cspi / bonobo / cspi-bonobo.c
1 #include "../cspi-lowlevel.h"
2
3 #include <libbonobo.h>
4
5 void
6 cspi_dup_ref (CORBA_Object object)
7 {
8   bonobo_object_dup_ref (object, NULL);
9 }
10
11 void
12 cspi_release_unref (CORBA_Object object)
13 {
14   bonobo_object_release_unref (object, NULL);
15 }
16
17 SPIBoolean
18 cspi_check_ev (const char *error_string)
19 {
20   CORBA_Environment *ev = cspi_ev ();
21
22   if (ev->_major != CORBA_NO_EXCEPTION)
23     {
24       char *err;
25
26       err = bonobo_exception_get_text (ev);
27
28       fprintf (stderr, "Warning: AT-SPI error: %s: %s\n",
29                error_string, err);
30
31       g_free (err);
32
33       CORBA_exception_free (ev);
34
35       return FALSE;
36     }
37   else
38     {
39       return TRUE;
40     }
41 }
42