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

kioslave/imap4

Public Member Functions | Protected Member Functions | List of all members
IMAP4Protocol Class Reference

#include <imap4.h>

Inheritance diagram for IMAP4Protocol:
mimeIO

Public Member Functions

 IMAP4Protocol (const QByteArray &pool, const QByteArray &app, bool isSSL)
 
virtual void closeConnection ()
 
virtual void copy (const KUrl &src, const KUrl &dest, int permissions, KIO::JobFlags flags)
 
virtual void del (const KUrl &_url, bool isFile)
 
virtual void dispatch (int command, const QByteArray &data)
 
virtual void flushOutput (const QString &contentEncoding=QString())
 
virtual void get (const KUrl &_url)
 
virtual void listDir (const KUrl &_url)
 
virtual void mkdir (const KUrl &url, int permissions)
 
virtual void openConnection ()
 
virtual int outputLine (const QByteArray &_str, int len=-1)
 
virtual bool parseRead (QByteArray &buffer, long len, long relay=0)
 
virtual bool parseReadLine (QByteArray &buffer, long relay=0)
 
virtual void parseRelay (const QByteArray &buffer)
 
virtual void parseRelay (ulong)
 
virtual void parseWriteLine (const QString &)
 
virtual void put (const KUrl &url, int permissions, KIO::JobFlags flags)
 
virtual void rename (const KUrl &src, const KUrl &dest, KIO::JobFlags flags)
 
virtual void setHost (const QString &_host, quint16 _port, const QString &_user, const QString &_pass)
 
virtual void setSubURL (const KUrl &_url)
 
virtual void slave_status ()
 
virtual void special (const QByteArray &data)
 
virtual void stat (const KUrl &_url)
 
- Public Member Functions inherited from imapParser
bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const QString &aFQDN, const QString &aAuth, bool isSSL, QString &resultInfo)
 
bool clientLogin (const QString &aUser, const QString &aPass, QString &resultInfo)
 
CommandPtr doCommand (CommandPtr aCmd)
 
const QByteArray & getContinuation ()
 
const QString getCurrentBox ()
 
imapCache * getLastHandled ()
 
const QStringList & getResults ()
 
const imapInfo & getSelected ()
 
enum IMAP_STATE getState ()
 
const imapInfo & getStatus ()
 
bool hasCapability (const QString &)
 
QString namespaceForBox (const QString &box)
 
void parseAcl (parseString &result)
 
const mailAddress & parseAddress (parseString &inWords, mailAddress &buffer)
 
void parseAddressList (parseString &inWords, QList< mailAddress * > &list)
 
void parseAnnotation (parseString &result)
 
void parseBody (parseString &inWords)
 
mimeHeader * parseBodyStructure (parseString &inWords, QString &section, mimeHeader *inHeader=0)
 
void parseCapability (parseString &result)
 
void parseCustom (parseString &result)
 
void parseDelegate (parseString &result)
 
QHash< QByteArray, QString > parseDisposition (parseString &inWords)
 
mailHeader * parseEnvelope (parseString &inWords)
 
void parseExists (ulong value, parseString &result)
 
void parseExpunge (ulong value, parseString &result)
 
void parseFetch (ulong value, parseString &inWords)
 
void parseFlags (parseString &result)
 
void parseList (parseString &result)
 
void parseListRights (parseString &result)
 
QByteArray parseLiteral (parseString &inWords, bool relay=false, bool stopAtBracket=false)
 
int parseLoop ()
 
void parseLsub (parseString &result)
 
void parseMyRights (parseString &result)
 
void parseNamespace (parseString &result)
 
void parseOtherUser (parseString &result)
 
void parseOutOfOffice (parseString &result)
 
QHash< QByteArray, QString > parseParameters (parseString &inWords)
 
void parseQuota (parseString &result)
 
void parseQuotaRoot (parseString &result)
 
virtual bool parseRead (QByteArray &buffer, long len, long relay=0)
 
virtual bool parseReadLine (QByteArray &buffer, long relay=0)
 
void parseRecent (ulong value, parseString &result)
 
virtual void parseRelay (const QByteArray &buffer)
 
virtual void parseRelay (ulong)
 
void parseResult (QByteArray &result, parseString &rest, const QString &command=QString())
 
void parseSearch (parseString &result)
 
void parseSentence (parseString &inWords)
 
mimeHeader * parseSimplePart (parseString &inWords, QString &section, mimeHeader *localPart=0)
 
void parseStatus (parseString &result)
 
void parseUntagged (parseString &result)
 
virtual void parseWriteLine (const QString &)
 
void removeCapability (const QString &cap)
 
CommandPtr sendCommand (CommandPtr aCmd)
 
void setState (enum IMAP_STATE state)
 
- Public Member Functions inherited from mimeIO
virtual int inputChar (char &)
 
virtual int inputLine (QByteArray &)
 
virtual int outputChar (char)
 
virtual int outputMimeLine (const QByteArray &)
 

Protected Member Functions

bool assureBox (const QString &aBox, bool readonly)
 
void doListEntry (const KUrl &_url, int stretch, imapCache *cache=NULL, bool withFlags=false, bool withSubject=false)
 
void doListEntry (const KUrl &url, const QString &myBox, const imapList &item, bool appendPath=true)
 
QString getMimeType (enum IMAP_TYPE)
 
bool makeLogin ()
 
ssize_t myRead (void *data, ssize_t len)
 
void outputLineStr (const QString &_str)
 
enum IMAP_TYPE parseURL (const KUrl &_url, QString &_box, QString &_section, QString &_type, QString &_uid, QString &_validity, QString &_hierarchyDelimiter, QString &_info, bool cache=false)
 
void specialACLCommand (int command, QDataStream &stream)
 
void specialAnnotateMoreCommand (int command, QDataStream &stream)
 
void specialCustomCommand (QDataStream &)
 
void specialQuotaCommand (int command, QDataStream &stream)
 
void specialSearchCommand (QDataStream &)
 

Additional Inherited Members

- Public Types inherited from imapParser
enum  IMAP_STATE { ISTATE_NO, ISTATE_CONNECT, ISTATE_LOGIN, ISTATE_SELECT }
 
- Static Public Member Functions inherited from imapParser
static bool parseOneNumber (parseString &inWords, ulong &num)
 
static QByteArray parseOneWord (parseString &inWords, bool stopAtBracket=false)
 
static void parseURL (const KUrl &_url, QString &_box, QString &_section, QString &_type, QString &_uid, QString &_validity, QString &_info)
 
static void skipWS (parseString &inWords)
 
- Protected Attributes inherited from imapParser
ulong commandCounter
 
QList< CommandPtr > completeQueue
 
QByteArray continuation
 
QString currentBox
 
enum IMAP_STATE currentState
 
QStringList imapCapabilities
 
QStringList imapNamespaces
 
imapCache * lastHandled
 
QStringList lastResults
 
imapInfo lastStatus
 
QList< imapList > listResponses
 
QMap< QString, QString > namespaceToDelimiter
 
QString seenUid
 
imapInfo selectInfo
 
QList< CommandPtr > sentQueue
 
QStringList unhandled
 
- Protected Attributes inherited from mimeIO
int crlfLen
 
QByteArray theCRLF
 

Detailed Description

IOSlave derived class.

Note
References:
  • RFC 2060 - Internet Message Access Protocol - Version 4rev1 - December 1996
  • RFC 2192 - IMAP URL Scheme - September 1997
  • RFC 1731 - IMAP Authentication Mechanisms - December 1994 (Discusses KERBEROSv4, GSSAPI, and S/Key)
  • RFC 2195 - IMAP/POP AUTHorize Extension for Simple Challenge/Response
    • September 1997 (CRAM-MD5 authentication method)
  • RFC 2104 - HMAC: Keyed-Hashing for Message Authentication - February 1997
  • RFC 2086 - IMAP4 ACL extension - January 1997
  • http://www.ietf.org/internet-drafts/draft-daboo-imap-annotatemore-05.txt IMAP ANNOTATEMORE draft - April 2004.

Supported URLs:

imap://server/
imap://user:pass@server/
imap://user;AUTH=method:pass@server/
imap://server/folder/
 * 

These URLs cause the following actions (in order):

  • Prompt for user/pass, list all folders in home directory
  • Uses LOGIN to log in
  • Uses AUTHENTICATE to log in
  • List messages in folder
Note
API notes: Not receiving the required write access for a folder means ERR_CANNOT_OPEN_FOR_WRITING. ERR_DOES_NOT_EXIST is reserved for folders.

Definition at line 49 of file imap4.h.

Member Function Documentation

void IMAP4Protocol::del ( const KUrl &  _url,
bool  isFile 
)
virtual

delete a mailbox

Definition at line 1038 of file imap4.cpp.

void IMAP4Protocol::doListEntry ( const KUrl &  url,
const QString &  myBox,
const imapList &  item,
bool  appendPath = true 
)
protected

Send a list entry (folder) to the application If appendPath is true the foldername will be appended to the path of url.

Definition at line 2193 of file imap4.cpp.

void IMAP4Protocol::flushOutput ( const QString &  contentEncoding = QString())
virtual

send out cached data to the application

Definition at line 2429 of file imap4.cpp.

void IMAP4Protocol::get ( const KUrl &  _url)
virtual

get a message or part of a message the data is normally sent as we get it from the server if you want the slave to decode the content (e.g.

for attachments) then append an additional INFO=DECODE to the URL

Definition at line 186 of file imap4.cpp.

void IMAP4Protocol::listDir ( const KUrl &  _url)
virtual

list a directory/mailbox

Definition at line 400 of file imap4.cpp.

void IMAP4Protocol::mkdir ( const KUrl &  url,
int  permissions 
)
virtual

create a mailbox

Definition at line 896 of file imap4.cpp.

int IMAP4Protocol::outputLine ( const QByteArray &  _str,
int  len = -1 
)
virtual

reimplement the mimeIO

Reimplemented from mimeIO.

Definition at line 2401 of file imap4.cpp.

bool IMAP4Protocol::parseRead ( QByteArray &  buffer,
long  len,
long  relay = 0 
)
virtual

reimplement the parser read at least len bytes

Definition at line 669 of file imap4.cpp.

bool IMAP4Protocol::parseReadLine ( QByteArray &  buffer,
long  relay = 0 
)
virtual

reimplement the parser

read at least a line (up to CRLF)

Definition at line 702 of file imap4.cpp.

void IMAP4Protocol::parseRelay ( const QByteArray &  buffer)
virtual

reimplement the parser relay hook to send the fetched data directly to an upper level

Definition at line 643 of file imap4.cpp.

void IMAP4Protocol::parseRelay ( ulong  len)
virtual

reimplement the parser relay hook to announce the fetched data directly to an upper level

Definition at line 662 of file imap4.cpp.

enum IMAP_TYPE IMAP4Protocol::parseURL ( const KUrl &  _url,
QString &  _box,
QString &  _section,
QString &  _type,
QString &  _uid,
QString &  _validity,
QString &  _hierarchyDelimiter,
QString &  _info,
bool  cache = false 
)
protected

Parses the given URL The return values are set by parsing the URL and querying the server.

If you set caching to true the server is not queried but the type is always set to ITYPE_DIR_AND_BOX

Definition at line 2289 of file imap4.cpp.

void IMAP4Protocol::parseWriteLine ( const QString &  aStr)
virtual

reimplement the parser

write argument to the server

Definition at line 2091 of file imap4.cpp.

void IMAP4Protocol::special ( const QByteArray &  data)
virtual

Capabilities, NOOP, (Un)subscribe, Change status, Change ACL.

Definition at line 1177 of file imap4.cpp.

void IMAP4Protocol::specialACLCommand ( int  command,
QDataStream &  stream 
)
protected

Send an ACL command which is identified by command.

Definition at line 1397 of file imap4.cpp.

void IMAP4Protocol::specialAnnotateMoreCommand ( int  command,
QDataStream &  stream 
)
protected

Send an annotation command which is identified by command.

Definition at line 1591 of file imap4.cpp.

void IMAP4Protocol::specialCustomCommand ( QDataStream &  stream)
protected

Send a custom command to the server.

In 'normal' mode we send the command with all information in one go and retrieve the result.

In 'extended' mode we send a first header and push the data of the request in streaming mode.

Definition at line 1517 of file imap4.cpp.

void IMAP4Protocol::specialSearchCommand ( QDataStream &  stream)
protected

Search current folder, the search string is passed as SECTION.

Definition at line 1489 of file imap4.cpp.

void IMAP4Protocol::stat ( const KUrl &  _url)
virtual

stat a mailbox, message, attachment

Definition at line 1762 of file imap4.cpp.


The documentation for this class was generated from the following files:
  • imap4.h
  • imap4.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:25:28 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kioslave/imap4

Skip menu "kioslave/imap4"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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