1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #if ! defined INCLUDED_DP_UCB_H 29 #define INCLUDED_DP_UCB_H 30 31 #include <list> 32 #include "rtl/byteseq.hxx" 33 #include "rtl/instance.hxx" 34 #include "com/sun/star/ucb/XCommandEnvironment.hpp" 35 #include "dp_misc_api.hxx" 36 37 namespace ucbhelper 38 { 39 class Content; 40 } 41 42 namespace css = ::com::sun::star; 43 44 namespace dp_misc { 45 46 struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle : 47 public rtl::StaticWithInit<const rtl::OUString, StrTitle> 48 { 49 const rtl::OUString operator () (); 50 }; 51 52 //============================================================================== 53 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool create_ucb_content( 54 ::ucbhelper::Content * ucb_content, 55 ::rtl::OUString const & url, 56 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv, 57 bool throw_exc = true ); 58 59 //============================================================================== 60 /** @return true if previously non-existing folder has been created 61 */ 62 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool create_folder( 63 ::ucbhelper::Content * ucb_content, 64 ::rtl::OUString const & url, 65 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv, 66 bool throw_exc = true ); 67 68 //============================================================================== 69 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool erase_path( 70 ::rtl::OUString const & url, 71 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv, 72 bool throw_exc = true ); 73 74 //============================================================================== 75 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC 76 ::rtl::ByteSequence readFile( ::ucbhelper::Content & ucb_content ); 77 78 //============================================================================== 79 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC 80 bool readLine( ::rtl::OUString * res, ::rtl::OUString const & startingWith, 81 ::ucbhelper::Content & ucb_content, rtl_TextEncoding textenc ); 82 83 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC 84 bool readProperties( ::std::list< ::std::pair< ::rtl::OUString, ::rtl::OUString> > & out_result, 85 ::ucbhelper::Content & ucb_content); 86 87 88 89 } 90 91 #endif 92