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