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

KIMAP Library

  • KIMAP
  • FetchJob
Classes | Signals | Public Member Functions | Protected Member Functions | List of all members
KIMAP::FetchJob Class Reference

#include <fetchjob.h>

Inherits KIMAP::Job.

Classes

class  FetchScope
 

Signals

void headersReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, qint64 > &sizes, const QMap< qint64, KIMAP::MessageFlags > &flags, const QMap< qint64, KIMAP::MessagePtr > &messages)
 
void messagesReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, KIMAP::MessagePtr > &messages)
 
void partsReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, KIMAP::MessageParts > &parts)
 

Public Member Functions

 FetchJob (Session *session)
 
KIMAP_DEPRECATED QMap< qint64,
MessageFlags > 
flags () const
 
bool isUidBased () const
 
KIMAP_DEPRECATED QMap< qint64,
MessagePtr > 
messages () const
 
KIMAP_DEPRECATED QMap< qint64,
MessageParts > 
parts () const
 
FetchScope scope () const
 
ImapSet sequenceSet () const
 
void setScope (const FetchScope &scope)
 
void setSequenceSet (const ImapSet &set)
 
void setUidBased (bool uidBased)
 
KIMAP_DEPRECATED QMap< qint64,
qint64 > 
sizes () const
 
KIMAP_DEPRECATED QMap< qint64,
qint64 > 
uids () const
 

Protected Member Functions

virtual void doStart ()
 
virtual void handleResponse (const Message &response)
 

Detailed Description

Fetch message data from the server.

All data is returned using the signals, so you need to connect to the relevant signal (or all of them) before starting the job.

This job will always use BODY.PEEK rather than BODY to fetch message content, so it will not set the flag.

This job can only be run when the session is in the selected state.

Definition at line 56 of file fetchjob.h.

Member Function Documentation

QMap< qint64, MessageFlags > FetchJob::flags ( ) const
Deprecated:
returns an empty map; use the signals instead

Definition at line 155 of file fetchjob.cpp.

void KIMAP::FetchJob::headersReceived ( const QString &  mailBox,
const QMap< qint64, qint64 > &  uids,
const QMap< qint64, qint64 > &  sizes,
const QMap< qint64, KIMAP::MessageFlags > &  flags,
const QMap< qint64, KIMAP::MessagePtr > &  messages 
)
signal

Provides header and message results.

This signal will be emitted if the requested scope mode was FetchScope::Full, FetchScope::Flags or FetchScope::Headers with no parts specified

This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.

Note that, depending on the scope, some of the parameters of this signal may be empty maps.

Parameters
mailBoxthe name of the mailbox the fetch job was executed on
uidsa map from message sequence numbers to message UIDs; this will always be populated
sizesa map from message sequence numbers to message sizes (sizes are in octets and refer to the transfer encoding of the message); populated if the scope is FetchScope::Full or FetchScope::Headers
flagsa map from message sequence numbers to message flags; populated if the scope is FetchScope::Flags, FetchScope::Full of FetchScope::Headers
messagesa map from message sequence numbers to message contents (including headers); populated if the scope is FetchScope::Full, FetchScope::Headers or FetchScope::Structure
bool FetchJob::isUidBased ( ) const

How to interpret the sequence set.

Returns
if true the result of sequenceSet() should be interpreted as UIDs, if false it should be interpreted as sequence numbers

Definition at line 127 of file fetchjob.cpp.

QMap< qint64, MessagePtr > FetchJob::messages ( ) const
Deprecated:
returns an empty map; use the signals instead

Definition at line 145 of file fetchjob.cpp.

void KIMAP::FetchJob::messagesReceived ( const QString &  mailBox,
const QMap< qint64, qint64 > &  uids,
const QMap< qint64, KIMAP::MessagePtr > &  messages 
)
signal

Provides header and message results.

This signal will be emitted if the requested scope mode was FetchScope::Content or FetchScope::Headers with no parts specified or FetchScope::Structure.

This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.

Parameters
mailBoxthe name of the mailbox the fetch job was executed on
uidsa map from message sequence numbers to message UIDs
messagesa map from message sequence numbers to message contents
QMap< qint64, MessageParts > FetchJob::parts ( ) const
Deprecated:
returns an empty map; use the signals instead

Definition at line 150 of file fetchjob.cpp.

void KIMAP::FetchJob::partsReceived ( const QString &  mailBox,
const QMap< qint64, qint64 > &  uids,
const QMap< qint64, KIMAP::MessageParts > &  parts 
)
signal

Provides header and message results.

This signal will be emitted if the requested scope mode was FetchScope::Content or FetchScope::Headers with specified parts.

This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.

Parameters
mailBoxthe name of the mailbox the fetch job was executed on
uidsa map from message sequence numbers to message UIDs
partsa map from message sequence numbers to message part collections
FetchJob::FetchScope FetchJob::scope ( ) const

Specifies what data will be fetched.

Definition at line 139 of file fetchjob.cpp.

ImapSet FetchJob::sequenceSet ( ) const

The messages that will be fetched.

Definition at line 115 of file fetchjob.cpp.

void FetchJob::setScope ( const FetchScope &  scope)

Sets what data should be fetched.

The default scope is FetchScope::Content (all content parts).

Parameters
scopea FetchScope object describing what data should be fetched

Definition at line 133 of file fetchjob.cpp.

void FetchJob::setSequenceSet ( const ImapSet &  set)

Set which messages to fetch data for.

If sequence numbers are given, isUidBased() should be false. If UIDs are given, isUidBased() should be true.

Parameters
setthe sequence numbers or UIDs of the messages to fetch data for

Definition at line 108 of file fetchjob.cpp.

void FetchJob::setUidBased ( bool  uidBased)

Set how the sequence set should be interpreted.

Parameters
uidBasedif true the argument to setSequenceSet will be interpreted as UIDs, if false it will be interpreted as sequence numbers

Definition at line 121 of file fetchjob.cpp.

QMap< qint64, qint64 > FetchJob::sizes ( ) const
Deprecated:
returns an empty map; use the signals instead

Definition at line 160 of file fetchjob.cpp.

QMap< qint64, qint64 > FetchJob::uids ( ) const
Deprecated:
returns an empty map; use the signals instead

Definition at line 165 of file fetchjob.cpp.


The documentation for this class was generated from the following files:
  • fetchjob.h
  • fetchjob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:08 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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