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 .
22 module com
{ module sun
{ module star
{ module util
{
25 /** supports parsing and assembling of URLs
30 published
interface XURLTransformer
: com
::sun
::star
::uno
::XInterface
32 /** parses the string in URL::Complete which should contain
33 a syntactically complete URL.
36 The implementation is allowed to correct minor failures in URL::Complete
37 if the meaning of the URL remain unchanged. Parts of the URL are stored in the other
38 fields of <var>aURL</var>.
42 the URL which include the complete string notation and will contain
43 all parsed parts of it after finishing this call. URL::Complete
44 can be overwritten if the implementation corrected minor failures.
47 `TRUE` if parsing was successful (means if given URL was syntactically correct)
50 boolean parseStrict
( [inout
] com
::sun
::star
::util
::URL aURL
);
52 /** parses the string in URL::Complete, which may contain
53 a syntactically complete URL or is specified by the provided protocol
56 The implementation can use smart functions to correct or interpret
57 URL::Complete if it is not a syntactically complete URL.
58 The parts of the URL are stored in the other fields of <var>aURL</var>.
62 the URL which include the string notation and will contain
63 all parsed parts of it after finishing this call. This includes
67 optional information which protocol specification should be used to parse
68 URL::Complete. If empty the implementation can use a
69 protocol which fits best.
72 `TRUE` if parsing was successful (means if URL::Complete could
73 be syntactically correct) or `FALSE` otherwise.
76 [inout
] com
::sun
::star
::util
::URL aURL
,
77 [in] string sSmartProtocol
);
79 /** assembles the parts of the URL specified by <var>aURL</var> and
80 stores it into URL::Complete
83 the URL which contains all necessary information in a structured form. The
84 member URL::Complete contains the URL in string notation after
85 the operation finished successfully. Otherwise the content of
86 URL::Complete is not defined.
89 `TRUE` if assembling was successful or `FALSE` otherwise.
91 boolean assemble
( [inout
] com
::sun
::star
::util
::URL aURL
);
93 /** returns a representation of the URL for UI purposes only
96 Sometimes it can be useful to show a URL on an user interface
97 in a more "human readable" form. Such URL can't be used on any API
98 call, but make it easier for the user to understand it.
102 URL in structured form which should be shown at the UI
105 specifies whether the password will be included in the encoding
106 or not. Usually passwords should never be shown at the user
110 a string representing the <var>aURL</var> if it is syntactically correct. A empty string if <var>aURL</var>
111 is not syntactically correct.
113 string getPresentation
(
114 [in] com
::sun
::star
::util
::URL aURL
,
115 [in] boolean bWithPassword
);
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */