Improve default display name for Facebook accounts
[empathy-mirror.git] / libempathy / empathy-debugger.h
blobf3fdc7070bc5671d130b511e23748b0984dd67d6
1 /*
2 * header for Telepathy debug interface implementation
3 * Copyright (C) 2009 Collabora Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _EMPATHY_DEBUGGER
21 #define _EMPATHY_DEBUGGER
23 #include <glib-object.h>
25 #include <telepathy-glib/properties-mixin.h>
26 #include <telepathy-glib/dbus-properties-mixin.h>
28 #include "extensions/extensions.h"
30 G_BEGIN_DECLS
32 #define EMPATHY_TYPE_DEBUGGER empathy_debugger_get_type()
34 #define EMPATHY_DEBUGGER(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_DEBUGGER, EmpathyDebugger))
37 #define EMPATHY_DEBUGGER_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_DEBUGGER, EmpathyDebuggerClass))
40 #define EMPATHY_IS_DEBUGGER(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_DEBUGGER))
43 #define EMPATHY_IS_DEBUGGER_CLASS(klass) \
44 (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_DEBUGGER))
46 #define EMPATHY_DEBUGGER_GET_CLASS(obj) \
47 (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_DEBUGGER, EmpathyDebuggerClass))
49 /* On the basis that messages are around 60 bytes on average, and that 50kb is
50 * a reasonable maximum size for a frame buffer.
53 #define DEBUG_MESSAGE_LIMIT 800
55 typedef struct {
56 gdouble timestamp;
57 gchar *domain;
58 EmpDebugLevel level;
59 gchar *string;
60 } EmpathyDebugMessage;
62 typedef struct {
63 GObject parent;
65 gboolean enabled;
66 GQueue *messages;
67 } EmpathyDebugger;
69 typedef struct {
70 GObjectClass parent_class;
71 TpDBusPropertiesMixinClass dbus_props_class;
72 } EmpathyDebuggerClass;
74 GType empathy_debugger_get_type (void);
76 EmpathyDebugger *
77 empathy_debugger_get_singleton (void);
79 void
80 empathy_debugger_add_message (EmpathyDebugger *self,
81 GTimeVal *timestamp,
82 const gchar *domain,
83 GLogLevelFlags level,
84 const gchar *string);
86 G_END_DECLS
88 #endif /* _EMPATHY_DEBUGGER */