merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / uri / XExternalUriReferenceTranslator.idl
blob3dc6b8bfca770919ff93fe45e6baaae8ee1cbdd6
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 {
35 /**
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 &ldquo;file&rdquo;
40 URLs how to map the byte sequences that constitute the path segments of a
41 &ldquo;file&rdquo; URL to filenames on a given platform: The UNO environment
42 always assumes that path segments of &ldquo;file&rdquo; URLs represent
43 UTF-8&ndash;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 &ldquo;file&rdquo; 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&ndash;encoded &ldquo;file&rdquo;
48 URLs used within the UNO environment) and <dfn>external</dfn> URIs (e.g.,
49 byte-sequence&ndash;oriented &ldquo;file&rdquo; URLs used by other
50 applications). Typically, only &ldquo;file&rdquo; URLs are affected by this
51 translation.</p>
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>
57 @since OOo 2.0.0
59 published interface XExternalUriReferenceTranslator {
60 /**
61 returns the internal counterpart of an external URI reference.
63 @param externalUriReference
64 an external URI reference.
66 @returns
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
70 characters).
72 string translateToInternal([in] string externalUriReference);
74 /**
75 returns the external counterpart of an internal URI reference.
77 @param internalUriReference
78 an internal URI reference.
80 @returns
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
84 characters).
86 string translateToExternal([in] string internalUriReference);
89 }; }; }; };
91 #endif