
Go to the source code of this file.
Classes | |
| struct | pcShareCfg_t |
Defines | |
| #define | SHARE_MOUNT_POINT "/mnt/share" |
| #define | CONFIG_FILE "er_ctrl.xml" |
| #define | OVERWRITE_STRING_LEN 32 |
| #define | OVERWRITE_SETTING_XPATH "/ereaderControl/pcShare/download/overwriteItems" |
Functions | |
| pcShareCfg_t * | get_pc_share_settings () |
| void | free_pc_share_settings (pcShareCfg_t *thePCShareSettings) |
<File description>="">
Definition in file settings.h.
| #define CONFIG_FILE "er_ctrl.xml" |
Definition at line 34 of file settings.h.
| #define OVERWRITE_SETTING_XPATH "/ereaderControl/pcShare/download/overwriteItems" |
Definition at line 37 of file settings.h.
| #define OVERWRITE_STRING_LEN 32 |
Definition at line 35 of file settings.h.
| #define SHARE_MOUNT_POINT "/mnt/share" |
Definition at line 33 of file settings.h.
| void free_pc_share_settings | ( | pcShareCfg_t * | thePCShareSettings | ) |
Definition at line 95 of file settings.c.
00096 { 00097 DL_LOGPRINTF("entry"); 00098 g_free(thePCShareSettings); 00099 }
| pcShareCfg_t* get_pc_share_settings | ( | ) |
Definition at line 61 of file settings.c.
00062 { 00063 DL_LOGPRINTF("entry"); 00064 00065 // Open /mnt/share/iliad.xml 00066 char szCfgFilePath[MAX_PATH]; 00067 snprintf(szCfgFilePath, sizeof(szCfgFilePath), "%s/%s", SHARE_MOUNT_POINT, CONFIG_FILE); 00068 00069 erManifest manifest; 00070 if (RET_OK != ermXmlOpenFile(szCfgFilePath, &manifest)) 00071 { 00072 DL_ERRORPRINTF("Could not open manifest file [%s]", szCfgFilePath); 00073 return makeDefaultCfg(); 00074 } 00075 00076 pcShareCfg_t* thePCShareSettings = NULL; 00077 thePCShareSettings = g_new0(pcShareCfg_t, 1); 00078 00079 if (NULL == thePCShareSettings) 00080 { 00081 DL_ERRORPRINTF("Memory allocation failed."); 00082 g_assert_not_reached(); 00083 } 00084 00085 int ret = ermXmlGetBoolean(&manifest, OVERWRITE_SETTING_XPATH, &thePCShareSettings->overwrite); 00086 if (ret == RET_ERR) 00087 { 00088 thePCShareSettings->overwrite = FALSE; 00089 } 00090 00091 ermXmlClose(&manifest); 00092 return thePCShareSettings; 00093 }

1.5.6