merge the formfield patch from ooo-build
[ooovba.git] / desktop / source / deployment / inc / dp_ucb.h
blobe20fc689f1e73ac7caaf3c72faf1f2f6fdd3bb56
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dp_ucb.h,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #if ! defined INCLUDED_DP_UCB_H
32 #define INCLUDED_DP_UCB_H
34 #include "rtl/byteseq.hxx"
35 #include "rtl/instance.hxx"
36 #include "com/sun/star/ucb/XCommandEnvironment.hpp"
37 #include "dp_misc_api.hxx"
39 namespace ucbhelper
41 class Content;
44 namespace css = ::com::sun::star;
46 namespace dp_misc {
48 struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle :
49 public rtl::StaticWithInit<const rtl::OUString, StrTitle>
51 const rtl::OUString operator () ();
54 //==============================================================================
55 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool create_ucb_content(
56 ::ucbhelper::Content * ucb_content,
57 ::rtl::OUString const & url,
58 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
59 bool throw_exc = true );
61 //==============================================================================
62 /** @return true if previously non-existing folder has been created
64 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool create_folder(
65 ::ucbhelper::Content * ucb_content,
66 ::rtl::OUString const & url,
67 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
68 bool throw_exc = true );
70 //==============================================================================
71 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool erase_path(
72 ::rtl::OUString const & url,
73 css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
74 bool throw_exc = true );
76 //==============================================================================
77 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
78 ::rtl::ByteSequence readFile( ::ucbhelper::Content & ucb_content );
80 //==============================================================================
81 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
82 bool readLine( ::rtl::OUString * res, ::rtl::OUString const & startingWith,
83 ::ucbhelper::Content & ucb_content, rtl_TextEncoding textenc );
87 #endif