1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <rtl/ustring.hxx>
23 #include <osl/file.hxx>
24 #include <unordered_map>
28 typedef std::unordered_map
<OString
, OString
> t_string2string_map
;
30 // Class to read obsolete registered extensions
31 // should be removed for LibreOffice 4.0
32 class PersistentMap final
34 ::osl::File m_MapFile
;
35 t_string2string_map m_entries
;
42 PersistentMap(OUString
const& url
);
46 bool has(OString
const& key
) const;
47 bool get(OString
* value
, OString
const& key
) const;
48 const t_string2string_map
& getEntries() const { return m_entries
; }
49 void put(OString
const& key
, OString
const& value
);
50 bool erase(OString
const& key
);
55 void add(OString
const& key
, OString
const& value
);
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */