Galago - desktop presence framework

galago-service.h

Go to the documentation of this file.
00001 
00021 #ifndef _GALAGO_SERVICE_H_
00022 #define _GALAGO_SERVICE_H_
00023 
00024 typedef struct _GalagoService        GalagoService;
00025 typedef struct _GalagoServiceClass   GalagoServiceClass;
00026 typedef struct _GalagoServicePrivate GalagoServicePrivate;
00027 
00028 /*
00029  * Service flags
00030  */
00031 typedef enum
00032 {
00033     GALAGO_PRESERVE_SPACES = 0x01, 
00034     GALAGO_PRESERVE_CASE   = 0x02, 
00035     GALAGO_STRIP_SLASH     = 0x04  
00037 } GalagoServiceFlags;
00038 
00039 #include <libgalago/galago-account.h>
00040 #include <libgalago/galago-object.h>
00041 #include <libgalago/galago-signals.h>
00042 
00046 struct _GalagoService
00047 {
00048     GalagoObject parent_object;
00049 
00050     GalagoServicePrivate *priv;
00051 
00052     void (*reserved_1)(void);
00053     void (*reserved_2)(void);
00054     void (*reserved_3)(void);
00055     void (*reserved_4)(void);
00056 };
00057 
00061 struct _GalagoServiceClass
00062 {
00063     GalagoObjectClass parent_class;
00064 
00065     void (*reserved_1)(void);
00066     void (*reserved_2)(void);
00067     void (*reserved_3)(void);
00068     void (*reserved_4)(void);
00069 };
00070 
00071 #define GALAGO_CLASS_SERVICE (galago_service_get_class())
00072 #define GALAGO_DBUS_SERVICE_INTERFACE "org.freedesktop.Galago.Service"
00073 #define GALAGO_IS_SERVICE(obj) (GALAGO_IS_OBJECT(obj) && galago_object_check_cast((obj), GALAGO_CLASS_SERVICE))
00074 
00075 #ifdef __cplusplus
00076 extern "C" {
00077 #endif
00078 
00079 /**************************************************************************/
00081 /**************************************************************************/
00084 #define GALAGO_SERVICE_ID_AIM          "aim"
00085 #define GALAGO_SERVICE_ID_GADUGADU     "gadugadu"
00086 #define GALAGO_SERVICE_ID_GROUPWISE    "groupwise"
00087 #define GALAGO_SERVICE_ID_ICQ          "icq"
00088 #define GALAGO_SERVICE_ID_IRC          "irc"
00089 #define GALAGO_SERVICE_ID_JABBER       "jabber"
00090 #define GALAGO_SERVICE_ID_MSN          "msn"
00091 #define GALAGO_SERVICE_ID_NAPSTER      "napster"
00092 #define GALAGO_SERVICE_ID_SILC         "silc"
00093 #define GALAGO_SERVICE_ID_TREPIA       "trepia"
00094 #define GALAGO_SERVICE_ID_YAHOO        "yahoo"
00095 #define GALAGO_SERVICE_ID_ZEPHYR       "zephyr"
00096 
00099 /**************************************************************************/
00101 /**************************************************************************/
00109 GalagoObjectClass *galago_service_get_class(void);
00110 
00125 GalagoService *galago_service_new(const char *id, const char *name,
00126                                   galago_bool native,
00127                                   GalagoServiceFlags flags);
00128 
00136 const char *galago_service_get_id(const GalagoService *service);
00137 
00145 const char *galago_service_get_name(const GalagoService *service);
00146 
00155 galago_bool galago_service_is_native(const GalagoService *service);
00156 
00164 GalagoServiceFlags galago_service_get_flags(const GalagoService *service);
00165 
00176 GalagoAccount *galago_service_get_account(const GalagoService *service,
00177                                           const char *username,
00178                                           galago_bool query);
00179 
00189 const GalagoList *galago_service_get_accounts(const GalagoService *service,
00190                                               galago_bool query);
00191 
00200 void galago_service_add_account(GalagoService *service,
00201                                 GalagoAccount *account);
00202 
00211 void galago_service_remove_account(GalagoService *service,
00212                                    GalagoAccount *account);
00213 
00226 const char *galago_service_normalize(const GalagoService *service,
00227                                      const char *username);
00228 
00231 #ifdef __cplusplus
00232 }
00233 #endif
00234 
00235 #endif /* _GALAGO_SERVICE_H_ */