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 .
19 #ifndef __com_sun_star_util_XURLTransformer_idl__
20 #define __com_sun_star_util_XURLTransformer_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/util
/URL.idl
>
27 module com
{ module sun
{ module star
{ module util
{
30 /** supports parsing and assembling of URLs
35 published
interface XURLTransformer
: com
::sun
::star
::uno
::XInterface
37 /** parses the string in URL::Complete which should contain
38 a syntactically complete URL.
41 The implementation is allowed to correct minor failures in URL::Complete
42 if the meaning of the URL remain unchanged. Parts of the URL are stored in the other
43 fields of <var>aURL</var>.
47 the URL which include the complete string notation and will contain
48 all parsed parts of it after finishing this call. URL::Complete
49 can be overwritten if the implementation corrected minor failures.
52 `TRUE` if parsing was successfully (means if given URL was syntactically correct)
55 boolean parseStrict
( [inout
] com
::sun
::star
::util
::URL aURL
);
57 /** parses the string in URL::Complete, which may contain
58 a syntactically complete URL or is specified by the provided protocol
61 The implementation can use smart functions to correct or interpret
62 URL::Complete if it is not a syntactically complete URL.
63 The parts of the URL are stored in the other fields of <var>aURL</var>.
67 the URL which include the string notation and will contain
68 all parsed parts of it after finishing this call. This includes
72 optional information which protocol specification should be used to parse
73 URL::Complete. If empty the implementation can use a
74 protocol which fits best.
77 `TRUE` if parsing was successful (means if URL::Complete could
78 be syntactically correct) or `FALSE` otherwise.
81 [inout
] com
::sun
::star
::util
::URL aURL
,
82 [in] string sSmartProtocol
);
84 /** assembles the parts of the URL specified by <var>aURL</var> and
85 stores it into URL::Complete
88 the URL which contains alls necessary information in a structured form. The
89 member URL::Complete contains the URL in string notation after
90 the operation finished successfully. Otherwise the content of
91 URL::Complete is not defined.
94 `TRUE` if assembling was successfully or `FALSE` otherwise.
96 boolean assemble
( [inout
] com
::sun
::star
::util
::URL aURL
);
98 /** returns a representation of the URL for UI purposes only
101 Sometimes it can be useful to show an URL on an user interface
102 in a more "human readable" form. Such URL can't be used on any API
103 call, but make it easier for the user to understand it.
107 URL in structured form which should be shown at the UI
110 specifies whether the password will be included in the encoding
111 or not. Usually passwords should never be shown at the user
115 a string representing the <var>aURL</var> if it is syntactically correct. A empty string if <var>aURL</var>
116 is not syntactically correct.
118 string getPresentation
(
119 [in] com
::sun
::star
::util
::URL aURL
,
120 [in] boolean bWithPassword
);
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */