#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <telepathy-glib/interfaces.h>
+
#include "empathy-tp-chat.h"
#include "empathy-chatroom-manager.h"
#include "empathy-account-manager.h"
continue;
}
- account_id = mc_account_get_unique_name (empathy_chatroom_get_account (chatroom));
+ account_id = empathy_account_get_unique_name (
+ empathy_chatroom_get_account (chatroom));
node = xmlNewChild (root, NULL, "chatroom", NULL);
xmlNewTextChild (node, NULL, "name", empathy_chatroom_get_name (chatroom));
{
EmpathyChatroomManagerPriv *priv;
EmpathyChatroom *chatroom;
- McAccount *account;
+ EmpathyAccount *account;
xmlNodePtr child;
gchar *str;
gchar *name;
xmlFree (str);
}
- account = mc_account_lookup (account_id);
+ account = empathy_account_manager_lookup (priv->account_manager, account_id);
if (!account) {
g_free (name);
g_free (room);
/* Set the default file path */
gchar *dir;
- dir = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, NULL);
+ dir = g_build_filename (g_get_user_config_dir (), PACKAGE_NAME, NULL);
if (!g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))
g_mkdir_with_parents (dir, S_IRUSR | S_IWUSR | S_IXUSR);
if (empathy_chatroom_is_favorite (chatroom))
reset_save_timeout (manager);
+ priv->chatrooms = g_list_delete_link (priv->chatrooms, l);
+
g_signal_emit (manager, signals[CHATROOM_REMOVED], 0, chatroom);
g_signal_handlers_disconnect_by_func (chatroom, chatroom_changed_cb, manager);
- priv->chatrooms = g_list_delete_link (priv->chatrooms, l);
g_object_unref (chatroom);
}
EmpathyChatroom *
empathy_chatroom_manager_find (EmpathyChatroomManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
const gchar *room)
{
EmpathyChatroomManagerPriv *priv;
GList *l;
g_return_val_if_fail (EMPATHY_IS_CHATROOM_MANAGER (manager), NULL);
- g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (room != NULL, NULL);
priv = GET_PRIV (manager);
for (l = priv->chatrooms; l; l = l->next) {
EmpathyChatroom *chatroom;
- McAccount *this_account;
+ EmpathyAccount *this_account;
const gchar *this_room;
chatroom = l->data;
GList *
empathy_chatroom_manager_get_chatrooms (EmpathyChatroomManager *manager,
- McAccount *account)
+ EmpathyAccount *account)
{
EmpathyChatroomManagerPriv *priv;
GList *chatrooms, *l;
guint
empathy_chatroom_manager_get_count (EmpathyChatroomManager *manager,
- McAccount *account)
+ EmpathyAccount *account)
{
EmpathyChatroomManagerPriv *priv;
GList *l;
const gchar *roomname;
GQuark channel_type;
TpHandleType handle_type;
- McAccount *account;
+ EmpathyAccount *account;
TpConnection *connection;
channel_type = empathy_dispatch_operation_get_channel_type_id (operation);