LibreOffice Module svl (master) 1
syscreds.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_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
21#define INCLUDED_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
22
23#include <memory>
24#include <mutex>
25#include <set>
26#include <rtl/ustring.hxx>
27#include <com/sun/star/uno/Sequence.hxx>
29
31
33{
34 public:
36 //virtual ~SysCredentialsConfigItem();
37
38 virtual void Notify( const css::uno::Sequence< OUString > & seqPropertyNames ) override;
39
40 css::uno::Sequence< OUString > getSystemCredentialsURLs();
41
42 void setSystemCredentialsURLs( const css::uno::Sequence< OUString > & seqURLList );
43
44 //bool isSystemCredentialsURL( const OUString & rURL ) const;
45
46 private:
47 css::uno::Sequence< OUString > getSystemCredentialsURLs(std::unique_lock<std::mutex>& rGuard);
48 virtual void ImplCommit() override;
49
50 std::mutex m_aMutex;
52 css::uno::Sequence< OUString > m_seqURLs;
54};
55
57{
58 public:
60
61 OUString find( OUString const & rURL );
62 void add( OUString const & rURL, bool bPersistent );
63 void remove( OUString const & rURL );
64 css::uno::Sequence< OUString > list( bool bOnlyPersistent );
65
67
68 private:
69 void initCfg(std::unique_lock<std::mutex>& rGuard);
70 void writeCfg(std::unique_lock<std::mutex>& rGuard);
71
72 std::mutex m_aMutex;
73 std::set< OUString > m_aMemContainer;
74 std::set< OUString > m_aCfgContainer;
77};
78
79#endif // INCLUDED_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Sequence< OUString > m_seqURLs
Definition: syscreds.hxx:52
virtual void Notify(const css::uno::Sequence< OUString > &seqPropertyNames) override
Definition: syscreds.cxx:37
css::uno::Sequence< OUString > getSystemCredentialsURLs()
Definition: syscreds.cxx:55
void setSystemCredentialsURLs(const css::uno::Sequence< OUString > &seqURLList)
Definition: syscreds.cxx:87
virtual void ImplCommit() override
Definition: syscreds.cxx:49
SysCredentialsConfig * m_pOwner
Definition: syscreds.hxx:53
SysCredentialsConfigItem(SysCredentialsConfig *pOwner)
Definition: syscreds.cxx:26
OUString find(OUString const &rURL)
Definition: syscreds.cxx:189
std::set< OUString > m_aCfgContainer
Definition: syscreds.hxx:74
css::uno::Sequence< OUString > list(bool bOnlyPersistent)
Definition: syscreds.cxx:236
void writeCfg(std::unique_lock< std::mutex > &rGuard)
Definition: syscreds.cxx:182
std::mutex m_aMutex
Definition: syscreds.hxx:72
std::set< OUString > m_aMemContainer
Definition: syscreds.hxx:73
void remove(OUString const &rURL)
Definition: syscreds.cxx:225
void persistentConfigChanged()
Definition: syscreds.cxx:263
void add(OUString const &rURL, bool bPersistent)
Definition: syscreds.cxx:203
void initCfg(std::unique_lock< std::mutex > &rGuard)
Definition: syscreds.cxx:171
SysCredentialsConfigItem m_aConfigItem
Definition: syscreds.hxx:75
SvLinkSource * pOwner