27 #include "imapparser.h"
30 #include <tdeio/tcpslavebase.h>
33 #define IMAP_BUFFER 8192
58 IMAP4Protocol ( const TQCString & pool, const TQCString & app, bool isSSL);
61 virtual void openConnection();
62 virtual void closeConnection();
64 virtual void setHost ( const TQString & _host, int _port, const TQString & _user,
65 const TQString & _pass);
72 virtual void get ( const KURL & _url);
76 virtual void stat ( const KURL & _url);
77 virtual void slave_status ();
81 virtual void del ( const KURL & _url, bool isFile);
86 virtual void special ( const TQByteArray & data);
90 virtual void listDir ( const KURL & _url);
91 virtual void setSubURL ( const KURL & _url);
92 virtual void dispatch ( int command, const TQByteArray & data);
96 virtual void mkdir ( const KURL & url, int permissions);
97 virtual void put ( const KURL & url, int permissions, bool overwrite,
99 virtual void rename ( const KURL & src, const KURL & dest, bool overwrite);
100 virtual void copy ( const KURL & src, const KURL & dest, int permissions,
106 virtual void parseRelay ( const TQByteArray & buffer);
115 virtual bool parseRead (TQByteArray &buffer,ulong len,ulong relay=0);
119 virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
126 virtual int outputLine ( const TQCString & _str, int len = -1);
129 virtual void flushOutput(TQString contentEncoding = TQString());
134 bool assureBox ( const TQString & aBox, bool readonly);
136 ssize_t myRead( void *data, ssize_t len);
146 parseURL ( const KURL & _url, TQString & _box, TQString & _section,
147 TQString & _type, TQString & _uid, TQString & _validity,
148 TQString & _hierarchyDelimiter, TQString & _info,
150 TQString getMimeType ( enum IMAP_TYPE);
154 void outputLineStr ( const TQString & _str)
158 void doListEntry ( const KURL & _url, int stretch, imapCache * cache = NULL,
159 bool withFlags = FALSE, bool withSubject = FALSE);
166 void doListEntry ( const KURL & url, const TQString & myBox,
167 const imapList & item, bool appendPath = true);
174 void specialQuotaCommand( int command, TQDataStream& stream );
186 void doListEntry ( const TQString & encodedUrl, int stretch, imapCache * cache = NULL,
187 bool withFlags = FALSE, bool withSubject = FALSE);
189 TQString myHost, myUser, myPass, myAuth, myTLS;
193 bool relayEnabled, cacheOutput, decodeContent;
194 TQByteArray outputCache;
195 TQBuffer outputBuffer;
196 TQ_ULONG outputBufferIndex;
197 TDEIO::filesize_t mProcessedSize;
199 char readBuffer[IMAP_BUFFER];
200 ssize_t readBufferLen;
202 TQDateTime mTimeOfLastNoop;
virtual void del(const KURL &_url, bool isFile) delete a mailbox
virtual void parseRelay(const TQByteArray &buffer) reimplement the parser relay hook to send the fetched data directly to an upper level
virtual void special(const TQByteArray &data) Capabilites, NOOP, (Un)subscribe, Change status, Change ACL.
virtual void listDir(const KURL &_url) list a directory/mailbox
void specialSearchCommand(TQDataStream &) Search current folder, the search string is passed as SECTION.
void specialCustomCommand(TQDataStream &) Send a custom command to the server.
virtual void mkdir(const KURL &url, int permissions) create a mailbox
void specialAnnotateMoreCommand(int command, TQDataStream &stream) Send an annotation command which is identified by command.
virtual void stat(const KURL &_url) stat a mailbox, message, attachment
virtual bool parseReadLine(TQByteArray &buffer, ulong relay=0) reimplement the parser
virtual void parseWriteLine(const TQString &) reimplement the parser
virtual void get(const KURL &_url) get a message or part of a message the data is normally sent as we get it from the server if you want...
virtual int outputLine(const TQCString &_str, int len=-1) reimplement the mimeIO
void specialACLCommand(int command, TQDataStream &stream) Send an ACL command which is identified by command.
enum IMAP_TYPE parseURL(const KURL &_url, TQString &_box, TQString &_section, TQString &_type, TQString &_uid, TQString &_validity, TQString &_hierarchyDelimiter, TQString &_info, bool cache=false) Parses the given URL The return values are set by parsing the URL and querying the server.
virtual void flushOutput(TQString contentEncoding=TQString()) send out cached data to the application
virtual bool parseRead(TQByteArray &buffer, ulong len, ulong relay=0) reimplement the parser read at least len bytes
|