00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00027 #ifndef _COMMON_DATA_H_
00028 #define _COMMON_DATA_H_
00029
00030 #include <glib.h>
00031 #include <liberregxml/erregapi.h>
00032 #include "scanThread.h"
00033
00034 #define REDIRECT_URL "https://ids.irexnet.com:443/redirector"
00035
00036 #define MAX_WIRED_PROFILES 6
00037 #define MAX_WIRELESS_PROFILES 12
00038 #define MAX_DIALUP_PROFILES 6
00039
00040
00041 typedef enum
00042 {
00043 cmgrConnectUnknown_e,
00044 cmgrConnectIDS_e,
00045 cmgrConnectPCShare_e,
00046 cmgrConnectUndef_e
00047 } cmgrConnectType_t;
00048
00049 typedef struct
00050 {
00051 network_spec_t *scanSettings;
00052
00053
00054 regNetworkProfile_t **regSettingsList;
00055
00056
00057 int *regIndexList;
00058
00059 int nRegProfiles;
00060
00061
00062 int nActiveIndex;
00063 }networkProfile_t;
00064
00065 #ifdef __cplusplus
00066 extern "C"
00067 {
00068 #endif
00069
00070 void common_data_init(void);
00071 void common_data_destroy(void);
00072 void common_data_store(void);
00073
00074
00075 int common_data_get_n_profiles(void);
00076
00077
00078
00079 const regNetworkProfile_t* common_data_get_profiledata(const gint index);
00080 gboolean common_data_set_profiledata(gint index,
00081 const regNetworkProfile_t* setting,
00082 const gboolean preferred);
00083
00084
00085 guint common_data_remove_profile(guint index);
00086
00087
00088
00089 const regPCProfile_t* common_data_get_pcsharedata(const gint index);
00090
00091
00092
00093
00094
00095 gboolean common_data_reach_max_profiles(connection_t networkType);
00096
00097
00098 int common_data_init_network_profiles(connection_t networkType,
00099 networkProfile_t** pNetworks);
00100 void common_data_destroy_network_profiles(networkProfile_t* pNetworks,
00101 guint nProfiles);
00102 int common_data_get_profile_index(networkProfile_t* pNetworks,
00103 int nProfiles,
00104 int regIndex);
00105 int common_data_get_reg_index(networkProfile_t* pNetworks,
00106 int nProfiles,
00107 int profileIndex);
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111
00112
00113 #endif //_COMMON_DATA_H_
00114