KIMAP Library
20 #include "getacljob.h"
22 #include <KDE/KLocale>
25 #include "acljobbase_p.h"
26 #include "message_p.h"
27 #include "session_p.h"
32 class GetAclJobPrivate :
public AclJobBasePrivate
35 GetAclJobPrivate( Session *session,
const QString& name ) : AclJobBasePrivate(session, name) {}
36 ~GetAclJobPrivate() { }
38 QMap<QByteArray, Acl::Rights> userRights;
42 using namespace KIMAP;
44 GetAclJob::GetAclJob( Session *session )
45 :
AclJobBase( *new GetAclJobPrivate(session, i18n(
"GetAcl") ))
49 GetAclJob::~GetAclJob()
53 void GetAclJob::doStart()
57 d->tags << d->sessionInternal()->sendCommand(
"GETACL",
'\"' + KIMAP::encodeImapFolderName( d->mailBox.toUtf8() ) +
'\"');
60 void GetAclJob::handleResponse(
const Message &response )
65 if (handleErrorReplies(response) == NotHandled) {
66 if ( response.content.size() >= 4
67 && response.content[1].toString() ==
"ACL" ) {
69 while ( i < response.content.size() - 1 ) {
70 QByteArray
id = response.content[i].toString();
71 QByteArray rights = response.content[i + 1].toString();
82 return d->userRights.keys();
88 if (d->userRights.contains(identifier))
90 Acl::Rights rights = d->userRights[identifier];
91 return rights & right;
101 if (d->userRights.contains(identifier))
103 result = d->userRights[identifier];
111 return d->userRights;
114 #include "getacljob.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 4 2012 14:35:07 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.