1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_ucb_XFileIdentifierConverter_idl__ 24#define __com_sun_star_ucb_XFileIdentifierConverter_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30//============================================================================= 31 32module com { module sun { module star { module ucb { 33 34//============================================================================= 35/** specifies methods to convert between (file) URLs and file paths in system 36 dependent notation. 37 38 @version 1.0 39 @author Andreas Bille 40*/ 41published interface XFileIdentifierConverter : com::sun::star::uno::XInterface 42{ 43 //------------------------------------------------------------------------- 44 /** Get information about the 'locality' of a file content provider. 45 46 <p>The returned information can be used to chose the 'best' among a 47 number of file content providers implementing this interface. 48 49 @param BaseURL 50 the base (file) URL used to specify a file content provider. 51 52 @returns 53 an appropriat value representing the 'locality' of the specified file 54 content provider. Generally, higher (non-negative) numbers denote 55 file content providers that are more 'local', and negative numbers 56 denote content providers that are not file content providers at all. 57 As a convention (and to keep this useful), values should be restricted 58 to the range from -1 to +10, inclusive. 59 */ 60 long getFileProviderLocality( [in] string BaseURL ); 61 62 //------------------------------------------------------------------------- 63 /** converts a file path in system dependent notation to a (file) URL. 64 65 @param BaseURL 66 the base (file) URL relative to which the file path shall be 67 interpreted. 68 69 @param SystemPath 70 a file path in system dependent notation. 71 72 @returns 73 the URL corresponding to the file path, or an empty string if the file 74 path cannot be converted into a URL. 75 */ 76 string getFileURLFromSystemPath( [in] string BaseURL, 77 [in] string SystemPath ); 78 79 //------------------------------------------------------------------------- 80 /** converts a (file) URL to a file path in system dependent notation. 81 82 @param URL 83 a (file) URL. 84 85 @returns 86 the file path corresponding to the URL, or an empty string if the URL 87 cannot be converted into a file path. 88 */ 89 string getSystemPathFromFileURL( [in] string URL ); 90}; 91 92//============================================================================= 93 94}; }; }; }; 95 96#endif 97