xref: /aoo41x/main/offapi/com/sun/star/util/URL.idl (revision cdf0e10c)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_util_URL_idl__
28#define __com_sun_star_util_URL_idl__
29
30
31//=============================================================================
32
33module com {  module sun {  module star {  module util {
34
35//=============================================================================
36
37/** represents the structure of an Uniform Resource Locator.
38
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.
48
49	@see XURLTransformer
50
51	</p>
52 */
53published struct URL
54{
55	/** contains the string representation of the complete URL, for example,
56		http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz
57
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>
64	 */
65	string Complete;
66
67	//-------------------------------------------------------------------------
68	/** contains the URL without a mark and without arguments, for example,
69		http://www.sun.de:8080/pub/test/foo.txt
70	 */
71	string Main;
72
73	//-------------------------------------------------------------------------
74	/** contains the protocol (scheme) of the URL, for example, "http"
75	 */
76	string Protocol;
77
78	//-------------------------------------------------------------------------
79	/** contains the user-identifier of the URL, for example, "me"
80	 */
81	string User;
82
83	//-------------------------------------------------------------------------
84	/** contains the users password of the URL, for example, "pass"
85	 */
86	string Password;
87
88	//-------------------------------------------------------------------------
89	/** contains the server part of the URL, for example, "www.sun.de"
90	 */
91	string Server;
92
93	//-------------------------------------------------------------------------
94	/** contains the port at the server of the URL, for example, "8080"
95	 */
96	short Port;
97
98	//-------------------------------------------------------------------------
99	/** contains all segments but the last one of the hierarchical path of the URL, for example, "/pub/test/"
100	 */
101	string Path;
102
103	//-------------------------------------------------------------------------
104	/** contains the last segment of the hierarchical path of the URL, for the above example, "foo.txt"
105		<p>
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>
112	 */
113	string Name;
114
115	//-------------------------------------------------------------------------
116	/** contains the arguments part of the URL, for example, "a=b"
117	 */
118	string Arguments;
119
120	//-------------------------------------------------------------------------
121	/** contains the mark part of the URL, for example, "xyz"
122	 */
123	string Mark;
124
125};
126
127//=============================================================================
128
129}; }; }; };
130
131#endif
132