xref: /aoo41x/main/offapi/com/sun/star/util/URL.idl (revision cdf0e10c)
1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_util_URL_idl__
28*cdf0e10cSrcweir#define __com_sun_star_util_URL_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir//=============================================================================
32*cdf0e10cSrcweir
33*cdf0e10cSrcweirmodule com {  module sun {  module star {  module util {
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir//=============================================================================
36*cdf0e10cSrcweir
37*cdf0e10cSrcweir/** represents the structure of an Uniform Resource Locator.
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir	<p>
40*cdf0e10cSrcweir	If the structure represents a valid URL or not depends on prior usage of
41*cdf0e10cSrcweir	the functions of <type>XURLTransformer</type>. Only after one of the functions
42*cdf0e10cSrcweir    returned <TRUE/> this can be assumed.</br>
43*cdf0e10cSrcweir	It is not necessary to set all of the fields; either <member>URL::Complete</member>
44*cdf0e10cSrcweir	or (some of) the others are set. Additionally, most of the other
45*cdf0e10cSrcweir	fields, like <member>URL::Host</member>, <member>URL::Port</member>,
46*cdf0e10cSrcweir	<member>URL::User</member>, <member>URL::Password</member>,
47*cdf0e10cSrcweir	or <member>URL::Mark</member>, are optional.
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir	@see XURLTransformer
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir	</p>
52*cdf0e10cSrcweir */
53*cdf0e10cSrcweirpublished struct URL
54*cdf0e10cSrcweir{
55*cdf0e10cSrcweir	/** contains the string representation of the complete URL, for example,
56*cdf0e10cSrcweir		http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir		<p>
59*cdf0e10cSrcweir		It is used as a central input/output or input parameter for the interfaces of
60*cdf0e10cSrcweir		<type>XURLTransformer</type>. The usage of one of the <type>XURLTransformer</type>
61*cdf0e10cSrcweir		function is mandatory to validate the URL. It cannot be assumed that
62*cdf0e10cSrcweir		<member>URL::Complete</member> represents always a valid URL!
63*cdf0e10cSrcweir		</p>
64*cdf0e10cSrcweir	 */
65*cdf0e10cSrcweir	string Complete;
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir	//-------------------------------------------------------------------------
68*cdf0e10cSrcweir	/** contains the URL without a mark and without arguments, for example,
69*cdf0e10cSrcweir		http://www.sun.de:8080/pub/test/foo.txt
70*cdf0e10cSrcweir	 */
71*cdf0e10cSrcweir	string Main;
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir	//-------------------------------------------------------------------------
74*cdf0e10cSrcweir	/** contains the protocol (scheme) of the URL, for example, "http"
75*cdf0e10cSrcweir	 */
76*cdf0e10cSrcweir	string Protocol;
77*cdf0e10cSrcweir
78*cdf0e10cSrcweir	//-------------------------------------------------------------------------
79*cdf0e10cSrcweir	/** contains the user-identifier of the URL, for example, "me"
80*cdf0e10cSrcweir	 */
81*cdf0e10cSrcweir	string User;
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir	//-------------------------------------------------------------------------
84*cdf0e10cSrcweir	/** contains the users password of the URL, for example, "pass"
85*cdf0e10cSrcweir	 */
86*cdf0e10cSrcweir	string Password;
87*cdf0e10cSrcweir
88*cdf0e10cSrcweir	//-------------------------------------------------------------------------
89*cdf0e10cSrcweir	/** contains the server part of the URL, for example, "www.sun.de"
90*cdf0e10cSrcweir	 */
91*cdf0e10cSrcweir	string Server;
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir	//-------------------------------------------------------------------------
94*cdf0e10cSrcweir	/** contains the port at the server of the URL, for example, "8080"
95*cdf0e10cSrcweir	 */
96*cdf0e10cSrcweir	short Port;
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir	//-------------------------------------------------------------------------
99*cdf0e10cSrcweir	/** contains all segments but the last one of the hierarchical path of the URL, for example, "/pub/test/"
100*cdf0e10cSrcweir	 */
101*cdf0e10cSrcweir	string Path;
102*cdf0e10cSrcweir
103*cdf0e10cSrcweir	//-------------------------------------------------------------------------
104*cdf0e10cSrcweir	/** contains the last segment of the hierarchical path of the URL, for the above example, "foo.txt"
105*cdf0e10cSrcweir		<p>
106*cdf0e10cSrcweir		<strong>Attention:</strong>A service implementing the <type>XURLTransformer</type> interface
107*cdf0e10cSrcweir		will normally not detect if the last segment is a folder or a file. So it is possible that
108*cdf0e10cSrcweir		the last segment describes a folder. If you want to be sure that a file URL that references
109*cdf0e10cSrcweir		a folder will be correctly put into the URL fields you should append a '/' at the end of the
110*cdf0e10cSrcweir		hierarchical path.
111*cdf0e10cSrcweir		</p>
112*cdf0e10cSrcweir	 */
113*cdf0e10cSrcweir	string Name;
114*cdf0e10cSrcweir
115*cdf0e10cSrcweir	//-------------------------------------------------------------------------
116*cdf0e10cSrcweir	/** contains the arguments part of the URL, for example, "a=b"
117*cdf0e10cSrcweir	 */
118*cdf0e10cSrcweir	string Arguments;
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir	//-------------------------------------------------------------------------
121*cdf0e10cSrcweir	/** contains the mark part of the URL, for example, "xyz"
122*cdf0e10cSrcweir	 */
123*cdf0e10cSrcweir	string Mark;
124*cdf0e10cSrcweir
125*cdf0e10cSrcweir};
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir//=============================================================================
128*cdf0e10cSrcweir
129*cdf0e10cSrcweir}; }; }; };
130*cdf0e10cSrcweir
131*cdf0e10cSrcweir#endif
132