Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / libedataserver / e-url.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /*
4  * e-url.h
5  *
6  * Copyright (C) 2001 Ximian, Inc.
7  *
8  * Developed by Jon Trowbridge <trow@ximian.com>
9  *              Rodrigo Moya   <rodrigo@ximian.com>
10  */
11
12 /*
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of version 2 of the GNU Lesser General Public
15  * License as published by the Free Software Foundation.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU Lesser General Public License for more details.
21  * 
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
25  * USA.
26  */
27
28 #ifndef __E_URL_H__
29 #define __E_URL_H__
30
31 #include <glib.h>
32
33 G_BEGIN_DECLS
34
35 char *e_url_shroud (const char *url);
36 gboolean e_url_equal (const char *url1, const char *url2);
37
38 /**
39  * EUri:
40  * @protocol: The protocol to use.
41  * @user: A user name.
42  * @authmech: The authentication mechanism.
43  * @passwd: The connection password.
44  * @host: The host name.
45  * @port: The port number.
46  * @path: The file path on the host.
47  * @params: Additional parameters.
48  * @query:
49  * @fragment:
50  *
51  * A structure representing a URI.
52  **/
53 typedef struct {
54         char  *protocol;
55         char  *user;
56         char  *authmech;
57         char  *passwd;
58         char  *host;
59         int    port;
60         char  *path;
61         GData *params;
62         char  *query;
63         char  *fragment;
64 } EUri;
65
66 EUri       *e_uri_new       (const char *uri_string);
67 void        e_uri_free      (EUri *uri);
68 const char *e_uri_get_param (EUri *uri, const char *name);
69 EUri       *e_uri_copy      (EUri *uri);
70 char       *e_uri_to_string (EUri *uri, gboolean show_password);
71
72 G_END_DECLS
73
74 #endif /* __E_URL_H__ */
75