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