• Skip to content
  • Skip to link menu
KDE 4.8 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KIMAP Library

  • KIMAP
  • FetchJob
Classes | Signals | Public Member Functions | Protected Member Functions
KIMAP::FetchJob Class Reference

#include <fetchjob.h>

Inherits KIMAP::Job.

List of all members.

Classes

struct  FetchScope
 Used to indicate what message data should be fetched. More...

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)
QMap< qint64, MessageFlags > flags () const
bool isUidBased () const
QMap< qint64, MessagePtr > messages () const
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)
QMap< qint64, qint64 > sizes () const
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 149 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 121 of file fetchjob.cpp.

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

Definition at line 139 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 144 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 133 of file fetchjob.cpp.

ImapSet FetchJob::sequenceSet ( ) const

The messages that will be fetched.

Definition at line 109 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 127 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 102 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 115 of file fetchjob.cpp.

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

Definition at line 154 of file fetchjob.cpp.

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

Definition at line 159 of file fetchjob.cpp.


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

KIMAP Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.6.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