summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/groupwise/libgroupwise/chatroommanager.h')
-rw-r--r--kopete/protocols/groupwise/libgroupwise/chatroommanager.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
new file mode 100644
index 00000000..4d0e888b
--- /dev/null
+++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h
@@ -0,0 +1,66 @@
+/*
+ Kopete Groupwise Protocol
+ chatroommanager.h - tracks our knowledge of server side chatrooms
+
+ Copyright (c) 2005 SUSE Linux Products GmbH http://www.suse.com
+
+ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This library is free software; you can redistribute it and/or *
+ * modify it under the terms of the GNU Lesser General Public *
+ * License as published by the Free Software Foundation; either *
+ * version 2 of the License, or (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef CHATROOMMANAGER_H
+#define CHATROOMMANAGER_H
+
+#include <qobject.h>
+
+#include "gwchatrooms.h"
+
+class Client;
+
+/**
+ * Keeps a record of the server side chatrooms
+ * @author SUSE Linux Products GmbH
+ */
+class ChatroomManager : public QObject
+{
+ Q_OBJECT
+ public:
+ ChatroomManager( Client * client, const char *name = 0);
+ ~ChatroomManager();
+ GroupWise::ChatroomMap rooms();
+ void requestProperties( const QString & displayName );
+ void updateRooms();
+ void updateCounts();
+ signals:
+ void gotProperties( const GroupWise::Chatroom & );
+ void updated();
+ protected:
+ void getChatrooms( bool refresh );
+ protected slots:
+ /**
+ * Used to initialise the list of chatrooms in response to a SearchChatTask.
+ */
+ void slotGotChatroomList();
+ /**
+ * Used to update the user counts of chatrooms.
+ */
+ void slotGotChatCounts();
+ /**
+ * Get the properties of a specific room.
+ */
+ void slotGotChatProperties();
+ private:
+ Client * m_client;
+ GroupWise::ChatroomMap m_rooms;
+ bool m_replace;
+};
+
+#endif