• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • sources
  • kde-4.14
  • kdepim
  • mailcommon
  • filter
itemcontext.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  */
19 
20 #include "itemcontext.h"
21 
22 using namespace MailCommon;
23 
24 ItemContext::ItemContext( const Akonadi::Item& item, bool needsFullPayload )
25  : mItem( item ), mItemContextAction(needsFullPayload ? FullPayload : None)
26 {
27 }
28 
29 Akonadi::Item& ItemContext::item()
30 {
31  return mItem;
32 }
33 
34 void ItemContext::setMoveTargetCollection( const Akonadi::Collection &collection )
35 {
36  mMoveTargetCollection = collection;
37 }
38 
39 Akonadi::Collection ItemContext::moveTargetCollection() const
40 {
41  return mMoveTargetCollection;
42 }
43 
44 void ItemContext::setNeedsPayloadStore()
45 {
46  mItemContextAction |= PlayloadStore;
47 }
48 
49 bool ItemContext::needsPayloadStore() const
50 {
51  return (mItemContextAction & PlayloadStore);
52 }
53 
54 void ItemContext::setNeedsFlagStore()
55 {
56  mItemContextAction |= FlagStore;
57 }
58 
59 bool ItemContext::needsFlagStore() const
60 {
61  return (mItemContextAction & FlagStore);
62 }
63 
64 void ItemContext::setDeleteItem()
65 {
66  mItemContextAction |= DeleteItem;
67 }
68 
69 bool ItemContext::deleteItem() const
70 {
71  return (mItemContextAction & DeleteItem);
72 }
73 
74 
75 bool ItemContext::needsFullPayload() const
76 {
77  return (mItemContextAction & FullPayload);
78 }
MailCommon::ItemContext::setNeedsPayloadStore
void setNeedsPayloadStore()
Marks that the item's payload has been changed and needs to be written back.
Definition: itemcontext.cpp:44
MailCommon::ItemContext::ItemContext
ItemContext(const Akonadi::Item &item, bool needsFullPayload)
Creates an item context for the given item.
Definition: itemcontext.cpp:24
itemcontext.h
MailCommon::ItemContext::setDeleteItem
void setDeleteItem()
Definition: itemcontext.cpp:64
MailCommon::ItemContext::setMoveTargetCollection
void setMoveTargetCollection(const Akonadi::Collection &collection)
Sets the target collection the item should be moved to.
Definition: itemcontext.cpp:34
MailCommon::ItemContext::moveTargetCollection
Akonadi::Collection moveTargetCollection() const
Returns the target collection the item should be moved to, or an invalid collection if the item shoul...
Definition: itemcontext.cpp:39
MailCommon::ItemContext::needsPayloadStore
bool needsPayloadStore() const
Returns whether the item's payload needs to be written back.
Definition: itemcontext.cpp:49
MailCommon::ItemContext::item
Akonadi::Item & item()
Returns the item of the context.
Definition: itemcontext.cpp:29
MailCommon::ItemContext::deleteItem
bool deleteItem() const
Definition: itemcontext.cpp:69
MailCommon::ItemContext::setNeedsFlagStore
void setNeedsFlagStore()
Marks that the item's flags has been changed and needs to be written back.
Definition: itemcontext.cpp:54
MailCommon::ItemContext::needsFullPayload
bool needsFullPayload() const
Returns true if the full payload was requested for the item or not.
Definition: itemcontext.cpp:75
MailCommon::ItemContext::needsFlagStore
bool needsFlagStore() const
Returns whether the item's flags needs to be written back.
Definition: itemcontext.cpp:59
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



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