1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_util_XOfficeInstallationDirectories_idl__ 29#define __com_sun_star_util_XOfficeInstallationDirectories_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35module com { module sun { module star { module util { 36 37//============================================================================ 38/** encapsulates access to the current office installation directory and 39 office user data directory, provides functionality to create URLs 40 containing relocatable (not absolute) references to the current office 41 installation directory and user data directory and vice versa. 42 43 <p>This functionality is useful when data containing references to the 44 current office installation directory must be made persistent and re-read 45 later. In many cases, storing the reference directly would destroy the 46 relocatability of an office installation. 47 48 @since OOo 2.0 49 */ 50published interface XOfficeInstallationDirectories : com::sun::star::uno::XInterface 51{ 52 //------------------------------------------------------------------------ 53 /** returns the absolute URL containing the directory of the current office 54 installation (e.g. "file:///opt/OpenOffice.org".) 55 56 @returns 57 the absolute URL containing the directory of the current office 58 installation. 59 */ 60 string getOfficeInstallationDirectoryURL(); 61 62 //------------------------------------------------------------------------ 63 /** returns the absolute URL containing the directory where the current 64 office installation expects its user data (e.g. 65 "file:///home/kso/.openoffice.org".) 66 67 @returns 68 the absolute URL containing the directory of the current office 69 user data. 70 */ 71 string getOfficeUserDataDirectoryURL(); 72 73 //------------------------------------------------------------------------ 74 /** calculates a relocatable URL from the given URL. 75 76 <p>If the given URL contains an absolute reference to the current office 77 installation directory or office user data directory, this method will 78 replace the absolute reference by an opaque placeholder string. 79 <code>makeRelocatableURL</code> must be used in order to re-replace the 80 placeholder by an absolute reference. 81 82 @param URL 83 The URL for that a relocatable URL is requested. In case the URL does 84 not contain a reference to the current office installation or to the office 85 user data directory, the input URL will be returned unchanged. 86 87 @returns 88 The relocatable URL. 89 */ 90 string makeRelocatableURL( [in] string URL ); 91 92 //------------------------------------------------------------------------ 93 /** the counterpart of <code>makeRelocatableURL</code>. 94 95 <p>If the given URL contains a placeholder for an absolute reference to 96 the current office installation directory or for the office user data 97 directory, that was created using <code>makeRelocatableURL</code>, the 98 respective placeholder will be replaced by an absolute reference to the 99 current office installation directory or office user data directory. 100 101 @param URL 102 The URL for that an absolaute URL is requested. In case the URL does 103 not contain the opaque relocation placholder used by 104 <code>makeRelocatableURL</code>, the input URL will be returned 105 unchanged. 106 107 @returns 108 The absolute URL. 109 */ 110 string makeAbsoluteURL( [in] string URL ); 111}; 112 113}; }; }; }; 114 115#endif 116