1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* e-url.h
3  *
4  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5  *
6  * This library is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Authors: Jon Trowbridge <trow@ximian.com>
19  *          Rodrigo Moya <rodrigo@ximian.com>
20  */
21 
22 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
23 #error "Only <libedataserver/libedataserver.h> should be included directly."
24 #endif
25 
26 #ifndef EDS_DISABLE_DEPRECATED
27 
28 /* Do not generate bindings. */
29 #ifndef __GI_SCANNER__
30 
31 #ifndef E_URL_H
32 #define E_URL_H
33 
34 #include <glib.h>
35 
36 G_BEGIN_DECLS
37 
38 typedef struct _EUri EUri;
39 
40 /**
41  * EUri:
42  * @protocol: The protocol to use.
43  * @user: A user name.
44  * @authmech: The authentication mechanism.
45  * @passwd: The connection password.
46  * @host: The host name.
47  * @port: The port number.
48  * @path: The file path on the host.
49  * @params: Additional parameters.
50  * @query: The URI query.
51  * @fragment: The URI fragment.
52  *
53  * A structure representing a URI.
54  **/
55 struct _EUri {
56 	gchar *protocol;
57 	gchar *user;
58 	gchar *authmech;
59 	gchar *passwd;
60 	gchar *host;
61 	gint port;
62 	gchar *path;
63 	GData *params;
64 	gchar *query;
65 	gchar *fragment;
66 };
67 
68 EUri *		e_uri_new			(const gchar *uri_string);
69 void		e_uri_free			(EUri *uri);
70 const gchar *	e_uri_get_param			(EUri *uri,
71 						 const gchar *name);
72 EUri *		e_uri_copy			(EUri *uri);
73 gchar *		e_uri_to_string			(EUri *uri,
74 						 gboolean show_password);
75 gchar *		e_url_shroud			(const gchar *url);
76 gboolean	e_url_equal			(const gchar *url1,
77 						 const gchar *url2);
78 
79 G_END_DECLS
80 
81 #endif /* E_URL_H */
82 
83 #endif /* __GI_SCANNER__ */
84 
85 #endif /* EDS_DISABLE_DEPRECATED */
86 
87