bump product version to 4.2.0.1
[LibreOffice.git] / svl / source / passwordcontainer / syscreds.hxx
blobe0761decdee22cece46050d45aa2761f5a1bcb4f
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 SysCredentialsConfigItem( SysCredentialsConfig * pOwner );
36 //virtual ~SysCredentialsConfigItem();
38 virtual void Notify(
39 const com::sun::star::uno::Sequence< OUString > &
40 seqPropertyNames );
41 virtual void Commit();
43 com::sun::star::uno::Sequence< OUString >
44 getSystemCredentialsURLs();
46 void setSystemCredentialsURLs(
47 const com::sun::star::uno::Sequence< OUString > &
48 seqURLList );
50 //bool isSystemCredentialsURL( const OUString & rURL ) const;
52 private:
53 ::osl::Mutex m_aMutex;
54 bool m_bInited;
55 com::sun::star::uno::Sequence< OUString > m_seqURLs;
56 SysCredentialsConfig * m_pOwner;
59 typedef std::set< OUString > StringSet;
61 class SysCredentialsConfig
63 public:
64 SysCredentialsConfig();
66 OUString find( OUString const & rURL );
67 void add( OUString const & rURL, bool bPersistent );
68 void remove( OUString const & rURL );
69 com::sun::star::uno::Sequence< OUString > list( bool bOnlyPersistent );
71 void persistentConfigChanged();
73 private:
74 void initCfg();
75 void writeCfg();
77 ::osl::Mutex m_aMutex;
78 StringSet m_aMemContainer;
79 StringSet m_aCfgContainer;
80 SysCredentialsConfigItem m_aConfigItem;
81 bool m_bCfgInited;
84 #endif // INCLUDED_SVL_SOURCE_PASSWORDCONTAINER_SYSCREDS_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */