gloox
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
mucroomconfighandler.h
1
/*
2
Copyright (c) 2006-2009 by Jakob Schroeter <js@camaya.net>
3
This file is part of the gloox library. http://camaya.net/gloox
4
5
This software is distributed under a license. The full license
6
agreement can be found in the file LICENSE in this distribution.
7
This software may not be copied, modified, sold or distributed
8
other than expressed in the named license agreement.
9
10
This software is distributed without any warranty.
11
*/
12
13
14
15
#ifndef MUCROOMCONFIGHANDLER_H__
16
#define MUCROOMCONFIGHANDLER_H__
17
18
#include "gloox.h"
19
#include "jid.h"
20
21
#include <string>
22
#include <list>
23
24
namespace
gloox
25
{
26
27
class
MUCRoom;
28
class
DataForm;
29
38
class
MUCListItem
39
{
40
public
:
45
MUCListItem
(
const
JID
&
jid
)
46
: m_jid( jid ), m_affiliation(
AffiliationInvalid
), m_role(
RoleInvalid
)
47
{}
48
56
MUCListItem
(
const
JID
&
jid
,
MUCRoomRole
role
,
MUCRoomAffiliation
affiliation
,
57
const
std::string&
nick
)
58
: m_jid( jid ), m_nick( nick ), m_affiliation( affiliation ), m_role( role )
59
{}
60
67
MUCListItem
(
const
std::string&
nick
,
MUCRoomAffiliation
affiliation
,
const
std::string&
reason
)
68
: m_nick( nick ), m_affiliation( affiliation ), m_role(
RoleInvalid
),
69
m_reason( reason )
70
{}
71
78
MUCListItem
(
const
std::string&
nick
,
MUCRoomRole
role
,
const
std::string&
reason
)
79
: m_nick( nick ), m_affiliation(
AffiliationInvalid
), m_role( role ),
80
m_reason( reason )
81
{}
82
86
~MUCListItem
() {}
87
92
const
JID
&
jid
()
const
{
return
m_jid; }
93
98
const
std::string&
nick
()
const
{
return
m_nick; }
99
104
MUCRoomAffiliation
affiliation
()
const
{
return
m_affiliation; }
105
110
MUCRoomRole
role
()
const
{
return
m_role; }
111
116
const
std::string&
reason
()
const
{
return
m_reason; }
117
118
private
:
119
JID
m_jid;
120
std::string m_nick;
121
MUCRoomAffiliation
m_affiliation;
122
MUCRoomRole
m_role;
123
std::string m_reason;
126
};
127
131
typedef
std::list<MUCListItem>
MUCListItemList
;
132
136
enum
MUCOperation
137
{
138
RequestUniqueName
,
139
CreateInstantRoom
,
140
CancelRoomCreation
,
141
RequestRoomConfig
,
142
SendRoomConfig
,
143
DestroyRoom
,
144
GetRoomInfo
,
145
GetRoomItems
,
146
SetRNone
,
147
SetVisitor
,
148
SetParticipant
,
149
SetModerator
,
150
SetANone
,
151
SetOutcast
,
152
SetMember
,
153
SetAdmin
,
154
SetOwner
,
155
RequestVoiceList
,
156
StoreVoiceList
,
157
RequestBanList
,
158
StoreBanList
,
159
RequestMemberList
,
160
StoreMemberList
,
161
RequestModeratorList
,
162
StoreModeratorList
,
163
RequestOwnerList
,
164
StoreOwnerList
,
165
RequestAdminList
,
166
StoreAdminList
,
167
InvalidOperation
168
};
169
176
class
GLOOX_API
MUCRoomConfigHandler
177
{
178
public
:
182
virtual
~MUCRoomConfigHandler
() {}
183
191
virtual
void
handleMUCConfigList(
MUCRoom
* room,
const
MUCListItemList
& items,
192
MUCOperation
operation ) = 0;
193
202
virtual
void
handleMUCConfigForm(
MUCRoom
* room,
const
DataForm
& form ) = 0;
203
211
virtual
void
handleMUCConfigResult(
MUCRoom
* room,
bool
success,
MUCOperation
operation ) = 0;
212
220
virtual
void
handleMUCRequest(
MUCRoom
* room,
const
DataForm
& form ) = 0;
221
222
};
223
224
}
225
226
#endif // MUCROOMCONFIGHANDLER_H__
Generated on Thu Jun 27 2013 13:02:36 for gloox by
1.8.1.2