00001 /* 00002 * This file is part of browser. 00003 * 00004 * browser is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * browser is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00026 /* browser - A mozilla based browser application on the eReader platform 00027 * Copyright (C) 2005-2008 iRex Technologies B.V. 00028 * 00029 */ 00030 #ifndef __BROWSER_SETTINGS_H__ 00031 #define __BROWSER_SETTINGS_H__ 00032 00033 #define PREF_ID NS_PREF_CONTRACTID 00034 #define MAX_SETTINGSPATH_LENGTH 128 00035 #define MAX_PROXY 15 00036 #define MAX_PROXY_PORT 5 00037 #define MAX_URL_SIZE 256 00038 00039 #define CONFIG_FILE_NAME "/config" 00040 #define STARTUP_FILE_NAME "/startup" 00041 00042 typedef struct _ProxySettings 00043 { 00044 gint direct_connection; 00045 gchar http_proxy[MAX_PROXY]; 00046 gchar http_proxy_port[MAX_PROXY_PORT]; 00047 gchar ftp_proxy[MAX_PROXY]; 00048 gchar ftp_proxy_port[MAX_PROXY_PORT]; 00049 gchar ssl_proxy[MAX_PROXY]; 00050 gchar ssl_proxy_port[MAX_PROXY]; 00051 gchar no_proxy_for[MAX_PROXY]; //one IP address wihtout proxy allowed 00052 } ProxySettings; 00053 00054 00055 typedef struct _BrowserSettings 00056 { 00057 ProxySettings theProxySettings; 00058 float zoom_factor; 00059 } BrowserSettings; 00060 00069 gboolean browser_settings_init(GtkMozEmbed *b); 00070 00076 gboolean browser_settings_store(void); 00077 00085 gboolean browser_settings_get(BrowserSettings* theBrowserSettings); 00086 00094 gboolean browser_settings_set_mozilla_settings(BrowserSettings* theBrowserSettings); 00095 00101 float browser_settings_get_zoom_factor(void); 00102 00108 void browser_settings_set_zoom_factor(float zoom_factor); 00109 00110 #endif //__BROWSER_SETTINGS_H__ 00111 00112 00113
1.5.6