tdeioslave/imap4

#include <imap4.h>

Inheritance diagram for IMAP4Protocol:
mimeIO

Public Member Functions

 IMAP4Protocol (const TQCString &pool, const TQCString &app, bool isSSL)
 
virtual void openConnection ()
 
virtual void closeConnection ()
 
virtual void setHost (const TQString &_host, int _port, const TQString &_user, const TQString &_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 TQByteArray &data)
 
virtual void listDir (const KURL &_url)
 
virtual void setSubURL (const KURL &_url)
 
virtual void dispatch (int command, const TQByteArray &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 TQByteArray &buffer)
 
virtual void parseRelay (ulong)
 
virtual bool parseRead (TQByteArray &buffer, ulong len, ulong relay=0)
 
virtual bool parseReadLine (TQByteArray &buffer, ulong relay=0)
 
virtual void parseWriteLine (const TQString &)
 
virtual int outputLine (const TQCString &_str, int len=-1)
 
virtual void flushOutput (TQString contentEncoding=TQString())
 
- Public Member Functions inherited from mimeIO
virtual int outputMimeLine (const TQCString &)
 
virtual int inputLine (TQCString &)
 
virtual int outputChar (char)
 
virtual int inputChar (char &)
 
void setCRLF (const char *)
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from mimeIO
TQCString theCRLF
 
int crlfLen
 

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 47 of file imap4.h.

Member Function Documentation

◆ del()

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

delete a mailbox

Definition at line 1083 of file imap4.cpp.

◆ doListEntry()

void IMAP4Protocol::doListEntry ( const KURL &  url,
const TQString &  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 2350 of file imap4.cpp.

◆ flushOutput()

void IMAP4Protocol::flushOutput ( TQString  contentEncoding = TQString())
virtual

send out cached data to the application

Definition at line 2633 of file imap4.cpp.

◆ get()

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 194 of file imap4.cpp.

◆ listDir()

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

list a directory/mailbox

Definition at line 406 of file imap4.cpp.

◆ mkdir()

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

create a mailbox

Definition at line 923 of file imap4.cpp.

◆ outputLine()

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

reimplement the mimeIO

Reimplemented from mimeIO.

Definition at line 2604 of file imap4.cpp.

◆ parseRead()

bool IMAP4Protocol::parseRead ( TQByteArray &  buffer,
ulong  len,
ulong  relay = 0 
)
virtual

reimplement the parser read at least len bytes

Definition at line 680 of file imap4.cpp.

◆ parseReadLine()

bool IMAP4Protocol::parseReadLine ( TQByteArray &  buffer,
ulong  relay = 0 
)
virtual

reimplement the parser

read at least a line (up to CRLF)

Definition at line 715 of file imap4.cpp.

◆ parseRelay() [1/2]

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

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

Definition at line 653 of file imap4.cpp.

◆ parseRelay() [2/2]

void IMAP4Protocol::parseRelay ( ulong  len)
virtual

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

Definition at line 673 of file imap4.cpp.

◆ parseURL()

enum IMAP_TYPE IMAP4Protocol::parseURL ( const KURL &  _url,
TQString &  _box,
TQString &  _section,
TQString &  _type,
TQString &  _uid,
TQString &  _validity,
TQString &  _hierarchyDelimiter,
TQString &  _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 2350 of file imap4.cpp.

◆ parseWriteLine()

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

reimplement the parser

write argument to the server

Definition at line 2224 of file imap4.cpp.

◆ special()

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

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

Definition at line 1224 of file imap4.cpp.

◆ specialACLCommand()

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

Send an ACL command which is identified by command.

Definition at line 1447 of file imap4.cpp.

◆ specialAnnotateMoreCommand()

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

Send an annotation command which is identified by command.

Definition at line 1656 of file imap4.cpp.

◆ specialCustomCommand()

void IMAP4Protocol::specialCustomCommand ( TQDataStream &  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 1577 of file imap4.cpp.

◆ specialSearchCommand()

void IMAP4Protocol::specialSearchCommand ( TQDataStream &  stream)
protected

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

Definition at line 1549 of file imap4.cpp.

◆ stat()

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

stat a mailbox, message, attachment

Definition at line 1842 of file imap4.cpp.


The documentation for this class was generated from the following files: