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_uri_XExternalUriReferenceTranslator_idl__
29 #define __com_sun_star_uri_XExternalUriReferenceTranslator_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 module com
{ module sun
{ module star
{ module uri
{
36 translates between external and internal URI references.
38 <p>Some URI schemes leave unspecified important aspects of how to interpret
39 URIs of those schemes. For example, it is unspecified for “file”
40 URLs how to map the byte sequences that constitute the path segments of a
41 “file” URL to filenames on a given platform: The UNO environment
42 always assumes that path segments of “file” URLs represent
43 UTF-8–encoded strings (which have to be mapped to filenames in a
44 platform-specific way), while other applications typically assume that path
45 segments of “file” URLs directly represent a platform's
46 byte-sequence filenames. This interface offers methods to translate between
47 such <dfn>internal</dfn> URIs (e.g., UTF-8–encoded “file”
48 URLs used within the UNO environment) and <dfn>external</dfn> URIs (e.g.,
49 byte-sequence–oriented “file” URLs used by other
50 applications). Typically, only “file” URLs are affected by this
53 <p>Since the translation process is based on URI schemes, relative URI
54 references (that do not include a scheme) are left unmodified by the
55 translation process.</p>
59 published
interface XExternalUriReferenceTranslator
{
61 returns the internal counterpart of an external URI reference.
63 @param externalUriReference
64 an external URI reference.
67 the internal counterpart of the given external URI reference. An empty
68 string is returned if the given external URI reference either is an empty
69 string or cannot be converted (for example, because it contains illegal
72 string translateToInternal
([in] string externalUriReference
);
75 returns the external counterpart of an internal URI reference.
77 @param internalUriReference
78 an internal URI reference.
81 the external counterpart of the given internal URI reference. An empty
82 string is returned if the given internal URI reference either is an empty
83 string or cannot be converted (for example, because it contains illegal
86 string translateToExternal
([in] string internalUriReference
);