00001 #ifndef _KMCONTROLIFACE
00002 #define _KMCONTROLIFACE
00003
00004
00005 #include <dcopobject.h>
00006 #include <dcopref.h>
00007 #include <kurl.h>
00008 #include <qstringlist.h>
00009
00017 class KMailIface : virtual public DCOPObject
00018 {
00019 K_DCOP
00020
00021 k_dcop:
00022 virtual void checkMail() = 0;
00023 virtual QStringList accounts() = 0;
00024 virtual void checkAccount(const QString &account) = 0;
00025 virtual void openReader() = 0;
00026 virtual int openComposer(const QString &to, const QString &cc,
00027 const QString &bcc, const QString &subject,
00028 const QString &body, int hidden,
00029 const KURL &messageFile) = 0;
00030 virtual int openComposer(const QString &to, const QString &cc,
00031 const QString &bcc, const QString &subject,
00032 const QString &body, int hidden,
00033 const KURL &messageFile,
00034 const KURL &attachURL) = 0;
00035 virtual int openComposer(const QString &to, const QString &cc,
00036 const QString &bcc, const QString &subject,
00037 const QString &body, int hidden,
00038 const KURL &messageFile,
00039 const KURL::List &attachURLs) = 0;
00040 virtual int openComposer (const QString &to, const QString &cc,
00041 const QString &bcc, const QString &subject,
00042 const QString &body, int hidden,
00043 const QString &attachName,
00044 const QCString &attachCte,
00045 const QCString &attachData,
00046 const QCString &attachType,
00047 const QCString &attachSubType,
00048 const QCString &attachParamAttr,
00049 const QString &attachParamValue,
00050 const QCString &attachContDisp) = 0;
00051 virtual int openComposer (const QString &to, const QString &cc,
00052 const QString &bcc, const QString &subject,
00053 const QString &body, int hidden,
00054 const QString &attachName,
00055 const QCString &attachCte,
00056 const QCString &attachData,
00057 const QCString &attachType,
00058 const QCString &attachSubType,
00059 const QCString &attachParamAttr,
00060 const QString &attachParamValue,
00061 const QCString &attachContDisp,
00062 const QCString &attachCharset) = 0;
00067 virtual DCOPRef openComposer(const QString &to, const QString &cc,
00068 const QString &bcc, const QString &subject,
00069 const QString &body, bool hidden) = 0;
00070
00078 virtual int sendCertificate( const QString& to,
00079 const QByteArray& certData ) = 0;
00080
00081
00082 virtual void compactAllFolders() = 0;
00083
00099 virtual int dcopAddMessage(const QString & foldername,
00100 const QString & messagefile,
00101 const QString & MsgStatusFlags = QString()) = 0;
00102 virtual int dcopAddMessage(const QString & foldername,
00103 const KURL & messagefile,
00104 const QString & MsgStatusFlags = QString()) = 0;
00105
00106 virtual QStringList folderList() const =0;
00107 virtual DCOPRef getFolder( const QString& vpath ) =0;
00108 virtual void selectFolder( QString folder ) =0;
00109 virtual bool canQueryClose() =0;
00110
00116 virtual void setDefaultTransport( const QString & transport ) =0;
00117
00118 virtual int timeOfLastMessageCountChange() const =0;
00119
00124 virtual void pauseBackgroundJobs() = 0;
00125
00129 virtual void resumeBackgroundJobs() = 0;
00130
00134 virtual void stopNetworkJobs() = 0;
00135
00139 virtual void resumeNetworkJobs() = 0;
00140
00141 k_dcop_signals:
00142 void unreadCountChanged();
00143
00144 void unreadCountChanged( const QString& folderURL, int numUnread );
00145
00146 k_dcop_hidden:
00152 virtual DCOPRef newMessage(const QString &to,
00153 const QString &cc,
00154 const QString& bcc,
00155 bool hidden,
00156 bool useFolderId,
00157 const KURL &messageFile,
00158 const KURL &attachURL) = 0;
00159
00164
00165 virtual bool showMail( Q_UINT32 serialNumber, QString messageId ) = 0;
00166
00176 virtual bool handleCommandLine( bool noArgsOpensReader ) = 0;
00177 virtual bool firstStart() = 0;
00182 virtual QString getFrom( Q_UINT32 serialNumber ) = 0;
00183 virtual QString debugScheduler() = 0;
00184 virtual QString debugSernum( Q_UINT32 serialNumber ) = 0;
00185
00204 virtual int dcopAddMessage_fastImport(const QString & foldername,
00205 const QString & messagefile,
00206 const QString & MsgStatusFlags = QString()) = 0;
00207 virtual int dcopAddMessage_fastImport(const QString & foldername,
00208 const KURL & messagefile,
00209 const QString & MsgStatusFlags = QString()) = 0;
00210
00213 virtual void dcopResetAddMessage() = 0;
00214
00215 virtual void loadProfile( const QString& path ) = 0;
00216 virtual void saveToProfile( const QString& path ) const = 0;
00217 };
00218
00219 #endif