00001
00005 #ifndef __MAIL_H
00006 #define __MAIL_H
00007
00008 #include "INet.h"
00009 #include "Base64.h"
00010 #include "Progress.h"
00011 #include "GVariant.h"
00012
00013 #ifndef GPL_COMPATIBLE
00014 #define GPL_COMPATIBLE 0
00015 #endif
00016
00017
00018 #define MAX_LINE_SIZE 1024
00019 #define MAX_NAME_SIZE 64
00020 #define EMAIL_LINE_SIZE 76
00021
00022 #define IsDigit(c) ((c) >= '0' AND (c) <= '9')
00023
00024
00025 #define CONTENT_NONE 0
00026 #define CONTENT_BASE64 1
00027 #define CONTENT_QUOTED_PRINTABLE 2
00028 #define CONTENT_OCTET_STREAM 3
00029
00030
00031 #define MAIL_SEND_COLOUR Rgb24(0, 0, 0xff)
00032 #define MAIL_RECEIVE_COLOUR Rgb24(0, 0x8f, 0)
00033 #define MAIL_ERROR_COLOUR Rgb24(0xff, 0, 0)
00034 #define MAIL_WARNING_COLOUR Rgb24(0xff, 0x7f, 0)
00035 #define MAIL_INFO_COLOUR Rgb24(0, 0, 0)
00036
00037
00038 extern void TokeniseStrList(char *Str, List<char> &Output, char *Delim);
00039 extern char ConvHexToBin(char c);
00040 #define ConvBinToHex(i) (((i)<10)?'0'+(i):'A'+(i)-10)
00041 extern void DecodeAddrName(char *Start, GAutoString &Name, GAutoString &Addr, char *DefaultDomain);
00042 extern char *DecodeRfc2047(char *Str);
00043 extern char *EncodeRfc2047(char *Str, char *CodePage, List<char> *CharsetPrefs, int LineLength = 0);
00044 extern char *DecodeBase64Str(char *Str, int Len = -1);
00045 extern char *DecodeQuotedPrintableStr(char *Str, int Len = -1);
00046 extern bool Is8Bit(char *Text);
00047 extern int MaxLineLen(char *Text);
00048 extern char *EncodeImapString(char *s);
00049 extern char *DecodeImapString(char *s);
00050
00051
00052 class MailProtocol;
00053
00054 struct MailProtocolError
00055 {
00056 int Code;
00057 char *Msg;
00058
00059 MailProtocolError()
00060 {
00061 Code = 0;
00062 Msg = 0;
00063 }
00064
00065 ~MailProtocolError()
00066 {
00067 DeleteArray(Msg);
00068 }
00069 };
00070
00071 class MailProtocolProgress
00072 {
00073 public:
00074 int Start;
00075 int Value;
00076 int Range;
00077
00078 MailProtocolProgress()
00079 {
00080 Empty();
00081 }
00082
00083 void Empty()
00084 {
00085 Start = 0;
00086 Value = 0;
00087 Range = 0;
00088 }
00089 };
00090
00091 class LogEntry
00092 {
00093 public:
00094 char *Text;
00095 COLOUR c;
00096
00097 LogEntry(char *t, int len, COLOUR col)
00098 {
00099 c = col;
00100 Text = 0;
00101
00102 if (t)
00103 {
00104 char *n = strnchr(t, '\r', len);
00105 if (n)
00106 {
00107 Text = NewStr(t, n-t);
00108 }
00109 else
00110 {
00111 Text = NewStr(t, len);
00112 }
00113 }
00114 }
00115
00116 ~LogEntry()
00117 {
00118 DeleteArray(Text);
00119 }
00120 };
00121
00123 class FileDescriptor : public GBase
00124 {
00125 protected:
00126
00127 int64 Size;
00128 char *MimeType;
00129 char *ContentId;
00130
00131
00132 GFile File;
00133 GStreamI *Embeded;
00134 bool OwnEmbeded;
00135 int64 Offset;
00136 GSemaphore *Lock;
00137
00138
00139 uchar *Data;
00140
00141 public:
00142 FileDescriptor(GStreamI *embed, int64 Offset, int64 Size, char *Name);
00143 FileDescriptor(char *name);
00144 FileDescriptor(char *data, int64 len);
00145 FileDescriptor();
00146 ~FileDescriptor();
00147
00148 void SetLock(GSemaphore *l);
00149 GSemaphore *GetLock();
00150 void SetOwnEmbeded(bool i);
00151
00152
00153 GStreamI *GotoObject();
00154 uchar *GetData();
00155 int Sizeof();
00156 char *GetMimeType() { return MimeType; }
00157 void SetMimeType(char *s) { DeleteArray(MimeType); MimeType = NewStr(s); }
00158 char *GetContentId() { return ContentId; }
00159 void SetContentId(char *s) { DeleteArray(ContentId); ContentId = NewStr(s); }
00160
00161
00162 bool Decode(char *ContentType,
00163 char *ContentTransferEncoding,
00164 char *MimeData,
00165 int MimeDataLength);
00166 };
00167
00168 #define MAIL_ADDR_TO 0
00169 #define MAIL_ADDR_CC 1
00170 #define MAIL_ADDR_BCC 2
00171 #define MAIL_ADDR_FROM 3
00172
00174 class AddressDescriptor : public GBase
00175 {
00176 public:
00177 uint8 Status;
00178 uchar CC;
00179 char *Name;
00180 char *Addr;
00181
00182 void *Data;
00183
00184 AddressDescriptor(AddressDescriptor *Copy = 0);
00185 ~AddressDescriptor();
00186 void _Delete();
00187
00188 void Print(char *Str);
00189 int Sizeof()
00190 {
00191 return SizeofStr(Name) +
00192 SizeofStr(Addr);
00193 }
00194
00195 bool Serialize(GFile &f, bool Write)
00196 {
00197 bool Status = true;
00198 if (Write)
00199 {
00200 WriteStr(f, Name);
00201 WriteStr(f, Addr);
00202 }
00203 else
00204 {
00205 DeleteArray(Name);
00206 Name = ReadStr(f PassDebugArgs);
00207 DeleteArray(Addr);
00208 Addr = ReadStr(f PassDebugArgs);
00209 }
00210 return Status;
00211 }
00212 };
00213
00214
00215
00216
00217
00218 #define MAIL_PRIORITY_HIGH 1
00219 #define MAIL_PRIORITY_NORMAL 3 // ???
00220 #define MAIL_PRIORITY_LOW 5
00221
00222 class MailMessage
00223 {
00224 char* Text;
00225 char* TextCharset;
00226
00227 char* Html;
00228 char* HtmlCharset;
00229
00230 public:
00231 List<AddressDescriptor> To;
00232 AddressDescriptor *From;
00233 AddressDescriptor *Reply;
00234 GAutoString Subject;
00235 GAutoString MessageID;
00236 GAutoString FwdMsgId;
00237 GAutoString BounceMsgId;
00238 List<FileDescriptor> FileDesc;
00239 char* InternetHeader;
00240 char Priority;
00241 int MarkColour;
00242 uint8 DispositionNotificationTo;
00243 GAutoString References;
00244
00245
00246 void *Private;
00247
00248
00249 MailMessage();
00250 virtual ~MailMessage();
00251 void Empty();
00252
00253 virtual char *GetBody();
00254 virtual bool SetBody(char *Txt, int Bytes = -1, bool Copy = true, char *Cs = 0);
00255 virtual char *GetBodyCharset();
00256 virtual bool SetBodyCharset(char *Cs, bool Copy = true);
00257
00258 virtual char *GetHtml();
00259 virtual bool SetHtml(char *Txt, int Bytes = -1, bool Copy = true, char *Cs = 0);
00260 virtual char *GetHtmlCharset();
00261 virtual bool SetHtmlCharset(char *Cs, bool Copy = true);
00262
00263
00264 GStringPipe *Raw;
00265
00266
00267 bool Encode (GStreamI &Out, GStream *HeadersSink, MailProtocol *Protocol, bool Mime = true);
00268 bool EncodeHeaders (GStreamI &Out, MailProtocol *Protocol, bool Mime = true);
00269 bool EncodeBody (GStreamI &Out, MailProtocol *Protocol, bool Mime = true);
00270
00271
00272 int EncodeText (GStreamI &Out, GStreamI &In);
00273 int EncodeQuotedPrintable (GStreamI &Out, GStreamI &In);
00274 int EncodeBase64 (GStreamI &Out, GStreamI &In);
00275 };
00276
00278 class MailProtocol
00279 {
00280 protected:
00281 char Buffer[4<<10];
00282 GSemaphore SocketLock;
00283 GAutoPtr<GSocketI> Socket;
00284
00285 bool Error(char *file, int line, char *msg, ...);
00286 bool Read();
00287 bool Write(char *Buf = NULL, bool Log = false);
00288
00289 virtual void OnUserMessage(char *Str) {}
00290
00291 public:
00292
00293 GStreamI *Logger;
00294 void Log(const char *Str, COLOUR c);
00295
00296
00297 MailProtocolProgress *Items;
00298 MailProtocolProgress *Transfer;
00299
00300
00301 GAutoString ServerMsg;
00302 char *ProgramName;
00303 char *DefaultDomain;
00304 char *ExtraOutgoingHeaders;
00305 List<char> CharsetPrefs;
00306
00307
00308 MailProtocol();
00309 virtual ~MailProtocol();
00310
00311
00312
00313
00315 bool CloseSocket()
00316 {
00317 GSemaphore::Auto l(&SocketLock, _FL);
00318
00319 if (Socket)
00320 return Socket->Close();
00321
00322 return false;
00323 }
00324
00325 };
00326
00328
00329
00331 #define MAIL_USE_STARTTLS 0x01
00333 #define MAIL_USE_AUTH 0x02
00335 #define MAIL_USE_PLAIN 0x04
00337 #define MAIL_USE_LOGIN 0x08
00339 #define MAIL_USE_NTLM 0x10
00341 #define MAIL_SECURE_AUTH 0x20
00343 #define MAIL_SSL 0x40
00344
00346 class MailSink : public MailProtocol
00347 {
00348 public:
00350 virtual bool Open
00351 (
00353 GSocketI *S,
00355 char *RemoteHost,
00357 char *LocalDomain,
00359 char *UserName,
00361 char *Password,
00363 int Port,
00365 int Flags
00366 ) = 0;
00368 virtual bool Close() = 0;
00369
00370
00371
00374 virtual GStringPipe *SendStart(List<AddressDescriptor> &To, AddressDescriptor *From, MailProtocolError *Err = 0) = 0;
00375
00377 virtual bool SendEnd(GStringPipe *Sink) = 0;
00378
00379
00380 virtual bool Send(MailMessage *Msg, bool Mime) { return false; }
00381 };
00382
00383 struct ImapMailFlags
00384 {
00385 uint8 ImapAnswered : 1;
00386 uint8 ImapDeleted : 1;
00387 uint8 ImapDraft : 1;
00388 uint8 ImapFlagged : 1;
00389 uint8 ImapRecent : 1;
00390 uint8 ImapSeen : 1;
00391 uint8 ImapExpunged :1;
00392
00393 ImapMailFlags(char *init = 0)
00394 {
00395 ImapAnswered = 0;
00396 ImapDeleted = 0;
00397 ImapDraft = 0;
00398 ImapFlagged = 0;
00399 ImapRecent = 0;
00400 ImapSeen = 0;
00401 ImapExpunged = 0;
00402
00403 if (init)
00404 Set(init);
00405 }
00406
00407 char *Get()
00408 {
00409 char s[256] = "", *c = s;
00410
00411 if (ImapAnswered) c += sprintf(c, "\\answered ");
00412 if (ImapDeleted) c += sprintf(c, "\\deleted ");
00413 if (ImapDraft) c += sprintf(c, "\\draft ");
00414 if (ImapFlagged) c += sprintf(c, "\\flagged ");
00415 if (ImapRecent) c += sprintf(c, "\\recent ");
00416 if (ImapSeen) c += sprintf(c, "\\seen ");
00417
00418 if (c == s)
00419 return 0;
00420
00421 LgiAssert(c < s + sizeof(s));
00422 c--;
00423 *c = 0;
00424 return NewStr(s);
00425 }
00426
00427 void Set(char *s)
00428 {
00429 ImapAnswered = false;
00430 ImapDeleted = false;
00431 ImapDraft = false;
00432 ImapFlagged = false;
00433 ImapRecent = false;
00434 ImapSeen = false;
00435 ImapExpunged = false;
00436
00437 if (!s) s = "";
00438 while (*s)
00439 {
00440 if (*s == '/' || *s == '\\')
00441 {
00442 while (*s == '/' || *s == '\\')
00443 s++;
00444 char *e = s;
00445 while (*e && isalpha(*e))
00446 e++;
00447
00448 if (!strnicmp(s, "answered", e-s))
00449 ImapAnswered = true;
00450 else if (!strnicmp(s, "deleted", e-s))
00451 ImapDeleted = true;
00452 else if (!strnicmp(s, "draft", e-s))
00453 ImapDraft = true;
00454 else if (!strnicmp(s, "flagged", e-s))
00455 ImapFlagged = true;
00456 else if (!strnicmp(s, "recent", e-s))
00457 ImapRecent = true;
00458 else if (!strnicmp(s, "seen", e-s))
00459 ImapSeen = true;
00460
00461 s = e;
00462 }
00463 else s++;
00464 }
00465 }
00466
00467 bool operator ==(ImapMailFlags &f)
00468 {
00469 return ImapAnswered == f.ImapAnswered &&
00470 ImapDeleted == f.ImapDeleted &&
00471 ImapDraft == f.ImapDraft &&
00472 ImapFlagged == f.ImapFlagged &&
00473 ImapRecent == f.ImapRecent &&
00474 ImapSeen == f.ImapSeen &&
00475 ImapExpunged == f.ImapExpunged;
00476 }
00477
00478 bool operator !=(ImapMailFlags &f)
00479 {
00480 return !(ImapAnswered == f.ImapAnswered &&
00481 ImapDeleted == f.ImapDeleted &&
00482 ImapDraft == f.ImapDraft &&
00483 ImapFlagged == f.ImapFlagged &&
00484 ImapRecent == f.ImapRecent &&
00485 ImapSeen == f.ImapSeen &&
00486 ImapExpunged == f.ImapExpunged);
00487 }
00488 };
00489
00491 class MailTransaction
00492 {
00493 public:
00495 int Index;
00496
00498 int Flags;
00499
00500
00501 bool Status;
00502 bool Oversize;
00503
00505 GStreamI *Stream;
00506
00508 ImapMailFlags Imap;
00509
00511 void *UserData;
00512
00513 MailTransaction();
00514 ~MailTransaction();
00515 };
00516
00518 enum MailSrcStatus
00519 {
00521 DownloadAll,
00523 DownloadTop,
00525 DownloadNone,
00527 DownloadAbort
00528 };
00529
00531 typedef MailSrcStatus (*MailSrcCallback)
00532 (
00534 MailTransaction *Trans,
00536 int64 Size,
00538 int *LinesToDownload,
00540 void *Data
00541 );
00542
00544 typedef bool (*MailReceivedCallback)
00545 (
00547 MailTransaction *Trans,
00549 void *Data
00550 );
00551
00556 struct MailCallbacks
00557 {
00559 void *CallbackData;
00561 MailSrcCallback OnSrc;
00563 MailReceivedCallback OnReceive;
00564 };
00565
00567 #define MAIL_SOURCE_STARTTLS 0x01
00569 #define MAIL_SOURCE_AUTH 0x02
00571 #define MAIL_SOURCE_USE_PLAIN 0x04
00573 #define MAIL_SOURCE_USE_LOGIN 0x08
00574
00576 class MailSource : public MailProtocol
00577 {
00578 public:
00580 virtual bool Open
00581 (
00583 GSocketI *S,
00585 char *RemoteHost,
00587 int Port,
00589 char *User,
00591 char *Password,
00593 char *&Cookie,
00595 int Flags = 0) = 0;
00597 virtual bool Close() = 0;
00598
00600 virtual int GetMessages() = 0;
00602 virtual bool Receive
00603 (
00606 GArray<MailTransaction*> &Trans,
00608 MailCallbacks *Callbacks = 0
00609 ) = 0;
00611 virtual bool Delete(int Message) = 0;
00613 virtual int Sizeof(int Message) = 0;
00615 virtual bool GetSizes(GArray<int> &Sizes) { return false; }
00617 virtual bool GetUid(int Message, char *Id) = 0;
00619 virtual bool GetUidList(List<char> &Id) = 0;
00621 virtual char *GetHeaders(int Message) = 0;
00623 virtual void SetProxy(char *Server, int Port) {}
00624 };
00625
00627
00628
00630 class MailSmtp : public MailSink
00631 {
00632 protected:
00633 bool ReadReply(char *Str, GStringPipe *Pipe = 0, MailProtocolError *Err = 0);
00634 bool WriteText(char *Str);
00635
00636 public:
00637 MailSmtp();
00638 ~MailSmtp();
00639
00640 bool Open(GSocketI *S, char *RemoteHost, char *LocalDomain, char *UserName, char *Password, int Port = SMTP_PORT, int Flags = 0);
00641 bool Close();
00642
00643 bool SendToFrom(List<AddressDescriptor> &To, AddressDescriptor *From, MailProtocolError *Err = 0);
00644 GStringPipe *SendData(MailProtocolError *Err = 0);
00645
00646 GStringPipe *SendStart(List<AddressDescriptor> &To, AddressDescriptor *From, MailProtocolError *Err = 0);
00647 bool SendEnd(GStringPipe *Sink);
00648
00649 bool Send(MailMessage *Msg, bool Mime = false);
00650 };
00651
00652 class MailSendFolder : public MailSink
00653 {
00654 class MailPostFolderPrivate *d;
00655
00656 public:
00657 MailSendFolder(char *Path);
00658 ~MailSendFolder();
00659
00660 bool Open(GSocketI *S, char *RemoteHost, char *LocalDomain, char *UserName, char *Password, int Port = 0, int Flags = 0);
00661 bool Close();
00662
00663 GStringPipe *SendStart(List<AddressDescriptor> &To, AddressDescriptor *From, MailProtocolError *Err = 0);
00664 bool SendEnd(GStringPipe *Sink);
00665 };
00666
00667 class MailPop3 : public MailSource
00668 {
00669 protected:
00670 bool ReadReply();
00671 bool ReadMultiLineReply(char *&Str);
00672 int GetInt();
00673 bool MailIsEnd(char *Ptr, int Len);
00674 bool ListCmd(char *Cmd, GHashTable &Results);
00675
00676 char *End;
00677 char *Marker;
00678 int Messages;
00679
00680 public:
00681 MailPop3();
00682 ~MailPop3();
00683
00684
00685 bool Open(GSocketI *S, char *RemoteHost, int Port, char *User, char *Password, char *&Cookie, int Flags = 0);
00686 bool Close();
00687
00688
00689 int GetMessages();
00690 bool Receive(GArray<MailTransaction*> &Trans, MailCallbacks *Callbacks = 0);
00691 bool Delete(int Message);
00692 int Sizeof(int Message);
00693 bool GetSizes(GArray<int> &Sizes);
00694 bool GetUid(int Message, char *Id);
00695 bool GetUidList(List<char> &Id);
00696 char *GetHeaders(int Message);
00697 };
00698
00699 class MailReceiveFolder : public MailSource
00700 {
00701 protected:
00702 class MailReceiveFolderPrivate *d;
00703
00704 public:
00705 MailReceiveFolder(char *Path);
00706 ~MailReceiveFolder();
00707
00708
00709 bool Open(GSocketI *S, char *RemoteHost, int Port, char *User, char *Password, char *&Cookie, int Flags = 0);
00710 bool Close();
00711
00712
00713 int GetMessages();
00714 bool Receive(GArray<MailTransaction*> &Trans, MailCallbacks *Callbacks = 0);
00715 bool Delete(int Message);
00716 int Sizeof(int Message);
00717 bool GetUid(int Message, char *Id);
00718 bool GetUidList(List<char> &Id);
00719 char *GetHeaders(int Message);
00720 };
00721
00722 class MailPhp : public MailSource
00723 {
00724 protected:
00725 class MailPhpPrivate *d;
00726
00727 bool Get(GSocketI *S, char *Uri, GStream &Out, bool ChopDot);
00728
00729 public:
00730 MailPhp();
00731 ~MailPhp();
00732
00733
00734 bool Open(GSocketI *S, char *RemoteHost, int Port, char *User, char *Password, char *&Cookie, int Flags = 0);
00735 bool Close();
00736
00737
00738 int GetMessages();
00739 bool Receive(GArray<MailTransaction*> &Trans, MailCallbacks *Callbacks = 0);
00740 bool Delete(int Message);
00741 int Sizeof(int Message);
00742 bool GetSizes(GArray<int> &Sizes);
00743 bool GetUid(int Message, char *Id);
00744 bool GetUidList(List<char> &Id);
00745 char *GetHeaders(int Message);
00746 void SetProxy(char *Server, int Port);
00747 };
00748
00749 class MailImapFolder
00750 {
00751 friend class MailIMap;
00752 friend class ImapThreadPrivate;
00753
00754 char Sep;
00755 char *Path;
00756
00757 public:
00758 bool NoSelect;
00759 bool NoInferiors;
00760 bool Marked;
00761 int Exists;
00762 int Recent;
00763 int Deleted;
00764
00765
00766 MailImapFolder();
00767 virtual ~MailImapFolder();
00768
00769 char *GetPath();
00770 void SetPath(char *s);
00771 char *GetName();
00772 void SetName(char *s);
00773 void operator =(GHashTbl<char*,int> &v);
00774 };
00775
00776 class MailIMap : public MailSource, public GSemaphore
00777 {
00778 protected:
00779 class MailIMapPrivate *d;
00780
00781 char Buf[1024];
00782 List<char> Uid;
00783 GStringPipe ReadBuf;
00784 List<char> Dialog;
00785
00786 void ClearDialog();
00787 void ClearUid();
00788 bool FillUidList();
00789 bool WriteBuf(bool ObsurePass = false, const char *Buffer = 0);
00790 bool ReadResponse(int Cmd = -1, GStringPipe *Out = 0, bool Plus = false);
00791 bool Read(GStreamI *Out = 0);
00792 bool ReadLine();
00793
00794 public:
00795
00796 struct Untagged
00797 {
00798 GAutoString Cmd;
00799 GAutoString Param;
00800 int Id;
00801 };
00802
00803 typedef bool (*FetchCallback)(class MailIMap *Imap, char *Msg, GHashTbl<char*, char*> &Parts, void *UserData);
00804
00805
00806 MailIMap();
00807 ~MailIMap();
00808
00809
00810 char GetFolderSep();
00811 char *EncodePath(char *Path);
00812 char *GetCurrentPath();
00813 bool GetExpungeOnExit();
00814 void SetExpungeOnExit(bool b);
00815 bool ServerOption(char *Opt);
00816 bool IsOnline();
00817
00818
00819 bool Open(GSocketI *S, char *RemoteHost, int Port, char *User, char *Password, char *&Cookie, int Flags = 0);
00820 bool Close();
00821 bool GetCapabilities(GArray<char*> &s);
00822
00823
00824 bool Receive(GArray<MailTransaction*> &Trans, MailCallbacks *Callbacks = 0);
00825 bool GetParts(int Message, GStreamI &Out, char *Parts, char **Flags = 0);
00826 int GetMessages();
00827 bool Delete(int Message);
00828 int Sizeof(int Message);
00829 bool GetUid(int Message, char *Id);
00830 bool GetUidList(List<char> &Id);
00831 char *GetHeaders(int Message);
00832 char *SequenceToString(GArray<int> *Seq);
00833
00834
00835
00837 bool Fetch
00838 (
00840 bool ByUid,
00842 char *Seq,
00844 char *Parts,
00846 FetchCallback Callback,
00848 void *UserData,
00850 GStreamI *RawCopy = 0
00851 );
00852
00854 bool Append
00855 (
00857 char *Folder,
00859 ImapMailFlags *Flags,
00861 char *Msg,
00863 GAutoString &NewUid
00864 );
00865
00866 bool GetFolders(List<MailImapFolder> &Folders);
00867 bool SelectFolder(char *Path, GHashTbl<char*,int> *Values = 0);
00868 char *GetSelectedFolder();
00869 int GetMessages(char *Path);
00870 bool CreateFolder(MailImapFolder *f);
00871 bool DeleteFolder(char *Path);
00872 bool RenameFolder(char *From, char *To);
00873 bool SetFolderFlags(MailImapFolder *f);
00874
00876 bool ExpungeFolder();
00877
00878
00879 bool CopyByUid(GArray<char*> &InUids, char *DestFolder);
00880 bool SetFlagsByUid(GArray<char*> &Uids, char *Flags);
00881
00884 bool StartIdle();
00885 bool OnIdle(int Timeout, GArray<Untagged> &Resp);
00886 bool FinishIdle();
00887 bool Poll(int *Recent = 0, GArray<GAutoString> *New = 0);
00888 bool Status(char *Path, int *Recent);
00889 bool Search(bool Uids, GArray<GAutoString> &SeqNumbers, char *Filter);
00890
00891
00892 static bool Http(GSocketI *S,
00893 GAutoString *OutHeaders,
00894 GAutoString *OutBody,
00895 GAutoString *OutMsg,
00896 char *InMethod,
00897 char *InUri,
00898 char *InHeaders,
00899 char *InBody);
00900 };
00901
00902 #endif