Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv7121/src/classes
Modified Files:
MApplication.cpp MFolder.cpp
Log Message:
redesigned the MailFolder and related classes to virtualize access to the folder
functions via folder drivers -- this should allow to plug in a virtual folder
implementation easily now
WARNING: many untested changes, don't use for now for anything but testing!
Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.256
retrieving revision 1.257
diff -b -u -2 -r1.256 -r1.257
--- MApplication.cpp 20 Jun 2002 18:12:05 -0000 1.256
+++ MApplication.cpp 14 Jul 2002 23:41:22 -0000 1.257
@@ -267,4 +267,9 @@
// --------------------------
+#ifdef USE_DIALUP
+ // must be done before using the network
+ SetupOnlineManager();
+#endif // USE_DIALUP
+
if ( !READ_APPCONFIG(MP_DONTOPENSTARTUP) )
{
@@ -337,4 +342,6 @@
MAppBase::OnStartup()
{
+ #error "This version of Mahogany contains a lot of untested changes, please don't
+use it until it stabilizes a little (you need to edit the sources and recompile if
+you still want to use it in spite of the warning.)"
+
// initialise the profile(s)
// -------------------------
Index: MFolder.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MFolder.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -b -u -2 -r1.80 -r1.81
--- MFolder.cpp 5 Jul 2002 17:58:35 -0000 1.80
+++ MFolder.cpp 14 Jul 2002 23:41:22 -0000 1.81
@@ -123,9 +123,11 @@
virtual String GetServer() const { return m_server; }
virtual String GetLogin() const { return m_login; }
- virtual String GetPassword() const {return m_password; }
+ virtual String GetPassword() const { return m_password; }
+ virtual void SetAuthInfo(const String& login, const String& password)
+ { m_login = login; m_password = password; }
virtual String GetName() const { return m_fullname.AfterLast('/'); }
virtual wxString GetFullName() const { return m_fullname; }
virtual MFolderType GetType() const { return m_type; }
- virtual const char *GetClass() const { return ""; }
+ virtual String GetClass() const { return ""; }
virtual bool NeedsNetwork(void) const { return false; }
virtual int GetIcon() const { return -1; }
@@ -215,4 +217,5 @@
virtual String GetLogin() const;
virtual String GetPassword() const;
+ virtual void SetAuthInfo(const String& login, const String& password);
virtual String GetName() const;
@@ -220,5 +223,5 @@
virtual MFolderType GetType() const;
- virtual const char *GetClass() const;
+ virtual String GetClass() const;
virtual bool NeedsNetwork() const;
@@ -695,4 +698,11 @@
}
+void
+MFolderFromProfile::SetAuthInfo(const String& login, const String& password)
+{
+ m_profile->writeEntry(MP_FOLDER_LOGIN, login);
+ m_profile->writeEntry(MP_FOLDER_PASSWORD, strutil_encrypt(password));
+}
+
MFolderType MFolderFromProfile::GetType() const
{
@@ -700,7 +710,17 @@
}
-const char *MFolderFromProfile::GetClass() const
+String MFolderFromProfile::GetClass() const
{
- return READ_CONFIG_TEXT(m_profile, MP_FOLDER_CLASS);
+ String kind = READ_CONFIG_TEXT(m_profile, MP_FOLDER_CLASS);
+
+ // this is a hack needed for backwards compatibility and which also allows
+ // to have the empty default value for the folder class which saves quite
+ // some bytes in the profile
+ if ( kind.empty() )
+ {
+ kind = "cclient";
+ }
+
+ return kind;
}
-------------------------------------------------------
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