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 __com_sun_star_ucb_XFileIdentifierConverter_idl__
20#define __com_sun_star_ucb_XFileIdentifierConverter_idl__
21
22#include <com/sun/star/uno/XInterface.idl>
23
24
25module com { module sun { module star { module ucb {
26
27/** specifies methods to convert between (file) URLs and file paths in system
28    dependent notation.
29
30    @version    1.0
31*/
32published interface XFileIdentifierConverter : com::sun::star::uno::XInterface
33{
34    /** Get information about the "locality" of a file content provider.
35
36        <p>The returned information can be used to chose the "best" among a
37        number of file content providers implementing this interface.
38
39        @param BaseURL
40        the base (file) URL used to specify a file content provider.
41
42        @returns
43        an appropriate value representing the "locality" of the specified file
44        content provider.   Generally, higher (non-negative) numbers denote
45        file content providers that are more "local", and negative numbers
46        denote content providers that are not file content providers at all.
47        As a convention (and to keep this useful), values should be restricted
48        to the range from -1 to +10, inclusive.
49     */
50    long getFileProviderLocality( [in] string BaseURL );
51
52    /** converts a file path in system dependent notation to a (file) URL.
53
54        @param BaseURL
55        the base (file) URL relative to which the file path shall be
56        interpreted.
57
58        @param SystemPath
59        a file path in system dependent notation.
60
61        @returns
62        the URL corresponding to the file path, or an empty string if the file
63        path cannot be converted into a URL.
64    */
65    string getFileURLFromSystemPath( [in] string BaseURL,
66                                     [in] string SystemPath );
67
68    /** converts a (file) URL to a file path in system dependent notation.
69
70        @param URL
71        a (file) URL.
72
73        @returns
74        the file path corresponding to the URL, or an empty string if the URL
75        cannot be converted into a file path.
76    */
77    string getSystemPathFromFileURL( [in] string URL );
78};
79
80
81}; }; }; };
82
83#endif
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
86