GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-uri-utils.h
Go to the documentation of this file.
1 /*
2  * gnc-uri-utils.h -- utility functions to convert uri in separate
3  * components and back.
4  *
5  * Copyright (C) 2010 Geert Janssens <[email protected]>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, contact:
19  *
20  * Free Software Foundation Voice: +1-617-542-5942
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
22  * Boston, MA 02110-1301, USA [email protected]
23  */
24 
39 #ifndef GNCURIUTILS_H_
40 #define GNCURIUTILS_H_
41 
42 #define GNC_DATAFILE_EXT ".gnucash"
43 #define GNC_LOGFILE_EXT ".log"
44 
75 void gnc_uri_get_components (const gchar *uri,
76  gchar **protocol,
77  gchar **hostname,
78  gint32 *port,
79  gchar **username,
80  gchar **password,
81  gchar **path);
82 
102 gchar *gnc_uri_get_protocol (const gchar *uri);
103 
122 gchar *gnc_uri_get_path (const gchar *uri);
123 
153 gchar *gnc_uri_create_uri (const gchar *protocol,
154  const gchar *hostname,
155  gint32 port,
156  const gchar *username,
157  const gchar *password,
158  const gchar *path);
159 
182 gchar *gnc_uri_normalize_uri (const gchar *uri, gboolean allow_password);
183 
184 
191 gboolean gnc_uri_is_known_protocol (const gchar *protocol);
192 
201 gboolean gnc_uri_is_file_protocol (const gchar *protocol);
202 
211 gboolean gnc_uri_is_file_uri (const gchar *uri);
212 
226 gchar *gnc_uri_add_extension ( const gchar *uri, const gchar *extension );
227 
228 #endif /* GNCURIUTILS_H_ */
229 
gboolean gnc_uri_is_file_protocol(const gchar *protocol)
Definition: gnc-uri-utils.c:58
gboolean gnc_uri_is_file_uri(const gchar *uri)
Definition: gnc-uri-utils.c:71
gchar * gnc_uri_get_path(const gchar *uri)
gboolean gnc_uri_is_known_protocol(const gchar *protocol)
Definition: gnc-uri-utils.c:33
gchar * gnc_uri_normalize_uri(const gchar *uri, gboolean allow_password)
void gnc_uri_get_components(const gchar *uri, gchar **protocol, gchar **hostname, gint32 *port, gchar **username, gchar **password, gchar **path)
Definition: gnc-uri-utils.c:82
gchar * gnc_uri_add_extension(const gchar *uri, const gchar *extension)
gchar * gnc_uri_create_uri(const gchar *protocol, const gchar *hostname, gint32 port, const gchar *username, const gchar *password, const gchar *path)
gchar * gnc_uri_get_protocol(const gchar *uri)