#ifndef CONFIG_H_ #define CONFIG_H_ #include #include enum dvd_access_method_t { dvdam_libdvdread, dvdam_libdvdnav }; // Access method for DVD content typedef struct mediapath_s { char *name; // Name by which the location is known in the GUI char *path; // Full pathname to the real location } mediapath_t; typedef struct mediapathlist_s { int count; // Number of path entries in list mediapath_t** list; // List of path entries } mediapathlist_t; // kissdx.h|Options object is used to store "Command Line Options" in order to populate correctly config object // The final configuration of kissdx is stored in kissdx.h|config object // Every action and/or decision inside kissdx should be decided upon config object values // - rules: integer value should not be stored in char* type of variable // - rules: flag value should be stored in short type of variable (only viewconfig translate it to yes(1)/no(0) typedef struct config_settings_s { char config_file[PATH_MAX]; // Location of configuration file parsed char audiopath[PATH_MAX]; char videopath[PATH_MAX]; char picturepath[PATH_MAX]; mediapathlist_t extra_audiopath_list; mediapathlist_t extra_videopath_list; mediapathlist_t extra_picturepath_list; char persistentstoragepath[PATH_MAX]; char kmlfwdurl[PATH_MAX]; char pretrigger[PATH_MAX]; char posttrigger[PATH_MAX]; char directorypretrigger[PATH_MAX]; char directoryposttrigger[PATH_MAX]; char audiofileextensions[255]; char videofileextensions[255]; char picturefileextensions[255]; char isofileextensions[255]; char server_character_set[64]; // Character set of FILENAMES ON SERVER char client_character_set[64]; // Character set of KiSS PLAYER char config_character_set[64]; // Character set of CONFIG FILE CONTENTS char playlist_character_set[64]; // Character set of PLAYLIST FILE CONTENTS char subtitle_catchall_pattern[PATH_MAX]; int picturetargetwidth; int picturetargetheight; int picturemaxzoompercent; int picturecachesize; int picturecachetrimminginterval; struct in_addr listenaddress; int networktimeoutinterval; char enablehiddenfilestext[128]; int enablehiddenfilesminutes; char recentlyusedfoldername[128]; // Free text for (Recently Used) feature int max_recent_files; // admin server configuration short adminserver_port; // Default recommanded is 8003 char serversignature[255]; // Signature of kissdx responding to UDP KiSS player broadcasting short configautoload; // yes(1)/no(0) Default is no enum dvd_access_method_t dvd_access_method; char renamefiletypes[255]; short listhiddenentries; // (do not hide entry starting with '.') char pidfilepath[PATH_MAX]; short displaysequencenumbers; } config_settings_t; extern config_settings_t config; // === Set of default language value for options extern const char *DefLang_recentlyUsedFolderName; //= "[Recently used]" extern const char *Default_serversignature; int parse_config(config_settings_t *config_p); void free_config(config_settings_t *config_p); void show_current_config_Verbose(const config_settings_t *config_p); void send_txt_config (int sd_client, const config_settings_t *config_p); #endif /*CONFIG_H_*/