Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1:/tmp/cvs-serv14820/include
Modified Files:
ASMailFolder.h Composer.h FolderView.h MApplication.h MEvent.h
MFCache.h MFPrivate.h MInterface.mid MailFolderCC.h
MessageCC.h MessageEditor.h MessageView.h MsgCmdProc.h
Log Message:
Header dependency cleanup, last few well aimed hits
Index: ASMailFolder.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/ASMailFolder.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -b -u -2 -r1.59 -r1.60
--- ASMailFolder.h 18 Sep 2003 16:30:38 -0000 1.59
+++ ASMailFolder.h 19 Sep 2003 13:31:18 -0000 1.60
@@ -29,4 +29,11 @@
#include "Message.h"
+class ASMailFolderResult;
+class ASMailFolderResultImpl;
+class ASMailFolderResultInt;
+class ASMailFolderResultUIdType;
+class ASMailFolderResultMessage;
+class ASMailFolderResultFolderExists;
+
/**
ASMailFolder abstract base class, represents anything containig mails.
@@ -65,4 +72,5 @@
operations. */
//@{
+
/** For the Result class, we need one identifier for every
asynchronous operation to identify what happened.
@@ -88,177 +96,11 @@
Op_MarkUnread
};
- /** A structure containing the return values from an operation.
- This will get passed in an MEvent to notify other parts of the
- application that an operation has finished.
- */
- class Result : public MObjectRC
- {
- public:
- /// Returns the user data.
- virtual UserData GetUserData(void) const = 0;
- /** Returns a pointer to the ASMailFolder from which this
- event originated.
- */
- /// Returns the ticket for this operation.
- virtual Ticket GetTicket(void) const = 0;
- /// Returns the ASMailFolder issuing this result.
- virtual ASMailFolder *GetFolder(void) const = 0;
- /// Returns an OperationId to tell what happened.
- virtual OperationId GetOperation(void) const = 0;
- /// Returns the list of message uids affected by the operation.
- virtual UIdArray * GetSequence(void) const = 0;
- };
-
- /** Common code shared by all class Result implementations. */
- class ResultImpl : public Result
- {
- public:
- virtual UserData GetUserData(void) const { return m_UserData; }
- virtual Ticket GetTicket(void) const { return m_Ticket; }
- virtual OperationId GetOperation(void) const { return m_Id; }
- virtual ASMailFolder *GetFolder(void) const { return m_Mf; }
- virtual UIdArray * GetSequence(void) const { return m_Seq; }
- protected:
- ResultImpl(ASMailFolder *mf,
- Ticket t,
- OperationId id,
- UIdArray * mc,
- UserData ud)
- {
- m_Id = id;
- m_Ticket = t;
- m_UserData = ud;
- m_Seq = mc;
-
- m_Mf = mf;
- if ( m_Mf )
- m_Mf->IncRef();
- }
-
- virtual ~ResultImpl();
-
- private:
- OperationId m_Id;
- ASMailFolder *m_Mf;
- Ticket m_Ticket;
- UserData m_UserData;
- UIdArray * m_Seq;
-
- MOBJECT_DEBUG(ASMailFolder::ResultImpl)
- };
- /** Holds the result from an operation which can be expressed as an
- integer value. Used for all boolean success values.
- */
- class ResultInt : public ResultImpl
- {
- public:
- int GetValue(void) const { return m_Value; }
- static ResultInt *Create(ASMailFolder *mf,
- Ticket t,
- OperationId id,
- UIdArray * mc,
- int value,
- UserData ud)
- { return new ResultInt(mf, t, id, mc, value, ud); }
- protected:
- ResultInt(ASMailFolder *mf,
- Ticket t,
- OperationId id,
- UIdArray * mc,
- int value,
- UserData ud)
- : ResultImpl(mf, t, id, mc, ud)
- { m_Value = value; }
- private:
- int m_Value;
- };
- /** Holds the result from an operation which can be expressed as an
- UIdType value. Used for all boolean success values.
- */
- class ResultUIdType : public ResultImpl
- {
- public:
- UIdType GetValue(void) const { return m_Value; }
- static ResultUIdType *Create(ASMailFolder *mf,
- Ticket t,
- OperationId id,
- UIdArray * mc,
- UIdType value,
- UserData ud)
- { return new ResultUIdType(mf, t, id, mc, value, ud); }
- protected:
- ResultUIdType(ASMailFolder *mf,
- Ticket t,
- OperationId id,
- UIdArray * mc,
- int value,
- UserData ud)
- : ResultImpl(mf, t, id, mc, ud)
- { m_Value = value; }
- private:
- UIdType m_Value;
- };
- /** Holds the result from a GetMessage() and returns the message pointer.
- */
- class ResultMessage : public ResultImpl
- {
- public:
- static ResultMessage *Create(ASMailFolder *mf,
- Ticket t,
- UIdArray * mc,
- Message *msg,
- UIdType uid,
- UserData ud)
- { return new ResultMessage(mf, t, mc, msg, uid, ud); }
- Message * GetMessage(void) const { return m_Message; }
- unsigned long GetUId(void) const { return m_uid; }
- protected:
- ResultMessage(ASMailFolder *mf, Ticket t,
- UIdArray * mc, Message *msg,
- UIdType uid, UserData ud)
- : ResultImpl(mf, t, Op_GetMessage, mc, ud)
- {
- m_Message = msg;
- if(m_Message) m_Message->IncRef();
- m_uid = uid;
- }
- ~ResultMessage() { if(m_Message) m_Message->DecRef(); }
- private:
- Message *m_Message;
- UIdType m_uid;
- };
- /** Holds a single folder name found in a ListFolders() call.
- */
- class ResultFolderExists : public ResultImpl
- {
- public:
- static ResultFolderExists *Create(ASMailFolder *mf,
- Ticket t,
- const String &name,
- char delimiter,
- long attrib,
- UserData ud)
- { return new ResultFolderExists(mf, t, name, delimiter, attrib, ud); }
-
- String GetName(void) const { return m_Name; }
- char GetDelimiter(void) const { return m_Delim; }
- long GetAttributes(void) const { return m_Attrib; }
-
- protected:
- ResultFolderExists(ASMailFolder *mf, Ticket t,
- const String &name, char delimiter, long attrib,
- UserData ud)
- : ResultImpl(mf, t, Op_ListFolders, NULL, ud)
- {
- m_Name = name;
- m_Delim = delimiter;
- m_Attrib = attrib;
- }
- private:
- String m_Name;
- long m_Attrib;
- char m_Delim;
- };
+ typedef ASMailFolderResult Result;
+ typedef ASMailFolderResultImpl ResultImpl;
+ typedef ASMailFolderResultInt ResultInt;
+ typedef ASMailFolderResultUIdType ResultUIdType;
+ typedef ASMailFolderResultMessage ResultMessage;
+ typedef ASMailFolderResultFolderExists ResultFolderExists;
//@}
@@ -531,4 +373,177 @@
//@}
+};
+
+ /** A structure containing the return values from an operation.
+ This will get passed in an MEvent to notify other parts of the
+ application that an operation has finished.
+ */
+class ASMailFolderResult : public MObjectRC
+{
+public:
+ /// Returns the user data.
+ virtual UserData GetUserData(void) const = 0;
+ /** Returns a pointer to the ASMailFolder from which this
+ event originated.
+ */
+ /// Returns the ticket for this operation.
+ virtual Ticket GetTicket(void) const = 0;
+ /// Returns the ASMailFolder issuing this result.
+ virtual ASMailFolder *GetFolder(void) const = 0;
+ /// Returns an ASMailFolder::OperationId to tell what happened.
+ virtual ASMailFolder::OperationId GetOperation(void) const = 0;
+ /// Returns the list of message uids affected by the operation.
+ virtual UIdArray * GetSequence(void) const = 0;
+};
+
+/** Common code shared by all class Result implementations. */
+class ASMailFolderResultImpl : public ASMailFolder::Result
+{
+public:
+ virtual UserData GetUserData(void) const { return m_UserData; }
+ virtual Ticket GetTicket(void) const { return m_Ticket; }
+ virtual ASMailFolder::OperationId GetOperation(void) const { return m_Id; }
+ virtual ASMailFolder *GetFolder(void) const { return m_Mf; }
+ virtual UIdArray * GetSequence(void) const { return m_Seq; }
+protected:
+ ASMailFolderResultImpl(ASMailFolder *mf,
+ Ticket t,
+ ASMailFolder::ASMailFolder::OperationId id,
+ UIdArray * mc,
+ UserData ud)
+ {
+ m_Id = id;
+ m_Ticket = t;
+ m_UserData = ud;
+ m_Seq = mc;
+
+ m_Mf = mf;
+ if ( m_Mf )
+ m_Mf->IncRef();
+ }
+
+ virtual ~ASMailFolderResultImpl();
+
+private:
+ ASMailFolder::OperationId m_Id;
+ ASMailFolder *m_Mf;
+ Ticket m_Ticket;
+ UserData m_UserData;
+ UIdArray * m_Seq;
+
+ MOBJECT_DEBUG(ASMailFolder::ResultImpl)
+};
+/** Holds the result from an operation which can be expressed as an
+ integer value. Used for all boolean success values.
+*/
+class ASMailFolderResultInt : public ASMailFolder::ResultImpl
+{
+public:
+ int GetValue(void) const { return m_Value; }
+ static ASMailFolder::ResultInt *Create(ASMailFolder *mf,
+ Ticket t,
+ ASMailFolder::OperationId id,
+ UIdArray * mc,
+ int value,
+ UserData ud)
+ { return new ASMailFolder::ResultInt(mf, t, id, mc, value, ud); }
+protected:
+ ASMailFolderResultInt(ASMailFolder *mf,
+ Ticket t,
+ ASMailFolder::OperationId id,
+ UIdArray * mc,
+ int value,
+ UserData ud)
+ : ASMailFolder::ResultImpl(mf, t, id, mc, ud)
+ { m_Value = value; }
+private:
+ int m_Value;
+};
+/** Holds the result from an operation which can be expressed as an
+ UIdType value. Used for all boolean success values.
+*/
+class ASMailFolderResultUIdType : public ASMailFolder::ResultImpl
+{
+public:
+ UIdType GetValue(void) const { return m_Value; }
+ static ASMailFolder::ResultUIdType *Create(ASMailFolder *mf,
+ Ticket t,
+ ASMailFolder::OperationId id,
+ UIdArray * mc,
+ UIdType value,
+ UserData ud)
+ { return new ASMailFolder::ResultUIdType(mf, t, id, mc, value, ud); }
+protected:
+ ASMailFolderResultUIdType(ASMailFolder *mf,
+ Ticket t,
+ ASMailFolder::OperationId id,
+ UIdArray * mc,
+ int value,
+ UserData ud)
+ : ASMailFolder::ResultImpl(mf, t, id, mc, ud)
+ { m_Value = value; }
+private:
+ UIdType m_Value;
+};
+/** Holds the result from a GetMessage() and returns the message pointer.
+*/
+class ASMailFolderResultMessage : public ASMailFolder::ResultImpl
+{
+public:
+ static ASMailFolder::ResultMessage *Create(ASMailFolder *mf,
+ Ticket t,
+ UIdArray * mc,
+ Message *msg,
+ UIdType uid,
+ UserData ud)
+ { return new ASMailFolder::ResultMessage(mf, t, mc, msg, uid, ud); }
+ Message * GetMessage(void) const { return m_Message; }
+ unsigned long GetUId(void) const { return m_uid; }
+protected:
+ ASMailFolderResultMessage(ASMailFolder *mf, Ticket t,
+ UIdArray * mc, Message *msg,
+ UIdType uid, UserData ud)
+ : ASMailFolder::ResultImpl(mf, t, ASMailFolder::Op_GetMessage, mc, ud)
+ {
+ m_Message = msg;
+ if(m_Message) m_Message->IncRef();
+ m_uid = uid;
+ }
+ ~ASMailFolderResultMessage() { if(m_Message) m_Message->DecRef(); }
+private:
+ Message *m_Message;
+ UIdType m_uid;
+};
+/** Holds a single folder name found in a ListFolders() call.
+*/
+class ASMailFolderResultFolderExists : public ASMailFolder::ResultImpl
+{
+public:
+ static ASMailFolder::ResultFolderExists *Create(ASMailFolder *mf,
+ Ticket t,
+ const String &name,
+ char delimiter,
+ long attrib,
+ UserData ud)
+ { return new ASMailFolder::ResultFolderExists(mf, t, name, delimiter, attrib,
ud); }
+
+ String GetName(void) const { return m_Name; }
+ char GetDelimiter(void) const { return m_Delim; }
+ long GetAttributes(void) const { return m_Attrib; }
+
+protected:
+ ASMailFolderResultFolderExists(ASMailFolder *mf, Ticket t,
+ const String &name, char delimiter, long attrib,
+ UserData ud)
+ : ASMailFolder::ResultImpl(mf, t, ASMailFolder::Op_ListFolders, NULL, ud)
+ {
+ m_Name = name;
+ m_Delim = delimiter;
+ m_Attrib = attrib;
+ }
+private:
+ String m_Name;
+ long m_Attrib;
+ char m_Delim;
};
Index: Composer.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Composer.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -b -u -2 -r1.19 -r1.20
--- Composer.h 22 Aug 2003 13:03:50 -0000 1.19
+++ Composer.h 19 Sep 2003 13:31:19 -0000 1.20
@@ -28,4 +28,28 @@
// ----------------------------------------------------------------------------
+/// the composer options (i.e. values read from profile)
+struct ComposerOptions
+{
+ /// font description
+ String m_font;
+
+ /// font family and size used only if m_font is empty
+ int m_fontFamily,
+ m_fontSize;
+
+ /// composer colours
+ wxColour m_fg,
+ m_bg;
+
+ /// ctor initializes everything to some invalid values
+ ComposerOptions();
+
+ /// read the options from the given profile
+ void Read(Profile *profile);
+
+ /// get the font using either m_font or m_fontFamily/Size
+ wxFont GetFont() const;
+};
+
class Composer
{
@@ -275,27 +299,5 @@
protected:
- /// the composer options (i.e. values read from profile)
- struct Options
- {
- /// font description
- String m_font;
-
- /// font family and size used only if m_font is empty
- int m_fontFamily,
- m_fontSize;
-
- /// composer colours
- wxColour m_fg,
- m_bg;
-
- /// ctor initializes everything to some invalid values
- Options();
-
- /// read the options from the given profile
- void Read(Profile *profile);
-
- /// get the font using either m_font or m_fontFamily/Size
- wxFont GetFont() const;
- };
+ typedef ComposerOptions Options;
private:
Index: FolderView.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/FolderView.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -b -u -2 -r1.38 -r1.39
--- FolderView.h 13 Mar 2002 16:38:25 -0000 1.38
+++ FolderView.h 19 Sep 2003 13:31:19 -0000 1.39
@@ -14,8 +14,10 @@
#include "MEvent.h"
+#include "MailFolder.h" // for OpenMode
class MailFolder;
class Profile;
class ASMailFolder;
+class MFolder;
class WXDLLEXPORT wxWindow;
@@ -86,6 +88,5 @@
/// return pointer to associated mail folder (IncRef()'d as usual)
- MailFolder *GetMailFolder() const
- { return m_ASMailFolder ? m_ASMailFolder->GetMailFolder() : NULL; }
+ MailFolder *GetMailFolder() const;
//@}
Index: MApplication.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MApplication.h,v
retrieving revision 1.103
retrieving revision 1.104
diff -b -u -2 -r1.103 -r1.104
--- MApplication.h 18 Sep 2003 16:30:39 -0000 1.103
+++ MApplication.h 19 Sep 2003 13:31:19 -0000 1.104
@@ -16,8 +16,8 @@
#ifndef USE_PCH
# include "Merror.h"
-# include "gui/wxMFrame.h"
#endif // USE_PCH
#include "MEvent.h"
+#include "lists.h"
class CmdLineOptions;
@@ -27,4 +27,5 @@
class MModuleCommon;
class ArrayFrames;
+class wxMFrame;
class WXDLLEXPORT wxDynamicLibrary;
@@ -33,4 +34,5 @@
class WXDLLEXPORT wxPrintData;
class WXDLLEXPORT wxConfigBase;
+class WXDLLEXPORT wxWindow;
M_LIST_PTR(ListLibraries, wxDynamicLibrary);
Index: MEvent.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MEvent.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -b -u -2 -r1.55 -r1.56
--- MEvent.h 14 Sep 2003 16:10:43 -0000 1.55
+++ MEvent.h 19 Sep 2003 13:31:19 -0000 1.56
@@ -91,7 +91,4 @@
class MailFolder;
-// FIXME: this shouldn't be needed! Opaque type?
-#include "ASMailFolder.h"
-
/// MEventWithFolderData - an event data object containing a folder pointer
class MEventWithFolderData : public MEventData
@@ -100,9 +97,8 @@
/// ctor takes the (string) id for the event
MEventWithFolderData(MEventId id = MEventId_Null,
- MailFolder *mf = NULL)
- : MEventData(id) { m_Folder = mf; SafeIncRef(m_Folder); }
+ MailFolder *mf = NULL);
/// virtual dtor as in any base class
- virtual ~MEventWithFolderData() { SafeDecRef(m_Folder); }
+ virtual ~MEventWithFolderData();
/** Get the folder associated.
@@ -421,4 +417,5 @@
with the result of an asynchronous operation on the folder.
*/
+class ASMailFolderResult;
class MEventASFolderResultData : public MEventData
{
@@ -432,8 +429,8 @@
~MEventASFolderResultData()
{ m_ResultData->DecRef(); }
- ASMailFolder::Result *GetResult(void) const
+ ASMailFolderResult *GetResult(void) const
{
m_ResultData->IncRef();
- return ( ASMailFolder::Result *) m_ResultData;
+ return ( ASMailFolderResult *) m_ResultData;
}
private:
Index: MFCache.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MFCache.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -2 -r1.15 -r1.16
--- MFCache.h 18 Sep 2003 16:30:39 -0000 1.15
+++ MFCache.h 19 Sep 2003 13:31:19 -0000 1.16
@@ -25,4 +25,5 @@
#include "MEvent.h"
+#include "MFStatus.h"
WX_DEFINE_ARRAY(MailFolderStatus *, MfStatusArray);
Index: MFPrivate.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MFPrivate.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -u -2 -r1.6 -r1.7
--- MFPrivate.h 22 Jul 2003 22:01:38 -0000 1.6
+++ MFPrivate.h 19 Sep 2003 13:31:19 -0000 1.7
@@ -12,4 +12,5 @@
#include "MEvent.h"
+#include "MailFolder.h"
/**
Index: MInterface.mid
===================================================================
RCS file: /cvsroot/mahogany/M/include/MInterface.mid,v
retrieving revision 1.34
retrieving revision 1.35
diff -b -u -2 -r1.34 -r1.35
--- MInterface.mid 18 Sep 2003 16:30:40 -0000 1.34
+++ MInterface.mid 19 Sep 2003 13:31:19 -0000 1.35
@@ -14,4 +14,5 @@
INCLUDE(`"MFolder.h"')
INCLUDE(`"MailFolder.h"')
+INCLUDE(`"ASMailFolder.h"')
INCLUDE(`"Message.h"')
INCLUDE(`"SendMessage.h"')
Index: MailFolderCC.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolderCC.h,v
retrieving revision 1.215
retrieving revision 1.216
diff -b -u -2 -r1.215 -r1.216
--- MailFolderCC.h 18 Sep 2003 16:30:41 -0000 1.215
+++ MailFolderCC.h 19 Sep 2003 13:31:19 -0000 1.216
@@ -24,6 +24,4 @@
#include "MThread.h"
-#include "MFolder.h"
-
#include "MailFolderCmn.h"
@@ -94,11 +92,11 @@
@return the folder's name
*/
- virtual String GetName(void) const { return m_mfolder->GetFullName(); }
+ virtual String GetName(void) const;
/// return the folder type
- virtual MFolderType GetType(void) const { return m_mfolder->GetType(); }
+ virtual MFolderType GetType(void) const;
/// return the folder flags
- virtual int GetFlags(void) const { return m_mfolder->GetFlags(); }
+ virtual int GetFlags(void) const;
/// Return IMAP spec
@@ -447,6 +445,5 @@
/// do we need to authentificate?
- bool NeedsAuthInfo() const
- { return !HasLogin() && m_mfolder->NeedsLogin(); }
+ bool NeedsAuthInfo() const;
//@}
Index: MessageCC.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageCC.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -b -u -2 -r1.57 -r1.58
--- MessageCC.h 18 Sep 2003 16:30:42 -0000 1.57
+++ MessageCC.h 19 Sep 2003 13:31:19 -0000 1.58
@@ -22,5 +22,4 @@
#endif //USE_PCH
-#include "MailFolderCC.h"
#include "Message.h"
Index: MessageEditor.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageEditor.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -2 -r1.11 -r1.12
--- MessageEditor.h 18 Sep 2003 16:30:42 -0000 1.11
+++ MessageEditor.h 19 Sep 2003 13:31:19 -0000 1.12
@@ -20,4 +20,7 @@
class EditorContentPart;
+class Composer;
+class Profile;
+class ComposerOptions;
#include <wx/fontenc.h> // for wxFontEncoding
@@ -26,5 +29,4 @@
#include "MModule.h"
-#include "Composer.h"
// the message editor module interface name
@@ -178,17 +180,15 @@
//@{
- typedef Composer::Options Options;
-
/// get the profile to use (NOT IncRef()'d!)
- Profile *GetProfile() const { return m_composer->GetProfile(); }
+ Profile *GetProfile() const;
/// get the msg view options
- const Options& GetOptions() const { return m_composer->GetOptions(); }
+ const ComposerOptions& GetOptions() const;
/// call the Composer method on derived class behalf
- bool OnFirstTimeFocus() { return m_composer->OnFirstTimeFocus(); }
+ bool OnFirstTimeFocus();
/// call the Composer method on derived class behalf
- void OnFirstTimeModify() { m_composer->OnFirstTimeModify(); }
+ void OnFirstTimeModify();
//@}
Index: MessageView.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageView.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -b -u -2 -r1.48 -r1.49
--- MessageView.h 18 Sep 2003 16:30:42 -0000 1.48
+++ MessageView.h 19 Sep 2003 13:31:19 -0000 1.49
@@ -44,4 +44,5 @@
class ProcessInfo;
class ViewFilter;
+class FolderView;
WX_DEFINE_ARRAY(ProcessInfo *, ArrayProcessInfo);
Index: MsgCmdProc.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MsgCmdProc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -2 -r1.2 -r1.3
--- MsgCmdProc.h 2 Aug 2001 18:23:50 -0000 1.2
+++ MsgCmdProc.h 19 Sep 2003 13:31:19 -0000 1.3
@@ -27,4 +27,5 @@
class MessageView;
class MFolder;
+class UIdArray;
class WXDLLEXPORT wxFrame;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates