]> git.0d.be Git - empathy.git/blob - libempathy/empathy-chatroom-manager.h
account-settings: allow to change the service
[empathy.git] / libempathy / empathy-chatroom-manager.h
1 /*
2  * Copyright (C) 2004-2007 Imendio AB
3  * Copyright (C) 2007-2010 Collabora Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program 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  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  *
20  * Authors: Xavier Claessens <xclaesse@gmail.com>
21  *          Martyn Russell <martyn@imendio.com>
22  */
23
24 #ifndef __EMPATHY_CHATROOM_MANAGER_H__
25 #define __EMPATHY_CHATROOM_MANAGER_H__
26
27 #include <glib-object.h>
28
29 #include <telepathy-glib/account.h>
30
31 #include "empathy-chatroom.h"
32
33 G_BEGIN_DECLS
34
35 #define EMPATHY_TYPE_CHATROOM_MANAGER         (empathy_chatroom_manager_get_type ())
36 #define EMPATHY_CHATROOM_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHATROOM_MANAGER, EmpathyChatroomManager))
37 #define EMPATHY_CHATROOM_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CHATROOM_MANAGER, EmpathyChatroomManagerClass))
38 #define EMPATHY_IS_CHATROOM_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHATROOM_MANAGER))
39 #define EMPATHY_IS_CHATROOM_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHATROOM_MANAGER))
40 #define EMPATHY_CHATROOM_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHATROOM_MANAGER, EmpathyChatroomManagerClass))
41
42 typedef struct _EmpathyChatroomManager      EmpathyChatroomManager;
43 typedef struct _EmpathyChatroomManagerClass EmpathyChatroomManagerClass;
44
45 struct _EmpathyChatroomManager
46 {
47   GObject parent;
48   gpointer priv;
49 };
50
51 struct _EmpathyChatroomManagerClass
52 {
53   GObjectClass parent_class;
54 };
55
56 GType empathy_chatroom_manager_get_type (void) G_GNUC_CONST;
57
58 EmpathyChatroomManager * empathy_chatroom_manager_dup_singleton (
59     const gchar *file);
60
61 gboolean empathy_chatroom_manager_add (EmpathyChatroomManager *manager,
62     EmpathyChatroom *chatroom);
63
64 void empathy_chatroom_manager_remove (EmpathyChatroomManager *manager,
65     EmpathyChatroom *chatroom);
66
67 EmpathyChatroom * empathy_chatroom_manager_find (
68     EmpathyChatroomManager *manager,
69     TpAccount *account,
70     const gchar *room);
71
72 EmpathyChatroom * empathy_chatroom_manager_ensure_chatroom (
73     EmpathyChatroomManager *manager,
74     TpAccount *account,
75     const gchar *room,
76     const gchar *name);
77
78 GList * empathy_chatroom_manager_get_chatrooms (EmpathyChatroomManager *manager,
79     TpAccount *account);
80
81 G_END_DECLS
82
83 #endif /* __EMPATHY_CHATROOM_MANAGER_H__ */