bump product version to 4.2.0.1
[LibreOffice.git] / include / unotools / ucbhelper.hxx
blobee291b6f42a201e53d557d71f21188729001861e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_UNOTOOLS_UCBHELPER_HXX
21 #define INCLUDED_UNOTOOLS_UCBHELPER_HXX
23 #include <sal/config.h>
25 #include <com/sun/star/uno/Sequence.hxx>
26 #include <sal/types.h>
27 #include <unotools/unotoolsdllapi.h>
29 namespace com { namespace sun { namespace star {
30 namespace uno {
31 class Any;
32 class XComponentContext;
34 namespace ucb{
35 class XCommandEnvironment;
37 } } }
38 namespace ucbhelper { class Content; }
40 namespace utl { namespace UCBContentHelper {
42 UNOTOOLS_DLLPUBLIC bool IsDocument(OUString const & url);
44 UNOTOOLS_DLLPUBLIC bool IsFolder(OUString const & url);
46 /// @param title must not be null
47 /// @return true iff title has been set (i.e., if obtaining the "Title" property
48 /// of the given content yields a non-void value without raising a
49 /// non-RuntimeException; RuntimeExceptions are passed through)
50 UNOTOOLS_DLLPUBLIC bool GetTitle(
51 OUString const & url, OUString * title);
53 UNOTOOLS_DLLPUBLIC bool Kill(OUString const & url);
55 UNOTOOLS_DLLPUBLIC com::sun::star::uno::Any GetProperty(
56 OUString const & url, OUString const & property);
58 UNOTOOLS_DLLPUBLIC bool MakeFolder(
59 ucbhelper::Content & parent, OUString const & title,
60 ucbhelper::Content & result, bool exclusive = false);
62 /// like mkdir -p
63 UNOTOOLS_DLLPUBLIC bool ensureFolder(
64 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xCtx,
65 com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv,
66 const OUString& rFolder, ucbhelper::Content & result);
68 /// @return the value of the "Size" property of the given content, or zero if
69 /// obtaining the property yields a void value or raises a
70 /// non-RuntimeException (RuntimeExceptions are passed through)
71 UNOTOOLS_DLLPUBLIC sal_Int64 GetSize(OUString const & url);
73 UNOTOOLS_DLLPUBLIC bool IsYounger(
74 OUString const & younger, OUString const & older);
76 UNOTOOLS_DLLPUBLIC bool Exists(OUString const & url);
78 UNOTOOLS_DLLPUBLIC bool IsSubPath(
79 OUString const & parent, OUString const & child);
81 UNOTOOLS_DLLPUBLIC bool EqualURLs(
82 OUString const & url1, OUString const & url2);
84 } }
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */