kioslaves/imap4
IMAP4Protocol Class Reference#include <imap4.h>
Inheritance diagram for IMAP4Protocol:
List of all members.
Detailed Description
IOSlave derived class.
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 47 of file imap4.h.
|
Public Member Functions |
| IMAP4Protocol (const QCString &pool, const QCString &app, bool isSSL) |
virtual | ~IMAP4Protocol () |
virtual void | openConnection () |
virtual void | closeConnection () |
virtual void | setHost (const QString &_host, int _port, const QString &_user, const QString &_pass) |
virtual void | get (const KURL &_url) |
virtual void | stat (const KURL &_url) |
virtual void | slave_status () |
virtual void | del (const KURL &_url, bool isFile) |
virtual void | special (const QByteArray &data) |
virtual void | listDir (const KURL &_url) |
virtual void | setSubURL (const KURL &_url) |
virtual void | dispatch (int command, const QByteArray &data) |
virtual void | mkdir (const KURL &url, int permissions) |
virtual void | put (const KURL &url, int permissions, bool overwrite, bool resume) |
virtual void | rename (const KURL &src, const KURL &dest, bool overwrite) |
virtual void | copy (const KURL &src, const KURL &dest, int permissions, bool overwrite) |
virtual void | parseRelay (const QByteArray &buffer) |
virtual void | parseRelay (ulong) |
virtual bool | parseRead (QByteArray &buffer, ulong len, ulong relay=0) |
virtual bool | parseReadLine (QByteArray &buffer, ulong relay=0) |
virtual void | parseWriteLine (const QString &) |
virtual int | outputLine (const QCString &_str, int len=-1) |
virtual void | flushOutput (QString contentEncoding=QString::null) |
Protected Member Functions |
bool | assureBox (const QString &aBox, bool readonly) |
ssize_t | myRead (void *data, ssize_t len) |
enum IMAP_TYPE | parseURL (const KURL &_url, QString &_box, QString &_section, QString &_type, QString &_uid, QString &_validity, QString &_hierarchyDelimiter, QString &_info, bool cache=false) |
QString | getMimeType (enum IMAP_TYPE) |
bool | makeLogin () |
void | outputLineStr (const QString &_str) |
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) |
void | specialACLCommand (int command, QDataStream &stream) |
void | specialAnnotateMoreCommand (int command, QDataStream &stream) |
void | specialQuotaCommand (int command, QDataStream &stream) |
void | specialSearchCommand (QDataStream &) |
Member Function Documentation
void IMAP4Protocol::get |
( |
const KURL & |
_url |
) |
[virtual] |
get a message or part of a message the data is normally send 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 199 of file imap4.cc.
void IMAP4Protocol::stat |
( |
const KURL & |
_url |
) |
[virtual] |
stat a mailbox, message, attachment
Definition at line 1719 of file imap4.cc.
void IMAP4Protocol::del |
( |
const KURL & |
_url, |
|
|
bool |
isFile | |
|
) |
| | [virtual] |
void IMAP4Protocol::special |
( |
const QByteArray & |
data |
) |
[virtual] |
Capabilites, NOOP, (Un)subscribe, Change status, Change ACL.
Definition at line 1225 of file imap4.cc.
void IMAP4Protocol::listDir |
( |
const KURL & |
_url |
) |
[virtual] |
list a directory/mailbox
Definition at line 411 of file imap4.cc.
void IMAP4Protocol::mkdir |
( |
const KURL & |
url, |
|
|
int |
permissions | |
|
) |
| | [virtual] |
create a mailbox
Definition at line 925 of file imap4.cc.
void IMAP4Protocol::parseRelay |
( |
const QByteArray & |
buffer |
) |
[virtual] |
reimplement the parser relay hook to send the fetched data directly to an upper level
Reimplemented from imapParser.
Definition at line 655 of file imap4.cc.
void IMAP4Protocol::parseRelay |
( |
ulong |
|
) |
[virtual] |
reimplement the parser relay hook to announce the fetched data directly to an upper level
Reimplemented from imapParser.
Definition at line 675 of file imap4.cc.
bool IMAP4Protocol::parseRead |
( |
QByteArray & |
buffer, |
|
|
ulong |
len, |
|
|
ulong |
relay = 0 | |
|
) |
| | [virtual] |
reimplement the parser read at least len bytes
Reimplemented from imapParser.
Definition at line 682 of file imap4.cc.
bool IMAP4Protocol::parseReadLine |
( |
QByteArray & |
buffer, |
|
|
ulong |
relay = 0 | |
|
) |
| | [virtual] |
reimplement the parser read at least a line (up to CRLF)
Reimplemented from imapParser.
Definition at line 717 of file imap4.cc.
void IMAP4Protocol::parseWriteLine |
( |
const QString & |
|
) |
[virtual] |
reimplement the parser write argument to the server
Reimplemented from imapParser.
Definition at line 2089 of file imap4.cc.
int IMAP4Protocol::outputLine |
( |
const QCString & |
_str, |
|
|
int |
len = -1 | |
|
) |
| | [virtual] |
void IMAP4Protocol::flushOutput |
( |
QString |
contentEncoding = QString::null |
) |
[virtual] |
send out cached data to the application
Definition at line 2498 of file imap4.cc.
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 2339 of file imap4.cc.
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 2215 of file imap4.cc.
void IMAP4Protocol::specialACLCommand |
( |
int |
command, |
|
|
QDataStream & |
stream | |
|
) |
| | [protected] |
Send an ACL command which is identified by command .
Definition at line 1404 of file imap4.cc.
void IMAP4Protocol::specialAnnotateMoreCommand |
( |
int |
command, |
|
|
QDataStream & |
stream | |
|
) |
| | [protected] |
Send an annotation command which is identified by command .
Definition at line 1534 of file imap4.cc.
void IMAP4Protocol::specialSearchCommand |
( |
QDataStream & |
|
) |
[protected] |
Search current folder, the search string is passed as SECTION.
Definition at line 1506 of file imap4.cc.
The documentation for this class was generated from the following files:
|