1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_uri_XExternalUriReferenceTranslator_idl__
21 #define __com_sun_star_uri_XExternalUriReferenceTranslator_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
25 module com
{ module sun
{ module star
{ module uri
{
28 translates between external and internal URI references.
30 <p>Some URI schemes leave unspecified important aspects of how to interpret
31 URIs of those schemes. For example, it is unspecified for “file”
32 URLs how to map the byte sequences that constitute the path segments of a
33 “file” URL to filenames on a given platform: The UNO environment
34 always assumes that path segments of “file” URLs represent
35 UTF-8–encoded strings (which have to be mapped to filenames in a
36 platform-specific way), while other applications typically assume that path
37 segments of “file” URLs directly represent a platform's
38 byte-sequence filenames. This interface offers methods to translate between
39 such <dfn>internal</dfn> URIs (e.g., UTF-8–encoded “file”
40 URLs used within the UNO environment) and <dfn>external</dfn> URIs (e.g.,
41 byte-sequence–oriented “file” URLs used by other
42 applications). Typically, only “file” URLs are affected by this
45 <p>Since the translation process is based on URI schemes, relative URI
46 references (that do not include a scheme) are left unmodified by the
47 translation process.</p>
51 published
interface XExternalUriReferenceTranslator
{
53 returns the internal counterpart of an external URI reference.
55 @param externalUriReference
56 an external URI reference.
59 the internal counterpart of the given external URI reference. An empty
60 string is returned if the given external URI reference either is an empty
61 string or cannot be converted (for example, because it contains illegal
64 string translateToInternal
([in] string externalUriReference
);
67 returns the external counterpart of an internal URI reference.
69 @param internalUriReference
70 an internal URI reference.
73 the external counterpart of the given internal URI reference. An empty
74 string is returned if the given internal URI reference either is an empty
75 string or cannot be converted (for example, because it contains illegal
78 string translateToExternal
([in] string internalUriReference
);
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */