LCOV - code coverage report
Current view: top level - libreoffice/desktop/source/deployment/manager - dp_activepackages.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-12-27 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_ACTIVEPACKAGES_HXX
      21             : #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_ACTIVEPACKAGES_HXX
      22             : 
      23             : #include "sal/config.h"
      24             : 
      25             : #include <utility>
      26             : #include <vector>
      27             : 
      28             : #if !defined(ANDROID) && !defined(IOS)
      29             : #include "dp_persmap.h"
      30             : #endif
      31             : 
      32             : namespace rtl { class OUString; }
      33             : 
      34             : namespace dp_manager {
      35             : 
      36             : class ActivePackages {
      37             : public:
      38           0 :     struct Data {
      39           0 :         Data(): failedPrerequisites(::rtl::OUString::valueOf((sal_Int32)0))
      40           0 :             {}
      41             :         /* name of the temporary file (shared, user extension) or the name of
      42             :            the folder of the bundled extension.
      43             :            It does not contain the trailing '_' of the folder.
      44             :            UTF-8 encoded
      45             :         */
      46             :         ::rtl::OUString temporaryName;
      47             :         /* The file name (shared, user) or the folder name (bundled)
      48             :            If the key is the file name, then file name is not encoded.
      49             :            If the key is the idendifier then the file name is UTF-8 encoded.
      50             :          */
      51             :         ::rtl::OUString fileName;
      52             :         ::rtl::OUString mediaType;
      53             :         ::rtl::OUString version;
      54             :         /* If this string contains the value according to
      55             :            com::sun::star::deployment::Prerequisites or "0". That is, if
      56             :            the value is > 0 then
      57             :            the call to XPackage::checkPrerequisites failed.
      58             :            In this case the extension must not be registered.
      59             :          */
      60             :         ::rtl::OUString failedPrerequisites;
      61             :     };
      62             : 
      63             :     typedef ::std::vector< ::std::pair< ::rtl::OUString, Data > > Entries;
      64             : 
      65             :     ActivePackages();
      66             : 
      67             :     ActivePackages(::rtl::OUString const & url, bool readOnly);
      68             : 
      69             :     ~ActivePackages();
      70             : 
      71             :     bool has(::rtl::OUString const & id, ::rtl::OUString const & fileName)
      72             :         const;
      73             : 
      74             :     bool get(
      75             :         Data * data, ::rtl::OUString const & id,
      76             :         ::rtl::OUString const & fileName) const;
      77             : 
      78             :     Entries getEntries() const;
      79             : 
      80             :     void put(::rtl::OUString const & id, Data const & value);
      81             : 
      82             :     void erase(::rtl::OUString const & id, ::rtl::OUString const & fileName);
      83             : 
      84             : private:
      85             :     ActivePackages(ActivePackages &); // not defined
      86             :     void operator =(ActivePackages &); // not defined
      87             : #if !defined(ANDROID) && !defined(IOS)
      88             :     ::dp_misc::PersistentMap m_map;
      89             : #endif
      90             : };
      91             : 
      92             : }
      93             : 
      94             : #endif
      95             : 
      96             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10