Galago - desktop presence framework

galago-types.h

Go to the documentation of this file.
00001 
00021 #ifndef _GALAGO_TYPES_H_
00022 #define _GALAGO_TYPES_H_
00023 
00024 /*
00025  * Let me explain what we're doing here...
00026  * A lot of these types are just typedefs of D-BUS types. I don't want
00027  * to #define that macro and include dbus.h in a bunch of files, since
00028  * it's not quite obvious why we're including that file in non-D-BUS
00029  * code. So instead, we're putting them here and typedef'ing them. It
00030  * just feels better to me.
00031  */
00032 
00033 #define DBUS_API_SUBJECT_TO_CHANGE
00034 
00035 #include <dbus/dbus.h>
00036 
00037 typedef dbus_bool_t galago_bool;
00038 
00039 typedef void (*GalagoForEachFunc)(void *data, void *user_data);
00040 typedef void (*GalagoHForEachFunc)(void *key, void *value, void *user_data);
00041 typedef unsigned int (*GalagoHashFunc)(const void *key);
00042 typedef galago_bool (*GalagoEqualFunc)(const void *a, const void *b);
00043 typedef void (*GalagoFreeFunc)(void *data);
00044 
00045 typedef void (*GalagoCallback)(void *obj, const char *prop, void *user_data);
00046 
00047 #define GALAGO_CALLBACK(cb) ((GalagoCallback)(cb))
00048 
00049 #endif /* _GALAGO_TYPES_H_ */