"Fossies" - the Fresh Open Source Software Archive

Member "filezilla-3.48.1/src/include/optionsbase.h" (8 May 2020, 2707 Bytes) of package /linux/misc/FileZilla_3.48.1_src.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "optionsbase.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.48.0_vs_3.48.1.

    1 #ifndef FILEZILLA_ENGINE_OPTIONSBASE_HEADER
    2 #define FILEZILLA_ENGINE_OPTIONSBASE_HEADER
    3 
    4 // The engine of FileZilla 3 can be configured using a few settings.
    5 // In order to read and set the settings, the engine has to be passed
    6 // a pointer to a COptionsBase object.
    7 // Since COptionsBase is virtual, the user of the engine has to create a
    8 // derived class which handles settings-reading and writing.
    9 
   10 #include <memory>
   11 
   12 enum engineOptions
   13 {
   14     OPTION_USEPASV,         // Use passive mode unless overridden by
   15                             // server settings
   16     OPTION_LIMITPORTS,
   17     OPTION_LIMITPORTS_LOW,
   18     OPTION_LIMITPORTS_HIGH,
   19     OPTION_LIMITPORTS_OFFSET,
   20     OPTION_EXTERNALIPMODE,      /* External IP Address mode for use in active mode
   21                                    Values: 0: ask operating system
   22                                            1: use provided IP
   23                                            2: use provided resolver
   24                                 */
   25     OPTION_EXTERNALIP,
   26     OPTION_EXTERNALIPRESOLVER,
   27     OPTION_LASTRESOLVEDIP,
   28     OPTION_NOEXTERNALONLOCAL,   // Don't use external IP address if connection is
   29                                 // coming from a local unroutable address
   30     OPTION_PASVREPLYFALLBACKMODE,
   31     OPTION_TIMEOUT,
   32     OPTION_LOGGING_DEBUGLEVEL,
   33     OPTION_LOGGING_RAWLISTING,
   34 
   35     OPTION_FZSFTP_EXECUTABLE,   // full path to fzsftp executable
   36     OPTION_FZSTORJ_EXECUTABLE,
   37 
   38     OPTION_ALLOW_TRANSFERMODEFALLBACK, // If PORT fails, allow PASV and vice versa
   39 
   40     OPTION_RECONNECTCOUNT,
   41     OPTION_RECONNECTDELAY,
   42 
   43     OPTION_SPEEDLIMIT_ENABLE,
   44     OPTION_SPEEDLIMIT_INBOUND,
   45     OPTION_SPEEDLIMIT_OUTBOUND,
   46     OPTION_SPEEDLIMIT_BURSTTOLERANCE,
   47 
   48     OPTION_PREALLOCATE_SPACE,
   49 
   50     OPTION_VIEW_HIDDEN_FILES,
   51 
   52     OPTION_PRESERVE_TIMESTAMPS,
   53 
   54     OPTION_SOCKET_BUFFERSIZE_RECV,
   55     OPTION_SOCKET_BUFFERSIZE_SEND,
   56 
   57     OPTION_FTP_SENDKEEPALIVE,
   58 
   59     OPTION_FTP_PROXY_TYPE,
   60     OPTION_FTP_PROXY_HOST,
   61     OPTION_FTP_PROXY_USER,
   62     OPTION_FTP_PROXY_PASS,
   63     OPTION_FTP_PROXY_CUSTOMLOGINSEQUENCE,
   64 
   65     OPTION_SFTP_KEYFILES,
   66     OPTION_SFTP_COMPRESSION,
   67 
   68     OPTION_PROXY_TYPE,
   69     OPTION_PROXY_HOST,
   70     OPTION_PROXY_PORT,
   71     OPTION_PROXY_USER,
   72     OPTION_PROXY_PASS,
   73 
   74     OPTION_LOGGING_FILE,
   75     OPTION_LOGGING_FILE_SIZELIMIT,
   76     OPTION_LOGGING_SHOW_DETAILED_LOGS,
   77 
   78     OPTION_SIZE_FORMAT,
   79     OPTION_SIZE_USETHOUSANDSEP,
   80     OPTION_SIZE_DECIMALPLACES,
   81 
   82     OPTION_TCP_KEEPALIVE_INTERVAL,
   83 
   84     OPTION_CACHE_TTL,
   85 
   86     OPTIONS_ENGINE_NUM
   87 };
   88 
   89 namespace pugi {
   90 class xml_document;
   91 class xml_node;
   92 }
   93 
   94 class COptionsBase
   95 {
   96 public:
   97     virtual ~COptionsBase() noexcept = default;
   98     virtual int GetOptionVal(unsigned int nID) = 0;
   99     virtual std::wstring GetOption(unsigned int nID) = 0;
  100     virtual pugi::xml_document GetOptionXml(unsigned int nID) = 0;
  101 
  102     virtual bool SetOption(unsigned int nID, int value) = 0;
  103     virtual bool SetOption(unsigned int nID, std::wstring_view const& value) = 0;
  104     virtual bool SetOptionXml(unsigned int nID, pugi::xml_node const& value) = 0;
  105 };
  106 
  107 #endif