LCOV - code coverage report
Current view: top level - libreoffice/ucb/source/ucp/file - filglob.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2012-12-27 Functions: 2 2 100.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             : #ifndef _FILGLOB_HXX_
      20             : #define _FILGLOB_HXX_
      21             : 
      22             : #include <rtl/ustring.hxx>
      23             : #include <osl/file.hxx>
      24             : #include <com/sun/star/ucb/XCommandEnvironment.hpp>
      25             : 
      26             : 
      27             : namespace fileaccess {
      28             : 
      29             :     class BaseContent;
      30             : 
      31             :     struct equalOUString
      32             :     {
      33       35213 :         bool operator()( const rtl::OUString& rKey1, const rtl::OUString& rKey2 ) const
      34             :         {
      35       35213 :             return !!( rKey1 == rKey2 );
      36             :         }
      37             :     };
      38             : 
      39             : 
      40             :     struct hashOUString
      41             :     {
      42       39492 :         size_t operator()( const rtl::OUString& rName ) const
      43             :         {
      44       39492 :             return rName.hashCode();
      45             :         }
      46             :     };
      47             : 
      48             : 
      49             :     /******************************************************************************/
      50             :     /*                                                                            */
      51             :     /*                         Helper functions                                   */
      52             :     /*                                                                            */
      53             :     /******************************************************************************/
      54             : 
      55             : 
      56             :     // Returns true if dstUnqPath is a child from srcUnqPath or both are equal
      57             : 
      58             :     extern sal_Bool isChild( const rtl::OUString& srcUnqPath,
      59             :                                       const rtl::OUString& dstUnqPath );
      60             : 
      61             : 
      62             :     // Changes the prefix in name
      63             :     extern rtl::OUString newName( const rtl::OUString& aNewPrefix,
      64             :                                            const rtl::OUString& aOldPrefix,
      65             :                                            const rtl::OUString& old_Name );
      66             : 
      67             :     // returns the last part of the given url as title
      68             :     extern rtl::OUString getTitle( const rtl::OUString& aPath );
      69             : 
      70             :     // returns the url without last part as parentname
      71             :     // In case aFileName is root ( file:/// ) root is returned
      72             : 
      73             :     extern rtl::OUString getParentName( const rtl::OUString& aFileName );
      74             : 
      75             :     /**
      76             :      *  special copy:
      77             :      *  On test = true, the implementation determines whether the
      78             :      *  destination exists and returns the appropriate errorcode E_EXIST.
      79             :      *  osl::File::copy copies unchecked.
      80             :      */
      81             : 
      82             :     extern osl::FileBase::RC osl_File_copy( const rtl::OUString& strPath,
      83             :                                             const rtl::OUString& strDestPath,
      84             :                                             sal_Bool test = false );
      85             : 
      86             :     /**
      87             :      *  special move:
      88             :      *  On test = true, the implementation determines whether the
      89             :      *  destination exists and returns the appropriate errorcode E_EXIST.
      90             :      *  osl::File::move moves unchecked
      91             :      */
      92             : 
      93             :     extern osl::FileBase::RC osl_File_move( const rtl::OUString& strPath,
      94             :                                             const rtl::OUString& strDestPath,
      95             :                                             sal_Bool test = false );
      96             : 
      97             :     // This function implements the global exception handler of the file_ucp;
      98             :     // It never returns;
      99             : 
     100             :     extern void throw_handler( sal_Int32 errorCode,
     101             :                                sal_Int32 minorCode,
     102             :                                const com::sun::star::uno::Reference<
     103             :                                com::sun::star::ucb::XCommandEnvironment >& xEnv,
     104             :                                const rtl::OUString& aUncPath,
     105             :                                BaseContent* pContent,
     106             :                                bool isHandled = false);
     107             :                                    // the physical URL of the object
     108             : 
     109             : } // end namespace fileaccess
     110             : 
     111             : #endif
     112             : 
     113             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10