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 ) ) {
89 Acl::Rights rights = d->userRights[identifier];
90 return rights & right;
100 if ( d->userRights.contains( identifier ) ) {
101 result = d->userRights[identifier];
109 return d->userRights;
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:25:16 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.