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_PathSubstitution_idl__
29#define __com_sun_star_util_PathSubstitution_idl__
30
31#ifndef __com_sun_star_util_XStringSubstitution_idl__
32#include <com/sun/star/util/XStringSubstitution.idl>
33#endif
34
35#ifndef __com_sun_star_container_XNameContainer_idl__
36#include <com/sun/star/container/XNameContainer.idl>
37#endif
38
39#ifndef __com_sun_star_container_XContainerListener_idl__
40#include <com/sun/star/container/XContainerListener.idl>
41#endif
42
43//=============================================================================
44
45module com {  module sun {  module star {  module  util {
46
47//=============================================================================
48
49/** A service to support the substitution and resubstitution of path variables.
50
51        <p>
52        A path variable must be specified with the following synatx: "$("&lt;variable-name&gt;")".
53        Path variables are not case sensitive and are always provided as a UCB-complient URL's
54        (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an
55        optional remote file system.<br>
56        A user defined list of path variables is supported. This list is stored in the Office
57        configuration file (org/openoffice/Office/Substitution.xml). Please have a look at the
58        schema definition file which configuration structure this file uses.<br>
59        There is also a set of variables that have pre-defined values:
60        </p>
61        <dl>
62        <dt>$(inst)</dt>
63        <dd>Installation path of the Office Basis layer.</dd>
64        <dt>$(prog)</dt>
65        <dd>Program path of the Office Basis layer.</dd>
66    <dt>$(brandbaseurl)</dt>
67    <dd>Installation path of the the Office Brand layer.</dd>
68        <dt>$(user)</dt>
69        <dd>The user installation directory.</dd>
70        <dt>$(work)</dt>
71        <dd>The work directory of the user. Under Windows this would be the
72        "MyDocuments" subdirectory. Under Unix this would be the home-directory</dd>
73    <dt>$(home)</dt>
74        <dd>The home directory of the user. Under Unix this would be the home-
75            directory. Under Windows this would be the "Documents and Settings\<username>"
76         subdirectory.</dd>
77    <dt>$(temp)</dt>
78        <dd>The current temporary directory.</dd>
79    <dt>$(path)</dt>
80        <dd>The value of PATH environment variable.</dd>
81    <dt>$(lang)</dt>
82        <dd>The country code used by the Office, like 01=english, 49=german.</dd>
83        <dt>$(langid)</dt>
84        <dd>The language code used by the Office, like 0x0009=english, 0x0409=english us.</dd>
85    <dt>$(vlang)</dt>
86        <dd>The language used by the Office as a string. Like "german" for a german Office.</dd>
87        </dl>
88        <p>
89        Attention: Most predefined variables describe an absolute path.
90        The only exceptions are: $(lang), $(langid) and $(vlang).
91        Therefore the service implementation should only substitute variables which
92        are located at the start of a provided path string or are part of a multi-path.
93        This special service is not designed to be a text substiution but shall
94        provide (a) valid substituted path(s).
95        </p>
96
97    @since OOo 1.1.2
98*/
99
100published service PathSubstitution
101{
102        //-------------------------------------------------------------------------
103        /** Interface to exchange path variables with defined paths and to resubstitute paths with path variables.
104
105                <p>
106                To resubstitute path variables the caller must provide pathes as UCB-compliant URL's.
107                </p>
108        */
109        interface com::sun::star::util::XStringSubstitution;
110};
111
112//=============================================================================
113
114}; }; }; };
115
116#endif
117