1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
23 #include <sal/types.h>
24 #include <osl/diagnose.h>
25 #include <osl/conditn.hxx>
26 #include <com/sun/star/mozilla/MozillaProductType.hpp>
27 #include <com/sun/star/uno/RuntimeException.hpp>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <rtl/ustring.hxx>
34 using namespace com::sun::star::mozilla
;
35 namespace connectivity
42 typedef std::map
<OUString
, ::connectivity::mozab::ProfileStruct
> ProfileList
;
43 namespace connectivity
51 ProfileStruct(const OUString
& aProfileName
, const OUString
&aProfilePath
);
52 const OUString
& getProfileName() const { return profileName
;}
53 const OUString
& getProfilePath() const;
62 OUString mCurrentProfileName
;
63 ProfileList mProfileList
;
66 //Used to query profiles information
67 class ProfileAccess final
72 /// @throws css::uno::RuntimeException
73 OUString
getProfilePath( css::mozilla::MozillaProductType product
, const OUString
& profileName
);
74 /// @throws css::uno::RuntimeException
75 ::sal_Int32
getProfileCount( css::mozilla::MozillaProductType product
);
76 /// @throws css::uno::RuntimeException
77 ::sal_Int32
getProfileList( css::mozilla::MozillaProductType product
, css::uno::Sequence
< OUString
>& list
);
78 /// @throws css::uno::RuntimeException
79 OUString
getDefaultProfile( css::mozilla::MozillaProductType product
);
80 /// @throws css::uno::RuntimeException
81 bool getProfileExists( css::mozilla::MozillaProductType product
, const OUString
& profileName
);
83 ProductStruct m_ProductProfileList
[4];
84 void LoadProductsInfo();
85 void LoadXPToolkitProfiles(MozillaProductType product
);
91 #endif // INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */