LibreOffice Module comphelper (master) 1
configurationhelper.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#ifndef INCLUDED_COMPHELPER_CONFIGURATIONHELPER_HXX
21#define INCLUDED_COMPHELPER_CONFIGURATIONHELPER_HXX
22
23#include <com/sun/star/uno/Reference.h>
24#include <com/sun/star/uno/Any.hxx>
25#include <rtl/ustring.hxx>
28
29namespace com::sun::star::uno { class XComponentContext; }
30namespace com::sun::star::uno { class XInterface; }
31
32namespace comphelper
33{
41 {
43 Standard = 0,
45 ReadOnly = 1,
47 AllLocales = 2
48 };
49
50
51}
52
53namespace o3tl
54{
55 template<> struct typed_flags<comphelper::EConfigurationModes> : is_typed_flags<comphelper::EConfigurationModes, 0x3> {};
56}
57
58namespace comphelper
59{
60
62{
63public:
89 static css::uno::Reference< css::uno::XInterface > openConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
90 const OUString& sPackage,
92
93
118 static css::uno::Any readRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
119 const OUString& sRelPath,
120 const OUString& sKey );
121
122
148 static void writeRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
149 const OUString& sRelPath,
150 const OUString& sKey ,
151 const css::uno::Any& aValue );
152
153
182 static css::uno::Reference< css::uno::XInterface > makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface >& xCFG ,
183 const OUString& sRelPathToSet,
184 const OUString& sSetNode );
185
186
199 static void flush(const css::uno::Reference< css::uno::XInterface >& xCFG);
200
201
211 static css::uno::Any readDirectKey(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
212 const OUString& sPackage,
213 const OUString& sRelPath,
214 const OUString& sKey ,
216
217
227 static void writeDirectKey(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
228 const OUString& sPackage,
229 const OUString& sRelPath,
230 const OUString& sKey ,
231 const css::uno::Any& aValue ,
233};
234
235} // namespace comphelper
236
237#endif // INCLUDED_COMPHELPER_CONFIGURATIONHELPER_HXX
238
239/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define COMPHELPER_DLLPUBLIC
Mode eMode
EConfigurationModes
specify all possible modes, which can be used to open a configuration access.