]> git.0d.be Git - empathy.git/blob - libempathy/empathy-avatar.h
Import tools from telepathy-glib 0.7.3 and build a static libemp-extensions.la.
[empathy.git] / libempathy / empathy-avatar.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2006 Xavier Claessens <xclaesse@gmail.com>
4  * Copyright (C) 2007 Collabora Ltd.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library 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  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * Authors: Xavier Claessens <xclaesse@gmail.com>
21  */
22
23 #ifndef __EMPATHY_AVATAR_H__
24 #define __EMPATHY_AVATAR_H__
25
26 #include <glib-object.h>
27
28 G_BEGIN_DECLS
29
30 #define EMPATHY_TYPE_AVATAR (empathy_avatar_get_type ())
31
32 typedef struct _EmpathyAvatar EmpathyAvatar;
33
34 struct _EmpathyAvatar {
35         guchar *data;
36         gsize   len;
37         gchar  *format;
38         gchar  *token;
39         guint   refcount;
40 };
41
42 GType           empathy_avatar_get_type       (void) G_GNUC_CONST;
43 EmpathyAvatar * empathy_avatar_new            (const guchar  *avatar,
44                                                const gsize    len,
45                                                const gchar   *format,
46                                                const gchar   *token);
47 EmpathyAvatar * empathy_avatar_new_from_cache (const gchar   *token);
48 EmpathyAvatar * empathy_avatar_ref            (EmpathyAvatar *avatar);
49 void            empathy_avatar_unref          (EmpathyAvatar *avatar);
50
51 G_END_DECLS
52
53 #endif /*  __EMPATHY_AVATAR_H__ */