KIMAP::IdleJob

Search for usage in LXR

#include <idlejob.h>

Signals

void mailBoxMessageFlagsChanged (KIMAP::IdleJob *job, qint64 uid)
 
void mailBoxStats (KIMAP::IdleJob *job, const QString &mailBox, int messageCount, int recentCount)
 

Public Slots

void stop ()
 

Public Member Functions

 IdleJob (Session *session)
 
QString lastMailBox () const
 
int lastMessageCount () const
 
int lastRecentCount () const
 

Protected Member Functions

void doStart () override
 
void handleResponse (const Response &response) override
 

Detailed Description

Idles the connection to the IMAP server.

This job can be run while the client has no other use for the connection, and the server will send updates about the selected mailbox.

Note that although the server may send a variety of responses while the job is running (including EXPUNGE, for example), only RECENT and EXISTS responses are actually reported by this job.

The job also processes updates in pairs - if the server sends an EXISTS update but not a RECENT one (because another client is changing the mailbox contents), this job will not report the update.

It only makes sense to run this job when the session is in the selected state.

This job requires that the server supports the IDLE capability, defined in RFC 2177.

Definition at line 47 of file idlejob.h.

Constructor & Destructor Documentation

◆ IdleJob()

IdleJob::IdleJob ( Session * session)
explicit

Definition at line 64 of file idlejob.cpp.

◆ ~IdleJob()

IdleJob::~IdleJob ( )
override

Definition at line 77 of file idlejob.cpp.

Member Function Documentation

◆ doStart()

void IdleJob::doStart ( )
overrideprotected

Definition at line 88 of file idlejob.cpp.

◆ handleResponse()

void IdleJob::handleResponse ( const Response & response)
overrideprotected

Definition at line 96 of file idlejob.cpp.

◆ lastMailBox()

QString KIMAP::IdleJob::lastMailBox ( ) const
nodiscard

The last mailbox status that was reported.

This is just the session's selected mailbox.

Definition at line 141 of file idlejob.cpp.

◆ lastMessageCount()

int KIMAP::IdleJob::lastMessageCount ( ) const
nodiscard

The last message count that was reported.

The server will send updates about the number of messages in the mailbox when that number changes. This is the last number it reported.

Returns
the last message count the server reported, or -1 if it has not reported a message count since the job started.

Definition at line 147 of file idlejob.cpp.

◆ lastRecentCount()

int KIMAP::IdleJob::lastRecentCount ( ) const
nodiscard

The last recent message count that was reported.

The server will send updates about the number of messages in the mailbox that are tagged with \Recent when that number changes. This is the last number it reported.

Returns
the last recent message count the server reported, or -1 if it has not reported a recent message count since the job started.

Definition at line 153 of file idlejob.cpp.

◆ mailBoxMessageFlagsChanged

void KIMAP::IdleJob::mailBoxMessageFlagsChanged ( KIMAP::IdleJob * job,
qint64 uid )
signal

Signals that the server has notified that the some messages flags have changed.

Parameters
jobthis object
uidUID of message that has changed
Since
4.12

◆ mailBoxStats

void KIMAP::IdleJob::mailBoxStats ( KIMAP::IdleJob * job,
const QString & mailBox,
int messageCount,
int recentCount )
signal

Signals that the server has notified that the total and recent message counts have changed.

Parameters
jobthis object
mailBoxthe selected mailbox
messageCountthe new total message count reported by the server
recentCountthe new "recent message" count reported by the server

◆ stop

void KIMAP::IdleJob::stop ( )
slot

Stops the idle job.

Definition at line 81 of file idlejob.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.