xref: /aoo41x/main/offapi/com/sun/star/util/URL.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_util_URL_idl__
24#define __com_sun_star_util_URL_idl__
25
26
27//=============================================================================
28
29module com {  module sun {  module star {  module util {
30
31//=============================================================================
32
33/** represents the structure of an Uniform Resource Locator.
34
35	<p>
36	If the structure represents a valid URL or not depends on prior usage of
37	the functions of <type>XURLTransformer</type>. Only after one of the functions
38    returned <TRUE/> this can be assumed.</br>
39	It is not necessary to set all of the fields; either <member>URL::Complete</member>
40	or (some of) the others are set. Additionally, most of the other
41	fields, like <member>URL::Host</member>, <member>URL::Port</member>,
42	<member>URL::User</member>, <member>URL::Password</member>,
43	or <member>URL::Mark</member>, are optional.
44
45	@see XURLTransformer
46
47	</p>
48 */
49published struct URL
50{
51	/** contains the string representation of the complete URL, for example,
52		http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz
53
54		<p>
55		It is used as a central input/output or input parameter for the interfaces of
56		<type>XURLTransformer</type>. The usage of one of the <type>XURLTransformer</type>
57		function is mandatory to validate the URL. It cannot be assumed that
58		<member>URL::Complete</member> represents always a valid URL!
59		</p>
60	 */
61	string Complete;
62
63	//-------------------------------------------------------------------------
64	/** contains the URL without a mark and without arguments, for example,
65		http://www.sun.de:8080/pub/test/foo.txt
66	 */
67	string Main;
68
69	//-------------------------------------------------------------------------
70	/** contains the protocol (scheme) of the URL, for example, "http"
71	 */
72	string Protocol;
73
74	//-------------------------------------------------------------------------
75	/** contains the user-identifier of the URL, for example, "me"
76	 */
77	string User;
78
79	//-------------------------------------------------------------------------
80	/** contains the users password of the URL, for example, "pass"
81	 */
82	string Password;
83
84	//-------------------------------------------------------------------------
85	/** contains the server part of the URL, for example, "www.sun.de"
86	 */
87	string Server;
88
89	//-------------------------------------------------------------------------
90	/** contains the port at the server of the URL, for example, "8080"
91	 */
92	short Port;
93
94	//-------------------------------------------------------------------------
95	/** contains all segments but the last one of the hierarchical path of the URL, for example, "/pub/test/"
96	 */
97	string Path;
98
99	//-------------------------------------------------------------------------
100	/** contains the last segment of the hierarchical path of the URL, for the above example, "foo.txt"
101		<p>
102		<strong>Attention:</strong>A service implementing the <type>XURLTransformer</type> interface
103		will normally not detect if the last segment is a folder or a file. So it is possible that
104		the last segment describes a folder. If you want to be sure that a file URL that references
105		a folder will be correctly put into the URL fields you should append a '/' at the end of the
106		hierarchical path.
107		</p>
108	 */
109	string Name;
110
111	//-------------------------------------------------------------------------
112	/** contains the arguments part of the URL, for example, "a=b"
113	 */
114	string Arguments;
115
116	//-------------------------------------------------------------------------
117	/** contains the mark part of the URL, for example, "xyz"
118	 */
119	string Mark;
120
121};
122
123//=============================================================================
124
125}; }; }; };
126
127#endif
128