merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / util / URL.idl
bloba869331ac9dd43417eb44947b675b7d8c8027beb
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 ************************************************************************/
27 #ifndef __com_sun_star_util_URL_idl__
28 #define __com_sun_star_util_URL_idl__
31 //=============================================================================
33 module com { module sun { module star { module util {
35 //=============================================================================
37 /** represents the structure of an Uniform Resource Locator.
39 <p>
40 If the structure represents a valid URL or not depends on prior usage of
41 the functions of <type>XURLTransformer</type>. Only after one of the functions
42 returned <TRUE/> this can be assumed.</br>
43 It is not necessary to set all of the fields; either <member>URL::Complete</member>
44 or (some of) the others are set. Additionally, most of the other
45 fields, like <member>URL::Host</member>, <member>URL::Port</member>,
46 <member>URL::User</member>, <member>URL::Password</member>,
47 or <member>URL::Mark</member>, are optional.
49 @see XURLTransformer
51 </p>
53 published struct URL
55 /** contains the string representation of the complete URL, for example,
56 http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz
58 <p>
59 It is used as a central input/output or input parameter for the interfaces of
60 <type>XURLTransformer</type>. The usage of one of the <type>XURLTransformer</type>
61 function is mandatory to validate the URL. It cannot be assumed that
62 <member>URL::Complete</member> represents always a valid URL!
63 </p>
65 string Complete;
67 //-------------------------------------------------------------------------
68 /** contains the URL without a mark and without arguments, for example,
69 http://www.sun.de:8080/pub/test/foo.txt
71 string Main;
73 //-------------------------------------------------------------------------
74 /** contains the protocol (scheme) of the URL, for example, "http"
76 string Protocol;
78 //-------------------------------------------------------------------------
79 /** contains the user-identifier of the URL, for example, "me"
81 string User;
83 //-------------------------------------------------------------------------
84 /** contains the users password of the URL, for example, "pass"
86 string Password;
88 //-------------------------------------------------------------------------
89 /** contains the server part of the URL, for example, "www.sun.de"
91 string Server;
93 //-------------------------------------------------------------------------
94 /** contains the port at the server of the URL, for example, "8080"
96 short Port;
98 //-------------------------------------------------------------------------
99 /** contains all segments but the last one of the hierarchical path of the URL, for example, "/pub/test/"
101 string Path;
103 //-------------------------------------------------------------------------
104 /** contains the last segment of the hierarchical path of the URL, for the above example, "foo.txt"
106 <strong>Attention:</strong>A service implementing the <type>XURLTransformer</type> interface
107 will normally not detect if the last segment is a folder or a file. So it is possible that
108 the last segment describes a folder. If you want to be sure that a file URL that references
109 a folder will be correctly put into the URL fields you should append a '/' at the end of the
110 hierarchical path.
111 </p>
113 string Name;
115 //-------------------------------------------------------------------------
116 /** contains the arguments part of the URL, for example, "a=b"
118 string Arguments;
120 //-------------------------------------------------------------------------
121 /** contains the mark part of the URL, for example, "xyz"
123 string Mark;
127 //=============================================================================
129 }; }; }; };
131 #endif