1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_UCBHELPER_FILEIDENTIFIERCONVERTER_HXX
21 #define INCLUDED_UCBHELPER_FILEIDENTIFIERCONVERTER_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/RuntimeException.hpp>
25 #include <sal/types.h>
26 #include <ucbhelper/ucbhelperdllapi.h>
28 namespace com
{ namespace sun
{ namespace star
{ namespace ucb
{
29 class XUniversalContentBroker
;
35 /** Get a 'root' URL for the most 'local' file content provider.
38 The result can be used as the rBaseURL parameter of
39 ucb::getFileURLFromSystemPath().
42 either a 'root' URL for the most 'local' file content provider, or an
43 empty string, if no such URL can meaningfully be constructed.
45 UCBHELPER_DLLPUBLIC OUString
getLocalFileURL();
48 /** Using a specific content provider manager, convert a file path in system
49 dependent notation to a (file) URL.
52 A content provider manager. Must not be null.
55 See the corresponding parameter of
56 com::sun::star::ucb::XFileIdentifierConverter::getFileURLFromSystemPath().
59 See the corresponding parameter of
60 com::sun::star::ucb::XFileIdentifierConverter::getFileURLFromSystemPath().
63 a URL, if the content provider registered at the content provider manager
64 that is responsible for the base URL returns a URL when calling
65 com::sun::star::ucb::XFileIdentiferConverter::getFileURLFromSystemPath()
66 on it. Otherwise, an empty string is returned.
69 com::sun::star::ucb::XFileIdentiferConverter::getFileURLFromSystemPath().
71 UCBHELPER_DLLPUBLIC OUString
72 getFileURLFromSystemPath(
73 com::sun::star::uno::Reference
<
74 com::sun::star::ucb::XUniversalContentBroker
> const &
76 OUString
const & rBaseURL
,
77 OUString
const & rSystemPath
);
80 /** Using a specific content provider manager, convert a (file) URL to a
81 file path in system dependent notation.
84 A content provider manager. Must not be null.
87 See the corresponding parameter of
88 com::sun::star::ucb::XFileIdentiferConverter::getSystemPathFromFileURL().
91 a system path, if the content provider registered at the content provider
92 manager that is responsible for the base URL returns a system path when
94 com::sun::star::ucb::XFileIdentiferConverter::getSystemPathFromFileURL()
95 on it. Otherwise, an empty string is returned.
98 com::sun::star::ucb::XFileIdentiferConverter::getSystemPathFromFileURL().
100 UCBHELPER_DLLPUBLIC OUString
101 getSystemPathFromFileURL(
102 com::sun::star::uno::Reference
<
103 com::sun::star::ucb::XUniversalContentBroker
> const &
105 OUString
const & rURL
);
109 #endif // INCLUDED_UCBHELPER_FILEIDENTIFIERCONVERTER_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */