Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / protocols / groupwise / libgroupwise / gwchatrooms.h
blobd28bf576e263f566084576020b25eeb1d1954232
1 /*
2 Kopete Groupwise Protocol
3 gwchatrooms.h - Data types for groupchat
5 Copyright (c) 2005 SUSE Linux AG http://www.suse.com
7 Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
10 * *
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2 of the License, or (at your option) any later version. *
15 * *
16 *************************************************************************
19 #ifndef GWCHATROOMS_H
20 #define GWCHATROOMS_H
22 #include <QDateTime>
23 #include <QList>
24 #include <QMap>
26 namespace GroupWise
29 class ChatContact
31 public:
32 QString dn;
33 uint chatRights;
35 typedef QList<GroupWise::ChatContact> ChatContactList;
37 struct ChatroomSearchResult
39 QString name;
40 QString ownerDN;
41 uint participants;
45 class Chatroom
47 public:
48 enum UserStatus { Participating, NotParticipating };
49 enum Rights { Read = 1, Write = 2, Modify = 4, Moderator = 8, Owner = 16 };
50 QString creatorDN;
51 QString description;
52 QString disclaimer;
53 QString displayName;
54 QString objectId;
55 QString ownerDN;
56 QString query;
57 QString topic;
58 bool archive;
59 uint maxUsers;
60 uint chatRights;
61 UserStatus userStatus;
62 QDateTime createdOn;
63 uint participantsCount;
64 // haveParticipants, Acl, Invites indicate if we have obtained these lists from the server, so we can tell 'not fetched list' and 'fetched empty list' apart.
65 bool haveParticipants;
66 ChatContactList participants;
67 bool haveAcl;
68 ChatContactList acl;
69 bool haveInvites;
70 ChatContactList invites;
72 Chatroom() { archive = false; maxUsers = 0; chatRights = 0; participantsCount = 0; haveParticipants = false; haveAcl = false; haveInvites = false; }
73 Chatroom( ChatroomSearchResult csr ) { archive = false; maxUsers = 0; chatRights = 0; participantsCount = csr.participants; haveParticipants = false; haveAcl = false; haveInvites = false; ownerDN = csr.ownerDN; displayName = csr.name; }
76 typedef QList<Chatroom> ChatroomList;
77 typedef QMap<QString, Chatroom> ChatroomMap;
80 #endif // GWCHATROOMS_H