1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2003-2007 Imendio AB
4 * Copyright (C) 2007 Collabora Ltd.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 * Authors: Richard Hult <richard@imendio.com>
22 * Martyn Russell <martyn@imendio.com>
23 * Xavier Claessens <xclaesse@gmail.com>
26 #ifndef __EMPATHY_UTILS_H__
27 #define __EMPATHY_UTILS_H__
30 #include <glib-object.h>
32 #include <libxml/parser.h>
33 #include <libxml/tree.h>
35 #include <libtelepathy/tp-chan.h>
37 #include <libmissioncontrol/mc-account.h>
38 #include <libmissioncontrol/mission-control.h>
40 #include "empathy-contact.h"
44 #define G_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
48 EMPATHY_REGEX_BROWSER,
54 /* Regular expressions */
55 gchar * empathy_substring (const gchar *str,
58 gint empathy_regex_match (EmpathyRegExType type,
64 gint empathy_strcasecmp (const gchar *s1,
66 gint empathy_strncasecmp (const gchar *s1,
69 gboolean empathy_strdiff (const gchar *left,
71 gchar * empathy_escape_as_identifier (const gchar *name);
74 gboolean empathy_xml_validate (xmlDoc *doc,
75 const gchar *dtd_filename);
76 xmlNodePtr empathy_xml_node_get_child (xmlNodePtr node,
77 const gchar *child_name);
78 xmlChar * empathy_xml_node_get_child_content (xmlNodePtr node,
79 const gchar *child_name);
80 xmlNodePtr empathy_xml_node_find_child_prop_value (xmlNodePtr node,
81 const gchar *prop_name,
82 const gchar *prop_value);
85 guint empathy_account_hash (gconstpointer key);
86 gboolean empathy_account_equal (gconstpointer a,
88 MissionControl *empathy_mission_control_new (void);
89 gchar * empathy_inspect_handle (McAccount *account,
92 gchar * empathy_inspect_channel (McAccount *account,
94 void empathy_call_contact (EmpathyContact *contact);
97 #endif /* __EMPATHY_UTILS_H__ */