bump product version to 6.3.0.0.beta1
[LibreOffice.git] / svl / source / passwordcontainer / syscreds.hxx
blobd3605c26250639e534bfe0acbde9850a681c3f80
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_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
21 #define INCLUDED_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
23 #include <set>
24 #include <memory>
25 #include <osl/mutex.hxx>
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <unotools/configitem.hxx>
30 class SysCredentialsConfig;
32 class SysCredentialsConfigItem : public utl::ConfigItem
34 public:
35 explicit SysCredentialsConfigItem( SysCredentialsConfig * pOwner );
36 //virtual ~SysCredentialsConfigItem();
38 virtual void Notify( const css::uno::Sequence< OUString > & seqPropertyNames ) override;
40 css::uno::Sequence< OUString > getSystemCredentialsURLs();
42 void setSystemCredentialsURLs( const css::uno::Sequence< OUString > & seqURLList );
44 //bool isSystemCredentialsURL( const OUString & rURL ) const;
46 private:
47 virtual void ImplCommit() override;
49 ::osl::Mutex m_aMutex;
50 bool m_bInited;
51 css::uno::Sequence< OUString > m_seqURLs;
52 SysCredentialsConfig * m_pOwner;
55 typedef std::set< OUString > StringSet;
57 class SysCredentialsConfig
59 public:
60 SysCredentialsConfig();
62 OUString find( OUString const & rURL );
63 void add( OUString const & rURL, bool bPersistent );
64 void remove( OUString const & rURL );
65 css::uno::Sequence< OUString > list( bool bOnlyPersistent );
67 void persistentConfigChanged();
69 private:
70 void initCfg();
71 void writeCfg();
73 ::osl::Mutex m_aMutex;
74 StringSet m_aMemContainer;
75 StringSet m_aCfgContainer;
76 SysCredentialsConfigItem m_aConfigItem;
77 bool m_bCfgInited;
80 #endif // INCLUDED_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */