cid#1607171 Data race condition
[LibreOffice.git] / connectivity / source / drivers / mozab / bootstrap / MMozillaBootstrap.hxx
blobe01a2bb9612c962a977f113024715c9b3b0cda45
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #pragma once
21 #include <sal/config.h>
23 #include <memory>
25 #include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <cppuhelper/compbase.hxx>
30 namespace connectivity::mozab
32 typedef ::cppu::WeakComponentImplHelper< css::mozilla::XMozillaBootstrap,
33 css::lang::XServiceInfo > OMozillaBootstrap_BASE;
34 class ProfileAccess;
35 class ProfileManager;
36 class MozillaBootstrap : public OMozillaBootstrap_BASE
38 private:
39 ::osl::Mutex m_aMutex; // mutex is need to control member access
40 virtual ~MozillaBootstrap() override;
41 std::unique_ptr<ProfileAccess> m_ProfileAccess;
42 public:
44 MozillaBootstrap();
46 // OComponentHelper
47 virtual void SAL_CALL disposing() override;
49 // XServiceInfo
50 virtual OUString SAL_CALL getImplementationName( ) override;
51 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
52 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
54 // XMozillaBootstrap
56 // XProfileDiscover
57 virtual ::sal_Int32 SAL_CALL getProfileCount( css::mozilla::MozillaProductType product) override;
58 virtual ::sal_Int32 SAL_CALL getProfileList( css::mozilla::MozillaProductType product, css::uno::Sequence< OUString >& list ) override;
59 virtual OUString SAL_CALL getDefaultProfile( css::mozilla::MozillaProductType product ) override;
60 virtual OUString SAL_CALL getProfilePath( css::mozilla::MozillaProductType product, const OUString& profileName ) override;
61 virtual sal_Bool SAL_CALL isProfileLocked( css::mozilla::MozillaProductType product, const OUString& profileName ) override;
62 virtual sal_Bool SAL_CALL getProfileExists( css::mozilla::MozillaProductType product, const OUString& profileName ) override;
64 // XProfileManager
65 virtual ::sal_Int32 SAL_CALL bootupProfile( css::mozilla::MozillaProductType product, const OUString& profileName ) override;
66 virtual ::sal_Int32 SAL_CALL shutdownProfile( ) override;
67 virtual css::mozilla::MozillaProductType SAL_CALL getCurrentProduct( ) override;
68 virtual OUString SAL_CALL getCurrentProfile( ) override;
69 virtual sal_Bool SAL_CALL isCurrentProfileLocked( ) override;
70 virtual OUString SAL_CALL setCurrentProfile( css::mozilla::MozillaProductType product, const OUString& profileName ) override;
72 // XProxyRunner
73 virtual ::sal_Int32 SAL_CALL Run( const css::uno::Reference< css::mozilla::XCodeProxy >& aCode ) override;
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */