00001 /* 00002 * This file is part of liberregxml. 00003 * 00004 * liberregxml 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 * liberregxml 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 00030 #ifndef _ERREG_NWPROFILES_H_ 00031 #define _ERREG_NWPROFILES_H_ 00032 00033 #include "erregtypes.h" 00034 #include "erregxml.h" 00035 #include "erreg.h" 00036 00037 // network profiles files 00038 #define REG_NWPROFILES_XML_FILE "nwprofiles.xml" 00039 #define REG_NWPROFILES_XSD_PATH TEMPLATE_DIR "/nwprofiles.xsd" 00040 00041 // default values for network profiles 00042 #define WIRED_NETWORK_NAME "Wired network" 00043 #define WIRELESS_NETWORK_NAME "Wireless network" 00044 00045 #define DEFAULT_WLAN_SSID "ereader" 00046 #define DEFAULT_WLAN_ENCRYPTION_TYPE encr_none_t 00047 #define DEFAULT_WLAN_ENCRYPTION_KEY "" 00048 #define DEFAULT_WLAN_BROADCAST TRUE 00049 00050 #define DEFAULT_ADDRESS_MODE dhcp_t 00051 00052 #define DEFAULT_USE_PROXY FALSE 00053 00054 #ifdef __cplusplus 00055 extern "C" 00056 { 00057 #endif 00058 00059 regLoad_t nwRegLoad (regRegistry_t** ppRegistry); 00060 void nwRegUnload (regRegistry_t* pRegistry); 00061 gboolean nwRegStore(regRegistry_t* pRegistry); 00062 00063 void nwRegInitXpathList(regRegistry_t *pRegistry); 00064 void nwRegDestroyXpathList(regRegistry_t *pRegistry); 00065 00066 int nwRegGetNetworkProfileFromList (const regNetworkConfig_t *pNetworkConfig, 00067 const char *ID); 00068 void nwRegAddNetworkProfileToList (regNetworkConfig_t **pNetworkConfig, 00069 regNetworkProfile_t ***pNetworks, regNetworkProfile_t *pNewNetworkProfile); 00070 void nwRegDeleteNetworkProfileFromList (regNetworkConfig_t **pNetworkConfig, 00071 regNetworkProfile_t ***pNetworks, const char *ID); 00072 void nwRegSetNetworkProfileDefault (regNetworkConfig_t **pNetworkConfig, 00073 regNetworkProfile_t ***pNetworks, const char *ID); 00074 00075 // internal functions 00076 regNetworkConfig_t *nwRegNewNetworkConfig(int size); 00077 regNetworkProfile_t *nwRegNewNetworkProfile(const char *ID, connection_t connection); 00078 void nwRegNewNetworkProfiles(regNetworkConfig_t **pNetworkConfig, regNetworkProfile_t ***pNetworks); 00079 00080 #ifdef __cplusplus 00081 } 00082 #endif 00083 00084 #endif// _ERREG_NWPROFILES_H_