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