LibreOffice Module connectivity (master) 1
MNSProfileDiscover.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sal/types.h>
23#include <com/sun/star/mozilla/MozillaProductType.hpp>
24#include <com/sun/star/uno/Sequence.hxx>
25#include <rtl/ustring.hxx>
26
27#include <vector>
28#include <map>
29
30using namespace com::sun::star::mozilla;
31namespace connectivity::mozab { class ProfileStruct; }
32
33typedef std::map<OUString, ::connectivity::mozab::ProfileStruct> ProfileList;
34namespace connectivity::mozab
35 {
37 {
38 public:
40 ProfileStruct(OUString aProfileName, OUString aProfilePath);
41 const OUString& getProfileName() const { return profileName;}
42 const OUString& getProfilePath() const;
43 private:
44 OUString profileName;
45 OUString profilePath;
46 };
47
49 {
50 public:
53 };
54
55 //Used to query profiles information
56 class ProfileAccess final
57 {
58 public:
62 OUString getProfilePath( css::mozilla::MozillaProductType product, const OUString& profileName );
64 ::sal_Int32 getProfileCount( css::mozilla::MozillaProductType product );
66 ::sal_Int32 getProfileList( css::mozilla::MozillaProductType product, css::uno::Sequence< OUString >& list );
68 OUString getDefaultProfile( css::mozilla::MozillaProductType product );
70 bool getProfileExists( css::mozilla::MozillaProductType product, const OUString& profileName );
71 private:
73 void LoadProductsInfo();
74 void LoadXPToolkitProfiles(MozillaProductType product);
75 };
76
77}
78
79
80/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< OUString, ::connectivity::mozab::ProfileStruct > ProfileList
::sal_Int32 getProfileCount(css::mozilla::MozillaProductType product)
::sal_Int32 getProfileList(css::mozilla::MozillaProductType product, css::uno::Sequence< OUString > &list)
OUString getProfilePath(css::mozilla::MozillaProductType product, const OUString &profileName)
void LoadXPToolkitProfiles(MozillaProductType product)
OUString getDefaultProfile(css::mozilla::MozillaProductType product)
bool getProfileExists(css::mozilla::MozillaProductType product, const OUString &profileName)
const OUString & getProfilePath() const
const OUString & getProfileName() const