"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/interface/Options.h" between
FileZilla_3.48.0_src.tar.bz2 and FileZilla_3.48.1_src.tar.bz2

About: FileZilla is a fast and feature-rich cross-platform FTP, FTPS and SFTP client with an intuitive graphical user interface.

Options.h  (FileZilla_3.48.0_src.tar.bz2):Options.h  (FileZilla_3.48.1_src.tar.bz2)
skipping to change at line 116 skipping to change at line 116
OPTION_DEFAULT_CACHE_DIR, OPTION_DEFAULT_CACHE_DIR,
// Has to be last element // Has to be last element
OPTIONS_NUM OPTIONS_NUM
}; };
struct t_OptionsCache struct t_OptionsCache
{ {
bool operator==(std::wstring_view const& v) const { return strValue == v; } bool operator==(std::wstring_view const& v) const { return strValue == v; }
bool operator==(int v) const { return numValue == v; } bool operator==(int v) const { return numValue == v; }
bool operator==(std::unique_ptr<pugi::xml_document> const& v) const { ret urn *xmlValue == *v; } bool operator==(pugi::xml_document const& v) const { return xmlValue == v ; }
t_OptionsCache& operator=(std::wstring_view const& v); t_OptionsCache& operator=(std::wstring_view const& v);
t_OptionsCache& operator=(std::wstring && v); t_OptionsCache& operator=(std::wstring && v);
t_OptionsCache& operator=(int v); t_OptionsCache& operator=(int v);
t_OptionsCache& operator=(std::unique_ptr<pugi::xml_document> const& v); t_OptionsCache& operator=(pugi::xml_document const& v);
t_OptionsCache& operator=(pugi::xml_document && v);
bool from_default; bool from_default;
int numValue; int numValue;
std::wstring strValue; std::wstring strValue;
std::unique_ptr<pugi::xml_document> xmlValue; pugi::xml_document xmlValue;
}; };
std::wstring GetEnv(char const* name); std::wstring GetEnv(char const* name);
class CXmlFile; class CXmlFile;
class COptions final : public wxEvtHandler, public COptionsBase class COptions final : public wxEvtHandler, public COptionsBase
{ {
public: public:
virtual int GetOptionVal(unsigned int nID); virtual int GetOptionVal(unsigned int nID);
virtual std::wstring GetOption(unsigned int nID); virtual std::wstring GetOption(unsigned int nID);
virtual std::unique_ptr<pugi::xml_document> GetOptionXml(unsigned int nID ); virtual pugi::xml_document GetOptionXml(unsigned int nID);
virtual bool SetOption(unsigned int nID, int value); virtual bool SetOption(unsigned int nID, int value);
virtual bool SetOption(unsigned int nID, std::wstring_view const& value); virtual bool SetOption(unsigned int nID, std::wstring_view const& value);
virtual bool SetOptionXml(unsigned int nID, pugi::xml_node const& value); virtual bool SetOptionXml(unsigned int nID, pugi::xml_node const& value);
bool OptionFromFzDefaultsXml(unsigned int nID); bool OptionFromFzDefaultsXml(unsigned int nID);
static COptions* Get(); static COptions* Get();
static void Init(); static void Init();
static void Destroy(); static void Destroy();
skipping to change at line 162 skipping to change at line 163
static CLocalPath GetUnadjustedSettingsDir(); static CLocalPath GetUnadjustedSettingsDir();
CLocalPath GetCacheDirectory(); CLocalPath GetCacheDirectory();
protected: protected:
COptions(); COptions();
virtual ~COptions(); virtual ~COptions();
int Validate(unsigned int nID, int value); int Validate(unsigned int nID, int value);
std::wstring Validate(unsigned int nID, std::wstring_view const& value); std::wstring Validate(unsigned int nID, std::wstring_view const& value);
std::unique_ptr<pugi::xml_document> Validate(unsigned int nID, std::uniqu e_ptr<pugi::xml_document> const& value); pugi::xml_document Validate(unsigned int nID, pugi::xml_document const& v alue);
template<typename T> void ContinueSetOption(unsigned int nID, T const& va lue); template<typename T> void ContinueSetOption(unsigned int nID, T const& va lue);
void SetXmlValue(unsigned int nID, int value); void SetXmlValue(unsigned int nID, pugi::xml_node settings, int value);
void SetXmlValue(unsigned int nID, std::wstring_view const& value); void SetXmlValue(unsigned int nID, pugi::xml_node settings, std::wstring_
void SetXmlValue(unsigned int nID, std::unique_ptr<pugi::xml_document> co view const& value);
nst& value); void SetXmlValue(unsigned int nID, pugi::xml_node settings, pugi::xml_doc
ument const& value);
pugi::xml_node CreateSettingsXmlElement(); pugi::xml_node CreateSettingsXmlElement();
std::map<std::string, unsigned int> GetNameOptionMap() const; std::map<std::string, unsigned int> GetNameOptionMap() const;
void LoadOptions(std::map<std::string, unsigned int> const& nameOptionMap , pugi::xml_node settings = pugi::xml_node()); void LoadOptions(std::map<std::string, unsigned int> const& nameOptionMap , pugi::xml_node settings = pugi::xml_node());
void LoadGlobalDefaultOptions(std::map<std::string, unsigned int> const& nameOptionMap); void LoadGlobalDefaultOptions(std::map<std::string, unsigned int> const& nameOptionMap);
void LoadOptionFromElement(pugi::xml_node option, std::map<std::string, u nsigned int> const& nameOptionMap, bool allowDefault); void LoadOptionFromElement(pugi::xml_node option, std::map<std::string, u nsigned int> const& nameOptionMap, bool allowDefault);
CLocalPath InitSettingsDir(); CLocalPath InitSettingsDir();
void SetDefaultValues(); void SetDefaultValues();
void WriteCacheToXml(pugi::xml_node settings);
bool Cleanup(); // Removes all unknown elements from the XML bool Cleanup(); // Removes all unknown elements from the XML
void Save(); void Save();
void NotifyChangedOptions(); void NotifyChangedOptions();
std::unique_ptr<CXmlFile> xmlFile_; std::unique_ptr<CXmlFile> xmlFile_;
t_OptionsCache m_optionsCache[OPTIONS_NUM]; t_OptionsCache m_optionsCache[OPTIONS_NUM];
 End of changes. 7 change blocks. 
9 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)