• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::ItemModifyJob

Akonadi::ItemModifyJob Class Reference

Job that modifies an existing item in the Akonadi storage. More...

#include <itemmodifyjob.h>

Inheritance diagram for Akonadi::ItemModifyJob:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void disableRevisionCheck ()
bool ignorePayload () const
Item item () const
 ItemModifyJob (const Item &item, QObject *parent=0)
void setIgnorePayload (bool ignore)
virtual ~ItemModifyJob ()

Protected Member Functions

virtual void doHandleResponse (const QByteArray &tag, const QByteArray &data)
virtual void doStart ()

Detailed Description

Job that modifies an existing item in the Akonadi storage.

This job is used to writing back items to the Akonadi storage, after the user has changed them in any way. For performance reasons either the full item (including the full payload) can written back or only the meta data of the item.

Example:

 // Fetch item with unique id 125
 Akonadi::ItemFetchJob *fetchJob = new Akonadi::ItemFetchJob( Akonadi::Item( 125 ) );
 if ( fetchJob->exec() ) {
   Akonadi::Item item = fetchJob->items().first();

   // Set a custom flag
   item.setFlag( "\GotIt" );

   // Store back modified item
   Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob( item );
   if ( modifyJob->exec() )
     qDebug() << "Item modified successfully";
   else
     qDebug() << "Error occurred";
 } else {
   qDebug() << "Error occurred";
 }

Author:
Volker Krause <vkrause@kde.org>

Definition at line 67 of file itemmodifyjob.h.


Constructor & Destructor Documentation

ItemModifyJob::ItemModifyJob ( const Item &  item,
QObject *  parent = 0 
) [explicit]

Creates a new item modify job.

Parameters:
item The modified item object to store.
parent The parent object.

Definition at line 73 of file itemmodifyjob.cpp.

ItemModifyJob::~ItemModifyJob (  )  [virtual]

Destroys the item modify job.

Definition at line 81 of file itemmodifyjob.cpp.


Member Function Documentation

void ItemModifyJob::disableRevisionCheck (  ) 

Disables the check of the revision number.

Note:
If disabled, no conflict detection is available.

Definition at line 198 of file itemmodifyjob.cpp.

void ItemModifyJob::doHandleResponse ( const QByteArray &  tag,
const QByteArray &  data 
) [protected, virtual]

This method should be reimplemented in the concrete jobs in case you want to handle incoming data.

It will be called on received data from the backend. The default implementation does nothing.

Parameters:
tag The tag of the corresponding command, empty if this is an untagged response.
data The received data.

Reimplemented from Akonadi::Job.

Definition at line 151 of file itemmodifyjob.cpp.

void ItemModifyJob::doStart (  )  [protected, virtual]

This method must be reimplemented in the concrete jobs.

It will be called after the job has been started and a connection to the Akonadi backend has been established.

Implements Akonadi::Job.

Definition at line 85 of file itemmodifyjob.cpp.

bool ItemModifyJob::ignorePayload (  )  const

Returns whether the payload of the modified item shall be omitted from transmission to the Akonadi storage.

Definition at line 191 of file itemmodifyjob.cpp.

Item ItemModifyJob::item (  )  const

Returns the modified and stored item including the changed revision number.

Definition at line 205 of file itemmodifyjob.cpp.

void ItemModifyJob::setIgnorePayload ( bool  ignore  ) 

Sets whether the payload of the modified item shall be omitted from transmission to the Akonadi storage.

The default is false, however it can be set for performance reasons.

Definition at line 175 of file itemmodifyjob.cpp.


The documentation for this class was generated from the following files:
  • itemmodifyjob.h
  • itemmodifyjob.cpp

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal