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 <config_extensions.h>
24 #include <sal/config.h>
25 #include <rtl/ustring.hxx>
30 #if HAVE_FEATURE_EXTENSIONS
31 #include <dp_persmap.h>
35 namespace dp_manager
{
37 class ActivePackages
{
40 Data(): failedPrerequisites(u
"0"_ustr
)
42 /* name of the temporary file (shared, user extension) or the name of
43 the folder of the bundled extension.
44 It does not contain the trailing '_' of the folder.
47 OUString temporaryName
;
48 /* The file name (shared, user) or the folder name (bundled)
49 If the key is the file name, then file name is not encoded.
50 If the key is the identifier then the file name is UTF-8 encoded.
55 /* If this string contains the value according to
56 css::deployment::Prerequisites or "0". That is, if
58 the call to XPackage::checkPrerequisites failed.
59 In this case the extension must not be registered.
61 OUString failedPrerequisites
;
64 typedef std::vector
< std::pair
< OUString
, Data
> > Entries
;
68 explicit ActivePackages(OUString
const & url
);
72 bool has(OUString
const & id
, OUString
const & fileName
)
76 Data
* data
, OUString
const & id
,
77 OUString
const & fileName
) const;
79 Entries
getEntries() const;
81 void put(OUString
const & id
, Data
const & value
);
83 void erase(OUString
const & id
, OUString
const & fileName
);
86 ActivePackages(ActivePackages
const &) = delete;
87 ActivePackages
& operator =(ActivePackages
const &) = delete;
88 #if HAVE_FEATURE_EXTENSIONS
89 ::dp_misc::PersistentMap m_map
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */