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 module com
{ module sun
{ module star
{ module uri
{
23 translates between external and internal URI references.
25 <p>Some URI schemes leave unspecified important aspects of how to interpret
26 URIs of those schemes. For example, it is unspecified for “file”
27 URLs how to map the byte sequences that constitute the path segments of a
28 “file” URL to filenames on a given platform: The UNO environment
29 always assumes that path segments of “file” URLs represent
30 UTF-8–encoded strings (which have to be mapped to filenames in a
31 platform-specific way), while other applications typically assume that path
32 segments of “file” URLs directly represent a platform's
33 byte-sequence filenames. This interface offers methods to translate between
34 such <dfn>internal</dfn> URIs (e.g., UTF-8–encoded “file”
35 URLs used within the UNO environment) and <dfn>external</dfn> URIs (e.g.,
36 byte-sequence–oriented “file” URLs used by other
37 applications). Typically, only “file” URLs are affected by this
40 <p>Since the translation process is based on URI schemes, relative URI
41 references (that do not include a scheme) are left unmodified by the
42 translation process.</p>
46 published
interface XExternalUriReferenceTranslator
{
48 returns the internal counterpart of an external URI reference.
50 @param externalUriReference
51 an external URI reference.
54 the internal counterpart of the given external URI reference. An empty
55 string is returned if the given external URI reference either is an empty
56 string or cannot be converted (for example, because it contains illegal
59 string translateToInternal
([in] string externalUriReference
);
62 returns the external counterpart of an internal URI reference.
64 @param internalUriReference
65 an internal URI reference.
68 the external counterpart of the given internal URI reference. An empty
69 string is returned if the given internal URI reference either is an empty
70 string or cannot be converted (for example, because it contains illegal
73 string translateToExternal
([in] string internalUriReference
);
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */