1*9874e4f6SJuergen Schmidt /************************************************************** 2*9874e4f6SJuergen Schmidt * 3*9874e4f6SJuergen Schmidt * Licensed to the Apache Software Foundation (ASF) under one 4*9874e4f6SJuergen Schmidt * or more contributor license agreements. See the NOTICE file 5*9874e4f6SJuergen Schmidt * distributed with this work for additional information 6*9874e4f6SJuergen Schmidt * regarding copyright ownership. The ASF licenses this file 7*9874e4f6SJuergen Schmidt * to you under the Apache License, Version 2.0 (the 8*9874e4f6SJuergen Schmidt * "License"); you may not use this file except in compliance 9*9874e4f6SJuergen Schmidt * with the License. You may obtain a copy of the License at 10*9874e4f6SJuergen Schmidt * 11*9874e4f6SJuergen Schmidt * http://www.apache.org/licenses/LICENSE-2.0 12*9874e4f6SJuergen Schmidt * 13*9874e4f6SJuergen Schmidt * Unless required by applicable law or agreed to in writing, 14*9874e4f6SJuergen Schmidt * software distributed under the License is distributed on an 15*9874e4f6SJuergen Schmidt * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9874e4f6SJuergen Schmidt * KIND, either express or implied. See the License for the 17*9874e4f6SJuergen Schmidt * specific language governing permissions and limitations 18*9874e4f6SJuergen Schmidt * under the License. 19*9874e4f6SJuergen Schmidt * 20*9874e4f6SJuergen Schmidt *************************************************************/ 21*9874e4f6SJuergen Schmidt 22*9874e4f6SJuergen Schmidt 23*9874e4f6SJuergen Schmidt #ifndef _SMOZILLABOOTSTRAP_HXX 24*9874e4f6SJuergen Schmidt #define _SMOZILLABOOTSTRAP_HXX 25*9874e4f6SJuergen Schmidt 26*9874e4f6SJuergen Schmidt #include <com/sun/star/mozilla/XMozillaBootstrap.hpp> 27*9874e4f6SJuergen Schmidt #include <com/sun/star/lang/XServiceInfo.hpp> 28*9874e4f6SJuergen Schmidt #include <cppuhelper/compbase2.hxx> 29*9874e4f6SJuergen Schmidt #include <osl/module.h> 30*9874e4f6SJuergen Schmidt 31*9874e4f6SJuergen Schmidt 32*9874e4f6SJuergen Schmidt #define MOZAB_MozillaBootstrap_IMPL_NAME "com.sun.star.comp.mozilla.MozillaBootstrap" 33*9874e4f6SJuergen Schmidt 34*9874e4f6SJuergen Schmidt namespace connectivity 35*9874e4f6SJuergen Schmidt { 36*9874e4f6SJuergen Schmidt namespace mozab 37*9874e4f6SJuergen Schmidt { 38*9874e4f6SJuergen Schmidt typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::mozilla::XMozillaBootstrap, 39*9874e4f6SJuergen Schmidt ::com::sun::star::lang::XServiceInfo > OMozillaBootstrap_BASE; 40*9874e4f6SJuergen Schmidt class ProfileAccess; 41*9874e4f6SJuergen Schmidt class ProfileManager; 42*9874e4f6SJuergen Schmidt class MozillaBootstrap : public OMozillaBootstrap_BASE 43*9874e4f6SJuergen Schmidt { 44*9874e4f6SJuergen Schmidt protected: 45*9874e4f6SJuergen Schmidt const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xMSFactory; 46*9874e4f6SJuergen Schmidt 47*9874e4f6SJuergen Schmidt ::osl::Mutex m_aMutex; // mutex is need to control member access 48*9874e4f6SJuergen Schmidt virtual ~MozillaBootstrap(); 49*9874e4f6SJuergen Schmidt protected: 50*9874e4f6SJuergen Schmidt ProfileAccess * m_ProfileAccess; 51*9874e4f6SJuergen Schmidt ProfileManager * m_ProfileManager; 52*9874e4f6SJuergen Schmidt public: 53*9874e4f6SJuergen Schmidt 54*9874e4f6SJuergen Schmidt void Init(); 55*9874e4f6SJuergen Schmidt MozillaBootstrap(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory); 56*9874e4f6SJuergen Schmidt 57*9874e4f6SJuergen Schmidt // OComponentHelper 58*9874e4f6SJuergen Schmidt virtual void SAL_CALL disposing(void); 59*9874e4f6SJuergen Schmidt // XInterface 60*9874e4f6SJuergen Schmidt static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException); 61*9874e4f6SJuergen Schmidt static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException); 62*9874e4f6SJuergen Schmidt 63*9874e4f6SJuergen Schmidt // XServiceInfo 64*9874e4f6SJuergen Schmidt virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 65*9874e4f6SJuergen Schmidt virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 66*9874e4f6SJuergen Schmidt virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 67*9874e4f6SJuergen Schmidt 68*9874e4f6SJuergen Schmidt // XMozillaBootstrap 69*9874e4f6SJuergen Schmidt 70*9874e4f6SJuergen Schmidt // XProfileDiscover 71*9874e4f6SJuergen Schmidt virtual ::sal_Int32 SAL_CALL getProfileCount( ::com::sun::star::mozilla::MozillaProductType product) throw (::com::sun::star::uno::RuntimeException); 72*9874e4f6SJuergen Schmidt virtual ::sal_Int32 SAL_CALL getProfileList( ::com::sun::star::mozilla::MozillaProductType product, ::com::sun::star::uno::Sequence< ::rtl::OUString >& list ) throw (::com::sun::star::uno::RuntimeException); 73*9874e4f6SJuergen Schmidt virtual ::rtl::OUString SAL_CALL getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); 74*9874e4f6SJuergen Schmidt virtual ::rtl::OUString SAL_CALL getProfilePath( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); 75*9874e4f6SJuergen Schmidt virtual ::sal_Bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); 76*9874e4f6SJuergen Schmidt virtual ::sal_Bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); 77*9874e4f6SJuergen Schmidt 78*9874e4f6SJuergen Schmidt // XProfileManager 79*9874e4f6SJuergen Schmidt virtual ::sal_Int32 SAL_CALL bootupProfile( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); 80*9874e4f6SJuergen Schmidt virtual ::sal_Int32 SAL_CALL shutdownProfile( ) throw (::com::sun::star::uno::RuntimeException); 81*9874e4f6SJuergen Schmidt virtual ::com::sun::star::mozilla::MozillaProductType SAL_CALL getCurrentProduct( ) throw (::com::sun::star::uno::RuntimeException); 82*9874e4f6SJuergen Schmidt virtual ::rtl::OUString SAL_CALL getCurrentProfile( ) throw (::com::sun::star::uno::RuntimeException); 83*9874e4f6SJuergen Schmidt virtual ::sal_Bool SAL_CALL isCurrentProfileLocked( ) throw (::com::sun::star::uno::RuntimeException); 84*9874e4f6SJuergen Schmidt virtual ::rtl::OUString SAL_CALL setCurrentProfile( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); 85*9874e4f6SJuergen Schmidt 86*9874e4f6SJuergen Schmidt // XProxyRunner 87*9874e4f6SJuergen Schmidt virtual ::sal_Int32 SAL_CALL Run( const ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XCodeProxy >& aCode ) throw (::com::sun::star::uno::RuntimeException); 88*9874e4f6SJuergen Schmidt 89*9874e4f6SJuergen Schmidt const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getMSFactory(void) const90*9874e4f6SJuergen Schmidt & getMSFactory(void) const { return m_xMSFactory; } 91*9874e4f6SJuergen Schmidt 92*9874e4f6SJuergen Schmidt }; 93*9874e4f6SJuergen Schmidt } 94*9874e4f6SJuergen Schmidt 95*9874e4f6SJuergen Schmidt } 96*9874e4f6SJuergen Schmidt 97*9874e4f6SJuergen Schmidt #endif // _SMozillaBootstrap_HXX 98