merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / util / XOfficeInstallationDirectories.idl
blobc70fde8867e5558606a8f55c193015a465846bdb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_util_XOfficeInstallationDirectories_idl__
29 #define __com_sun_star_util_XOfficeInstallationDirectories_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include <com/sun/star/uno/XInterface.idl>
33 #endif
35 module com { module sun { module star { module util {
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.
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.
48 @since OOo 2.0.0
50 interface XOfficeInstallationDirectories : com::sun::star::uno::XInterface
52 //------------------------------------------------------------------------
53 /** returns the absolute URL containing the directory of the current office
54 installation (e.g. "file:///opt/OpenOffice.org".)
56 @returns
57 the absolute URL containing the directory of the current office
58 installation.
60 string getOfficeInstallationDirectoryURL();
62 //------------------------------------------------------------------------
63 /** returns the absolute URL containing the directory where the current
64 office installation expects its user data (e.g. "file:///home/kso".)
66 @returns
67 the absolute URL containing the directory of the current office
68 user data.
70 string getOfficeUserDataDirectoryURL();
72 //------------------------------------------------------------------------
73 /** calculates a relocatable URL from the given URL.
75 <p>If the given URL contains an absolute reference to the current office
76 installation directory or office user data directory, this method will
77 replace the absolute reference by an opaque placeholder string.
78 <code>makeRelocatableURL</code> must be used in order to re-replace the
79 placeholder by an absolute reference.
81 @param URL
82 The URL for that a relocatable URL is requested. In case the URL does
83 not contain a reference to the current office installation or to the office
84 user data directory, the input URL will be returned unchanged.
86 @returns
87 The relocatable URL.
89 string makeRelocatableURL( [in] string URL );
91 //------------------------------------------------------------------------
92 /** the counterpart of <code>makeRelocatableURL</code>.
94 <p>If the given URL contains a placeholder for an absolute reference to
95 the current office installation directory or for the office user data
96 directory, that was created using <code>makeRelocatableURL</code>, the
97 respective placeholder will be replaced by an absolute reference to the
98 current office installation directory or office user data directory.
100 @param URL
101 The URL for that an absolaute URL is requested. In case the URL does
102 not contain the opaque relocation placholder used by
103 <code>makeRelocatableURL</code>, the input URL will be returned
104 unchanged.
106 @returns
107 The absolute URL.
109 string makeAbsoluteURL( [in] string URL );
112 }; }; }; };
114 #endif