• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KIMAP Library

  • kimap
acljobbase.cpp
1/*
2 Copyright (c) 2009 Andras Mantia <amantia@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "acljobbase.h"
21#include "acljobbase_p.h"
22#include "message_p.h"
23#include "session_p.h"
24
25#include <KDE/KLocalizedString>
26#include <KDE/KDebug>
27
28using namespace KIMAP;
29
30void AclJobBasePrivate::setIdentifier( const QByteArray &identifier )
31{
32 id = identifier;
33}
34
35QByteArray AclJobBasePrivate::identifier() const
36{
37 return id;
38}
39
40bool AclJobBasePrivate::hasRightEnabled(Acl::Right right)
41{
42 return rightList & right;
43}
44
45void AclJobBasePrivate::setRights(const QByteArray& rights)
46{
47 switch ( rights[0] ) {
48 case '+':
49 modifier = AclJobBase::Add;
50 break;
51 case '-':
52 modifier = AclJobBase::Remove;
53 break;
54 default:
55 modifier = AclJobBase::Change;
56 break;
57 }
58
59 rightList = Acl::rightsFromString( rights );
60}
61
62void AclJobBasePrivate::setRights(AclJobBase::AclModifier _modifier, Acl::Rights rights)
63{
64 modifier = _modifier;
65 // XXX: [alexmerry, 2010-07-24]: this is REALLY unintuitive behaviour
66 rightList|= rights;
67}
68
69AclJobBase::AclJobBase( Session *session )
70 : Job( *new AclJobBasePrivate( session, i18n( "AclJobBase" ) ) )
71{
72}
73
74AclJobBase::AclJobBase( JobPrivate &dd )
75 : Job( dd )
76{
77
78}
79
80AclJobBase::~AclJobBase()
81{
82}
83
84void AclJobBase::setMailBox( const QString &mailBox )
85{
86 Q_D( AclJobBase );
87 d->mailBox = mailBox;
88}
89
90QString AclJobBase::mailBox() const
91{
92 Q_D( const AclJobBase );
93 return d->mailBox;
94}
KIMAP::AclJobBase
Base class for jobs that operate on mailbox ACLs.
Definition: acljobbase.h:44
KIMAP::AclJobBase::AclModifier
AclModifier
Used when subclassing to specify how the ACL will be modified.
Definition: acljobbase.h:57
KIMAP::AclJobBase::setMailBox
void setMailBox(const QString &mailBox)
Set the mailbox to act on.
Definition: acljobbase.cpp:84
KIMAP::AclJobBase::mailBox
QString mailBox() const
The mailbox that will be acted upon.
Definition: acljobbase.cpp:90
KIMAP::Acl::rightsFromString
Rights rightsFromString(const QByteArray &string)
Convert the text form of a set of rights into a Rights bitflag.
Definition: acl.cpp:67
KIMAP::Acl::Right
Right
Possible rights that can be held on a mailbox.
Definition: acl.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIMAP Library

Skip menu "KIMAP Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal