* Authors: Richard Hult <richard@imendio.com>
* Martyn Russell <martyn@imendio.com>
* Xavier Claessens <xclaesse@gmail.com>
- * Jonny Lamb <jonny.lamb@collabora.co.uk>
*/
#ifndef __EMPATHY_UTILS_H__
#include "empathy-contact.h"
-G_BEGIN_DECLS
-
#define EMPATHY_GET_PRIV(obj,type) ((type##Priv*) ((type*)obj)->priv)
-#define G_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
+#define EMP_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
-typedef enum {
- EMPATHY_REGEX_AS_IS,
- EMPATHY_REGEX_BROWSER,
- EMPATHY_REGEX_APT,
- EMPATHY_REGEX_EMAIL,
- EMPATHY_REGEX_OTHER,
- EMPATHY_REGEX_ALL,
-} EmpathyRegExType;
+G_BEGIN_DECLS
-/* Regular expressions */
+void empathy_init (void);
+/* Strings */
gchar * empathy_substring (const gchar *str,
gint start,
gint end);
-gint empathy_regex_match (EmpathyRegExType type,
- const gchar *msg,
- GArray *start,
- GArray *end);
-
-/* Strings */
gint empathy_strcasecmp (const gchar *s1,
const gchar *s2);
gint empathy_strncasecmp (const gchar *s1,
guint empathy_account_hash (gconstpointer key);
gboolean empathy_account_equal (gconstpointer a,
gconstpointer b);
-MissionControl *empathy_mission_control_new (void);
+MissionControl *empathy_mission_control_dup_singleton (void);
const gchar * empathy_presence_get_default_message (McPresence presence);
const gchar * empathy_presence_to_str (McPresence presence);
McPresence empathy_presence_from_str (const gchar *str);
gpointer user_data,
GMainLoop **loop);
McAccount * empathy_channel_get_account (TpChannel *channel);
-gpointer empathy_connect_to_account_status_changed (MissionControl *mc,
- GCallback handler,
- gpointer user_data,
- GClosureNotify free_func);
-void empathy_disconnect_account_status_changed (gpointer token);
gboolean empathy_proxy_equal (gconstpointer a,
gconstpointer b);
guint empathy_proxy_hash (gconstpointer key);
-
-typedef void (*empathy_connection_callback_for_request_channel) (TpConnection *connection,
- TpChannel *channel,
- const GError *error,
- gpointer user_data,
- GObject *weak_object);
-void empathy_connection_request_channel (TpConnection *proxy,
- gint timeout_ms,
- const gchar *channel_type,
- guint handle_type,
- const gchar *name,
- gboolean suppress_handler,
- empathy_connection_callback_for_request_channel callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object);
+gboolean empathy_check_available_state (void);
G_END_DECLS