|
GnuCash 2.4.99
|
00001 /* 00002 * gnc-uri-utils.h -- utility functions to convert uri in separate 00003 * components and back. 00004 * 00005 * Copyright (C) 2010 Geert Janssens <janssens.geert@telenet.be> 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License as 00009 * published by the Free Software Foundation; either version 2 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, contact: 00019 * 00020 * Free Software Foundation Voice: +1-617-542-5942 00021 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00022 * Boston, MA 02110-1301, USA gnu@gnu.org 00023 */ 00024 00039 #ifndef GNCURIUTILS_H_ 00040 #define GNCURIUTILS_H_ 00041 00042 #define GNC_DATAFILE_EXT ".gnucash" 00043 #define GNC_LOGFILE_EXT ".log" 00044 00075 void gnc_uri_get_components (const gchar *uri, 00076 gchar **protocol, 00077 gchar **hostname, 00078 gint32 *port, 00079 gchar **username, 00080 gchar **password, 00081 gchar **path); 00082 00102 gchar *gnc_uri_get_protocol (const gchar *uri); 00103 00122 gchar *gnc_uri_get_path (const gchar *uri); 00123 00153 gchar *gnc_uri_create_uri (const gchar *protocol, 00154 const gchar *hostname, 00155 gint32 port, 00156 const gchar *username, 00157 const gchar *password, 00158 const gchar *path); 00159 00182 gchar *gnc_uri_normalize_uri (const gchar *uri, gboolean allow_password); 00183 00184 00191 gboolean gnc_uri_is_known_protocol (const gchar *protocol); 00192 00201 gboolean gnc_uri_is_file_protocol (const gchar *protocol); 00202 00211 gboolean gnc_uri_is_file_uri (const gchar *uri); 00212 00226 gchar *gnc_uri_add_extension ( const gchar *uri, const gchar *extension ); 00227 00228 #endif /* GNCURIUTILS_H_ */ 00229
1.7.4