bump product version to 6.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / mozab / bootstrap / MNSProfileDiscover.hxx
bloba9f447739a4b4d9df6f28683cbae1f4eca3af726
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 .
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>
31 #include <vector>
32 #include <map>
34 using namespace com::sun::star::mozilla;
35 namespace connectivity
37 namespace mozab
39 class ProfileStruct;
42 typedef std::map<OUString, ::connectivity::mozab::ProfileStruct> ProfileList;
43 namespace connectivity
45 namespace mozab
47 class ProfileStruct
49 public:
50 ProfileStruct();
51 ProfileStruct(const OUString& aProfileName, const OUString &aProfilePath);
52 const OUString& getProfileName() const { return profileName;}
53 const OUString& getProfilePath() const;
54 private:
55 OUString profileName;
56 OUString profilePath;
59 class ProductStruct
61 public:
62 OUString mCurrentProfileName;
63 ProfileList mProfileList;
66 //Used to query profiles information
67 class ProfileAccess final
69 public:
70 ~ProfileAccess();
71 ProfileAccess();
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 );
82 private:
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: */