1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XFileIdentifierConverter_idl__
28*cdf0e10cSrcweir#define __com_sun_star_ucb_XFileIdentifierConverter_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir//=============================================================================
35*cdf0e10cSrcweir
36*cdf0e10cSrcweirmodule com { module sun { module star { module ucb {
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir//=============================================================================
39*cdf0e10cSrcweir/** specifies methods to convert between (file) URLs and file paths in system
40*cdf0e10cSrcweir	dependent notation.
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir    @version	1.0
43*cdf0e10cSrcweir    @author   	Andreas Bille
44*cdf0e10cSrcweir*/
45*cdf0e10cSrcweirpublished interface XFileIdentifierConverter : com::sun::star::uno::XInterface
46*cdf0e10cSrcweir{
47*cdf0e10cSrcweir	//-------------------------------------------------------------------------
48*cdf0e10cSrcweir	/** Get information about the 'locality' of a file content provider.
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir		<p>The returned information can be used to chose the 'best' among a
51*cdf0e10cSrcweir		number of file content providers implementing this interface.
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir		@param BaseURL
54*cdf0e10cSrcweir		the base (file) URL used to specify a file content provider.
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir		@returns
57*cdf0e10cSrcweir		an appropriat value representing the 'locality' of the specified file
58*cdf0e10cSrcweir		content provider.   Generally, higher (non-negative) numbers denote
59*cdf0e10cSrcweir		file content providers that are more 'local', and negative numbers
60*cdf0e10cSrcweir		denote content providers that are not file content providers at all.
61*cdf0e10cSrcweir		As a convention (and to keep this useful), values should be restricted
62*cdf0e10cSrcweir		to the range from -1 to +10, inclusive.
63*cdf0e10cSrcweir	 */
64*cdf0e10cSrcweir	long getFileProviderLocality( [in] string BaseURL );
65*cdf0e10cSrcweir
66*cdf0e10cSrcweir	//-------------------------------------------------------------------------
67*cdf0e10cSrcweir	/** converts a file path in system dependent notation to a (file) URL.
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir		@param BaseURL
70*cdf0e10cSrcweir		the base (file) URL relative to which the file path shall be
71*cdf0e10cSrcweir		interpreted.
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir		@param SystemPath
74*cdf0e10cSrcweir		a file path in system dependent notation.
75*cdf0e10cSrcweir
76*cdf0e10cSrcweir		@returns
77*cdf0e10cSrcweir		the URL corresponding to the file path, or an empty string if the file
78*cdf0e10cSrcweir		path cannot be converted into a URL.
79*cdf0e10cSrcweir	*/
80*cdf0e10cSrcweir	string getFileURLFromSystemPath( [in] string BaseURL,
81*cdf0e10cSrcweir									 [in] string SystemPath );
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir	//-------------------------------------------------------------------------
84*cdf0e10cSrcweir	/** converts a (file) URL to a file path in system dependent notation.
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir		@param URL
87*cdf0e10cSrcweir		a (file) URL.
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir		@returns
90*cdf0e10cSrcweir		the file path corresponding to the URL, or an empty string if the URL
91*cdf0e10cSrcweir		cannot be converted into a file path.
92*cdf0e10cSrcweir	*/
93*cdf0e10cSrcweir	string getSystemPathFromFileURL( [in] string URL );
94*cdf0e10cSrcweir};
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir//=============================================================================
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir}; }; }; };
99*cdf0e10cSrcweir
100*cdf0e10cSrcweir#endif
101