Tag: cws_src680_mozab05
User: windly  
Date: 05/01/23 23:49:20

Modified:
 /dba/connectivity/source/drivers/mozab/
  MDriver.cxx
 /dba/connectivity/source/drivers/mozab/bootstrap/
  MMozillaBootstrap.cxx, MMozillaBootstrap.hxx, MNSInit.cxx, MNSProfile.cxx,
  MNSProfileManager.cxx
 /dba/connectivity/source/drivers/mozab/defs/
  wntmsci10
 /dba/connectivity/source/drivers/mozab/mozillasrc/
  MDatabaseMetaDataHelper.cxx, MQuery.cxx

Log:
 #i20088# add thunderbird support

File Changes:

Directory: /dba/connectivity/source/drivers/mozab/
==================================================

File [changed]: MDriver.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MDriver.cxx?r1=1.10.40.1&r2=1.10.40.2
Delta lines:  +8 -3
-------------------
--- MDriver.cxx 17 Jan 2005 05:30:43 -0000      1.10.40.1
+++ MDriver.cxx 24 Jan 2005 07:49:03 -0000      1.10.40.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MDriver.cxx,v $
  *
- *  $Revision: 1.10.40.1 $
+ *  $Revision: 1.10.40.2 $
  *
- *  last change: $Author: windly $ $Date: 2005/01/17 05:30:43 $
+ *  last change: $Author: windly $ $Date: 2005/01/24 07:49:03 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -174,10 +174,15 @@
        if (s_pCreationFunc)
        {
        ::osl::MutexGuard aGuard(m_aMutex);
+               //We must make sure we create an 
com.sun.star.mozilla.MozillaBootstrap brfore call any mozilla codes
+               Reference<XInterface> xInstance = 
m_xMSFactory->createInstance(::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")) );
+               OSL_ENSURE( xInstance.is(), "failed to create instance" );
+
         OConnection* pCon = 
reinterpret_cast<OConnection*>((*s_pCreationFunc)(this));
                xCon = pCon;    // important here because otherwise the 
connection could be deleted inside (refcount goes -> 0)
                pCon->construct(url,info);                              // late 
constructor call which can throw exception and allows a correct dtor call when 
so
                m_xConnections.push_back(WeakReferenceHelper(*pCon));
+
        }
        else
        {

Directory: /dba/connectivity/source/drivers/mozab/bootstrap/
============================================================

File [changed]: MMozillaBootstrap.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +19 -5
--------------------
--- MMozillaBootstrap.cxx       17 Jan 2005 05:30:45 -0000      1.1.2.1
+++ MMozillaBootstrap.cxx       24 Jan 2005 07:49:03 -0000      1.1.2.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MMozillaBootstrap.cxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: windly $ $Date: 2005/01/17 05:30:45 $
+ *  last change: $Author: windly $ $Date: 2005/01/24 07:49:03 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -75,6 +75,7 @@
 #ifndef _CONNECTIVITY_MAB_MOZAB_RUNNABLE_HXX_
 #include "MNSRunnable.hxx"
 #endif
+#include <MNSInit.hxx>
 
 static MozillaBootstrap *pMozillaBootstrap=NULL;
 static Reference<XMozillaBootstrap> xMozillaBootstrap;
@@ -83,6 +84,7 @@
        if (!pMozillaBootstrap)
        {
                pMozillaBootstrap=new connectivity::mozab::MozillaBootstrap( 
_rxFactory );
+               pMozillaBootstrap->Init();
                xMozillaBootstrap = pMozillaBootstrap;
        }
 
@@ -97,13 +99,23 @@
     const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
        : OMozillaBootstrap_BASE(m_aMutex), m_xMSFactory( _rxFactory )
 {
-       m_ProfileManager = new ProfileManager();
-       m_ProfileAccess = new ProfileAccess();
 }
 // 
-----------------------------------------------------------------------------
 MozillaBootstrap::~MozillaBootstrap()
 {
 }
+// 
-----------------------------------------------------------------------------
+void MozillaBootstrap::Init()
+{
+       sal_Bool aProfileExists=sal_False;
+       sal_Int32 nProduct = 0;
+       MNS_Init(aProfileExists,nProduct);
+
+       m_ProfileManager = new ProfileManager();
+       m_ProfileAccess = new ProfileAccess();
+       
bootupProfile(::com::sun::star::mozilla::MozillaProductType_Mozilla,rtl::OUString());
+}
+
 // 
--------------------------------------------------------------------------------
 void MozillaBootstrap::disposing()
 {
@@ -203,8 +215,10 @@
 ::sal_Int32 SAL_CALL MozillaBootstrap::Run( const 
::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XCodeProxy >& 
aCode ) throw (::com::sun::star::uno::RuntimeException)
 {
        ::rtl::OUString profileName = aCode->getProfileName();
+       ::rtl::OUString currProfileName = getCurrentProfile();
+       ::com::sun::star::mozilla::MozillaProductType currProduct = 
getCurrentProduct();
        if (profileName.getLength() //if client does not provide a profileName, 
we will ignore the product too
-               && ( aCode->getProductType() != getCurrentProduct()  || 
profileName.equals(getCurrentProfile()))
+               && ( aCode->getProductType() != currProduct  || 
profileName.equals(currProfileName))
                         )
                        setCurrentProfile(aCode->getProductType(),profileName);
        MNSRunnable xRunnable;

File [changed]: MMozillaBootstrap.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +3 -2
-------------------
--- MMozillaBootstrap.hxx       17 Jan 2005 05:30:45 -0000      1.1.2.1
+++ MMozillaBootstrap.hxx       24 Jan 2005 07:49:04 -0000      1.1.2.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MMozillaBootstrap.hxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: windly $ $Date: 2005/01/17 05:30:45 $
+ *  last change: $Author: windly $ $Date: 2005/01/24 07:49:04 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -97,6 +97,7 @@
                        ProfileManager  * m_ProfileManager;
                public:
 
+                       void Init();
                        MozillaBootstrap(const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rxFactory);
 
                        // OComponentHelper

File [changed]: MNSInit.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +3 -3
-------------------
--- MNSInit.cxx 17 Jan 2005 05:30:47 -0000      1.1.2.1
+++ MNSInit.cxx 24 Jan 2005 07:49:04 -0000      1.1.2.2
@@ -2,9 +2,9 @@
  *
  *     $RCSfile: MNSInit.cxx,v $
  *
- *     $Revision: 1.1.2.1 $
+ *     $Revision: 1.1.2.2 $
  *
- *     last change: $Author: windly $ $Date: 2005/01/17 05:30:47 $
+ *     last change: $Author: windly $ $Date: 2005/01/24 07:49:04 $
  *
  *     The Contents of this file are made available subject to the terms of
  *     either of the following licenses
@@ -220,7 +220,7 @@
     if (NS_FAILED(rv))
       return rv;
 
-    eventQService->CreateThreadEventQueue();
+//    eventQService->CreateThreadEventQueue();
 
 //     nsCOMPtr<nsIObserver> mStartupNotifier = 
do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv);
 //     if(NS_FAILED(rv))

File [changed]: MNSProfile.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +3 -0
-------------------
--- MNSProfile.cxx      17 Jan 2005 05:30:48 -0000      1.1.2.1
+++ MNSProfile.cxx      24 Jan 2005 07:49:04 -0000      1.1.2.2
@@ -266,6 +266,9 @@
     
     if (isSwitch)
     {
+               rv = ShutDownCurrentProfile(nsIProfile::SHUTDOWN_PERSIST);
+               if (NS_FAILED(rv)) return NS_ERROR_ABORT;
+
         // Phase 1: See if anybody objects to the profile being changed.
         mProfileChangeVetoed = PR_FALSE;        
         observerService->NotifyObservers(subject, "profile-approve-change", 
context.get());

File [changed]: MNSProfileManager.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +1 -6
-------------------
--- MNSProfileManager.cxx       21 Jan 2005 06:30:53 -0000      1.1.2.2
+++ MNSProfileManager.cxx       24 Jan 2005 07:49:04 -0000      1.1.2.3
@@ -107,14 +107,11 @@
                                }
 
                                setCurrentProfile(product,profileName);
-                               sal_Bool aProfileExists=sal_False;
-                               sal_Int32 nProduct = product;
-                               MNS_Init(aProfileExists,nProduct);
                                return ++nInitCounter;
                        }
                        ::sal_Int32 ProfileManager::shutdownProfile(  ) throw 
(::com::sun::star::uno::RuntimeException) 
                        {
-                               MNS_Term(sal_False);
+//                             MNS_Term(sal_False);
                                return --nInitCounter;
                        }
                        ::com::sun::star::mozilla::MozillaProductType 
ProfileManager::getCurrentProduct(  ) throw 
(::com::sun::star::uno::RuntimeException) 
@@ -147,8 +144,6 @@
                                     if (NS_FAILED(rv)) return 
::rtl::OUString();
 
                                const PRUnichar* pUsedProfile = 
profileName.getStr();
-                               rv = 
theProfile->ShutDownCurrentProfile(nsIProfile::SHUTDOWN_PERSIST);
-                               if (NS_FAILED(rv)) return ::rtl::OUString();
                                rv = theProfile->SetCurrentProfile( 
pUsedProfile );
                                if (NS_FAILED(rv)) return ::rtl::OUString();
                                return currentProfile;

Directory: /dba/connectivity/source/drivers/mozab/defs/
=======================================================

File [changed]: wntmsci10
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/defs/wntmsci10?r1=1.30.8.1&r2=1.30.8.2
Delta lines:  +5 -0
-------------------
--- wntmsci10   17 Jan 2005 05:30:53 -0000      1.30.8.1
+++ wntmsci10   24 Jan 2005 07:49:05 -0000      1.30.8.2
@@ -336,3 +336,8 @@
 [EMAIL PROTECTED]@[EMAIL PROTECTED]@cppu@@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL 
PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@[EMAIL PROTECTED]@A

 createMozillaBootstrap

 ?createMozillaBootstrap@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@@@2345@@Z

[EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z

[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL 
PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@Z

[EMAIL PROTECTED]@[EMAIL PROTECTED]@cppu@@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL PROTECTED]@345@@cppu@@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@@@osl@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@com@@[EMAIL 
PROTECTED]@345@@cppu@@@[EMAIL PROTECTED]@osl@@@[EMAIL PROTECTED]@A

[EMAIL PROTECTED]@[EMAIL PROTECTED]@

[EMAIL PROTECTED]@[EMAIL PROTECTED]@


Directory: /dba/connectivity/source/drivers/mozab/mozillasrc/
=============================================================

File [changed]: MDatabaseMetaDataHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx?r1=1.9.46.1&r2=1.9.46.2
Delta lines:  +7 -5
-------------------
--- MDatabaseMetaDataHelper.cxx 17 Jan 2005 05:30:53 -0000      1.9.46.1
+++ MDatabaseMetaDataHelper.cxx 24 Jan 2005 07:49:06 -0000      1.9.46.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MDatabaseMetaDataHelper.cxx,v $
  *
- *  $Revision: 1.9.46.1 $
+ *  $Revision: 1.9.46.2 $
  *
- *  last change: $Author: windly $ $Date: 2005/01/17 05:30:53 $
+ *  last change: $Author: windly $ $Date: 2005/01/24 07:49:06 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -140,6 +140,8 @@
     }
 }
 
+extern sal_Bool MNS_Init(sal_Bool& aProfileExists,sal_Int32 nProduct);
+
 // -------------------------------------------------------------------------
 MDatabaseMetaDataHelper::MDatabaseMetaDataHelper()
     : m_bProfileExists(sal_False)
@@ -368,8 +370,8 @@
 
        retCode = 
rdfService->GetResource(nsDependentCString(aUri.getStr(),aUri.getLength()), 
getter_AddRefs(rdfResource)) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
-    retCode = rdfService->UnregisterResource(rdfResource) ;
-    NS_ENSURE_SUCCESS(retCode, retCode) ;
+    //retCode = rdfService->UnregisterResource(rdfResource) ;
+    //NS_ENSURE_SUCCESS(retCode, retCode) ;
     
        nsCOMPtr<nsIAbDirectory> directory = do_QueryInterface(rdfResource, 
&retCode) ;
 

File [changed]: MQuery.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx?r1=1.13.46.1&r2=1.13.46.2
Delta lines:  +23 -18
---------------------
--- MQuery.cxx  17 Jan 2005 05:30:55 -0000      1.13.46.1
+++ MQuery.cxx  24 Jan 2005 07:49:06 -0000      1.13.46.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MQuery.cxx,v $
  *
- *  $Revision: 1.13.46.1 $
+ *  $Revision: 1.13.46.2 $
  *
- *  last change: $Author: windly $ $Date: 2005/01/17 05:30:55 $
+ *  last change: $Author: windly $ $Date: 2005/01/24 07:49:06 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -407,6 +407,8 @@
     const char *pAddressBook = 
MTypeConverter::ouStringToCCharStringAscii(nameAB.getStr());
     prefName.Append(pAddressBook);
 
+       if (bindDN.getLength())
+       {
     nsCAutoString bindPrefName=prefName;
     bindPrefName.Append(NS_LITERAL_CSTRING(".auth.dn"));
     rv = prefs->SetCharPref (bindPrefName.get(),
@@ -418,11 +420,14 @@
     rv = prefs->SetCharPref (pwdPrefName.get(),
         MTypeConverter::ouStringToCCharStringAscii( password.getStr() ) );
     NS_ENSURE_SUCCESS(rv, rv);
-
+       }
+       if (useSSL)
+       {
     nsCAutoString sslPrefName=prefName;
     sslPrefName.Append(NS_LITERAL_CSTRING(".UseSSL"));
     rv = prefs->SetBoolPref (sslPrefName.get(),useSSL);
     NS_ENSURE_SUCCESS(rv, rv);
+       }
     return rv;
 }
                




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to