Revision: 7142
          http://svn.sourceforge.net/mahogany/?rev=7142&view=rev
Author:   vadz
Date:     2006-10-19 17:24:54 -0700 (Thu, 19 Oct 2006)

Log Message:
-----------
wrap parts of code relying on our patches to cclient in USE_OWN_CCLIENT to 
allow building with unmodified cclient version (first step towards using system 
cclient library)

Modified Paths:
--------------
    trunk/M/include/Moptions.h
    trunk/M/include/gui/wxOptionsPage.h
    trunk/M/src/classes/Moptions.cpp
    trunk/M/src/gui/wxOptionsDlg.cpp
    trunk/M/src/mail/Pop3.cpp
    trunk/M/src/mail/SendMessageCC.cpp

Modified: trunk/M/include/Moptions.h
===================================================================
--- trunk/M/include/Moptions.h  2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/include/Moptions.h  2006-10-20 00:24:54 UTC (rev 7142)
@@ -154,7 +154,9 @@
 extern const MOption MP_SMTPHOST_USE_SSL;
 extern const MOption MP_SMTPHOST_USE_SSL_UNSIGNED;
 extern const MOption MP_SMTP_USE_8BIT;
+#ifdef USE_OWN_CCLIENT
 extern const MOption MP_SMTP_DISABLED_AUTHS;
+#endif // USE_OWN_CCLIENT
 
 #ifdef OS_UNIX
 extern const MOption MP_SENDMAILCMD;

Modified: trunk/M/include/gui/wxOptionsPage.h
===================================================================
--- trunk/M/include/gui/wxOptionsPage.h 2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/include/gui/wxOptionsPage.h 2006-10-20 00:24:54 UTC (rev 7142)
@@ -555,7 +555,9 @@
    }
 
 
+#ifdef USE_OWN_CCLIENT
    wxString m_oldAuthsDisabled;
+#endif // USE_OWN_CCLIENT
 
    DECLARE_NO_COPY_CLASS(wxOptionsPageNetwork)
 };

Modified: trunk/M/src/classes/Moptions.cpp
===================================================================
--- trunk/M/src/classes/Moptions.cpp    2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/src/classes/Moptions.cpp    2006-10-20 00:24:54 UTC (rev 7142)
@@ -215,7 +215,9 @@
 const MOption MP_SMTPHOST_USE_SSL;
 const MOption MP_SMTPHOST_USE_SSL_UNSIGNED;
 const MOption MP_SMTP_USE_8BIT;
+#ifdef USE_OWN_CCLIENT
 const MOption MP_SMTP_DISABLED_AUTHS;
+#endif // USE_OWN_CCLIENT
 
 #ifdef OS_UNIX
 const MOption MP_SENDMAILCMD;
@@ -631,7 +633,9 @@
     DEFINE_OPTION(MP_SMTPHOST_USE_SSL),
     DEFINE_OPTION(MP_SMTPHOST_USE_SSL_UNSIGNED),
     DEFINE_OPTION(MP_SMTP_USE_8BIT),
+#ifdef USE_OWN_CCLIENT
     DEFINE_OPTION(MP_SMTP_DISABLED_AUTHS),
+#endif // USE_OWN_CCLIENT
 
 #ifdef OS_UNIX
     DEFINE_OPTION(MP_SENDMAILCMD),

Modified: trunk/M/src/gui/wxOptionsDlg.cpp
===================================================================
--- trunk/M/src/gui/wxOptionsDlg.cpp    2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/src/gui/wxOptionsDlg.cpp    2006-10-20 00:24:54 UTC (rev 7142)
@@ -174,8 +174,10 @@
    ConfigField_SenderHelp,
    ConfigField_GuessSender,
    ConfigField_Sender,
+#ifdef USE_OWN_CCLIENT
    ConfigField_DisabledAuthsHelp,
    ConfigField_DisabledAuths,
+#endif // USE_OWN_CCLIENT
 #ifdef USE_SSL
    ConfigField_SSLHelp,
    ConfigField_SmtpServerSSL,
@@ -1057,6 +1059,7 @@
    { gettext_noop("Try to guess SMTP sender header"), Field_Bool | 
Field_Advanced, ConfigField_MailServerLogin,           },
    { gettext_noop("SMTP sender header"), Field_Text | Field_Advanced, 
-ConfigField_GuessSender,           },
 
+#ifdef USE_OWN_CCLIENT
    { gettext_noop("\n"
                   "Final complication with SMTP authentication is that\n"
                   "some servers (notably qmail and Exim 3) advertise the\n"
@@ -1068,6 +1071,8 @@
                                                    Field_Advanced, 
ConfigField_MailServerLogin },
    { gettext_noop("Methods NOT to use"),           Field_Text |
                                                    Field_Advanced, 
ConfigField_MailServerLogin },
+#endif // USE_OWN_CCLIENT
+
 #ifdef USE_SSL
    { gettext_noop("\n"
                   "Mahogany can attempt to use either SSL or TLS to send\n"
@@ -1881,8 +1886,10 @@
    CONFIG_NONE(),    // "Sender" help
    CONFIG_ENTRY(MP_GUESS_SENDER),
    CONFIG_ENTRY(MP_SENDER),
+#ifdef USE_OWN_CCLIENT
    CONFIG_NONE(),    // disabled auths help
    CONFIG_NONE(),    // almost CONFIG_ENTRY(MP_SMTP_DISABLED_AUTHS)
+#endif // USE_OWN_CCLIENT
 #ifdef USE_SSL
    CONFIG_NONE(),
    CONFIG_ENTRY(MP_SMTPHOST_USE_SSL),
@@ -3715,6 +3722,7 @@
 // dynamicially fill the RAS connections combo box under Windows
 bool wxOptionsPageNetwork::TransferDataToWindow()
 {
+#ifdef USE_OWN_CCLIENT
    m_oldAuthsDisabled = READ_CONFIG_TEXT(m_Profile, MP_SMTP_DISABLED_AUTHS);
    wxTextCtrl *text = wxDynamicCast(GetControl(ConfigField_DisabledAuths),
                                     wxTextCtrl);
@@ -3728,6 +3736,7 @@
 
       text->SetValue(m_oldAuthsDisabled);
    }
+#endif // USE_OWN_CCLIENT
 
    bool bRc = wxOptionsPage::TransferDataToWindow();
 
@@ -3769,6 +3778,7 @@
 
 bool wxOptionsPageNetwork::TransferDataFromWindow()
 {
+#ifdef USE_OWN_CCLIENT
    // we need to massage the disabled authentificators string a bit to fit it
    wxTextCtrl *text = wxDynamicCast(GetControl(ConfigField_DisabledAuths),
                                     wxTextCtrl);
@@ -3789,6 +3799,7 @@
          m_Profile->writeEntry(MP_SMTP_DISABLED_AUTHS, authsDisabled);
       }
    }
+#endif // USE_OWN_CCLIENT
 
    return wxOptionsPage::TransferDataFromWindow();
 }

Modified: trunk/M/src/mail/Pop3.cpp
===================================================================
--- trunk/M/src/mail/Pop3.cpp   2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/src/mail/Pop3.cpp   2006-10-20 00:24:54 UTC (rev 7142)
@@ -29,7 +29,9 @@
 extern "C"
 {
    long pop3_send (MAILSTREAM *stream,char *command,char *args);
+#ifdef USE_OWN_CCLIENT
    NETSTREAM *pop3_getnetstream(MAILSTREAM *stream);
+#endif // USE_OWN_CCLIENT
 }
 
 #include <wx/textfile.h>
@@ -221,6 +223,7 @@
 
 static bool Pop3_GetUIDLs(MAILSTREAM *stream, wxArrayString& uidls)
 {
+#ifdef USE_OWN_CCLIENT
    if ( !pop3_send(stream, "UIDL", NIL) )
    {
       // TODO: don't use it the next time
@@ -296,6 +299,9 @@
    }
 
    return true;
+#else // !USE_OWN_CCLIENT
+   return false;
+#endif // USE_OWN_CCLIENT/!USE_OWN_CCLIENT
 }
 
 // ============================================================================

Modified: trunk/M/src/mail/SendMessageCC.cpp
===================================================================
--- trunk/M/src/mail/SendMessageCC.cpp  2006-10-20 00:23:40 UTC (rev 7141)
+++ trunk/M/src/mail/SendMessageCC.cpp  2006-10-20 00:24:54 UTC (rev 7142)
@@ -90,7 +90,9 @@
 extern const MOption MP_PREVIEW_SEND;
 extern const MOption MP_REPLY_ADDRESS;
 extern const MOption MP_SENDER;
+#ifdef USE_OWN_CCLIENT
 extern const MOption MP_SMTP_DISABLED_AUTHS;
+#endif // USE_OWN_CCLIENT
 extern const MOption MP_SMTP_USE_8BIT;
 extern const MOption MP_SMTPHOST;
 extern const MOption MP_SMTPHOST_LOGIN;
@@ -1881,6 +1883,7 @@
                options |= SOP_8BITMIME;
             }
 
+#ifdef USE_OWN_CCLIENT
             // do we need to disable any authentificators (presumably because
             // they're incorrectly implemented by the server)?
             const String authsToDisable(READ_CONFIG_TEXT(m_profile,
@@ -1898,6 +1901,7 @@
             {
                smtp_parameters(SET_SMTPDISABLEDAUTHS, NIL);
             }
+#endif // USE_OWN_CCLIENT
          }
          break;
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to