//  
//   Rebex Sample Code License
// 
//   Copyright 2026, REBEX CR s.r.o.
//   All rights reserved.
//   https://www.rebex.net/
// 
//   Permission to use, copy, modify, and/or distribute this software for any
//   purpose with or without fee is hereby granted.
// 
//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
//   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
//   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
//   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//   OTHER DEALINGS IN THE SOFTWARE.
// 

using System;
using System.ComponentModel;

namespace Rebex.Samples
{
    /// <summary>
    /// Which componnent is the Connection GUI supposed to support.
    /// </summary>
    [Flags]
    public enum FileTransferComponent
    {
        [Description("FTP SSL")]	// NOTE - the description is used both for listbox and for the config file name!
        Ftp = 1,
        [Description("SFTP")]
        Sftp = 2,
        /// <summary>
        /// FileTransfer pack (both FTP and SFTP transfers)
        /// </summary>
        [Description("File Transfer")]
        FileTransfer = 3,
    }

    /// <summary>
    /// Type of proxy to use to connect to the network.
    /// </summary>
    /// <remarks>
    /// Underlying values are compatible with <code>Rebex.Net.FtpProxyType</code> enum (available in Rebex.Ftp assembly).<br/>
    /// Values 0 - 4 are also compatible with <code>Rebex.Net.ProxyType</code> enum (available in Rebex.Networking assembly).<br/>
    /// </remarks>
    public enum FileTransferProxyType
    {
        /// <summary>Direct connection.</summary>
        None = 0,
        /// <summary>Connection through Socks4 proxy.</summary>
        Socks4 = 1,
        /// <summary>Connection through Socks4A proxy (capable of resolving domain names).</summary>
        Socks4a = 2,
        /// <summary>Connection through Socks5 proxy.</summary>
        Socks5 = 3,
        /// <summary>Connection through HTTP proxy using CONNECT method.</summary>
        HttpConnect = 4,
        /// <summary>Connection through FTP proxy using SITE command.</summary>
        FtpSite = 5,
        /// <summary>Connection through FTP proxy using USER command.</summary>
        FtpUser = 6,
        /// <summary>Connection through FTP proxy using OPEN command.</summary>
        FtpOpen = 7,
    }

    /// <summary>
    /// How to verify server certificate in SSL communication.
    /// </summary>
    public enum CertificateVerifyingMode
    {
        /// <summary>
        /// Don't verify the server certificate - accept any certificate.
        /// </summary>
        AcceptAnyCertificate,
        /// <summary>
        /// Verify the server certificate against trusted certificates stored in Windows.
        /// </summary>
        UseWindowsInfrastructure,
        /// <summary>
        /// Verify the server certificate against localy stored certificate thumbprint (SH1 hash). 
        /// </summary>
        LocalyStoredThumbprint,
        /// <summary>
        /// Reject the server certificate
        /// </summary>
        RejectCertificate,
    }

    /// <summary>
    /// How to verify server key in SSH communication.
    /// </summary>
    public enum KeyVerifyingMode
    {
        /// <summary>
        /// Don't verify the server key - accept any key.
        /// </summary>
        AcceptAnyKey,
        /// <summary>
        /// Verify the server key against localy stored key fingerprint.
        /// </summary>
        LocalyStoredFingerprint,
        /// <summary>
        /// Reject the server key
        /// </summary>
        RejectKey,
    }

    public enum ResolveDialogMode
    {
        /// <summary>
        /// No stored entry which the actucal can compare to.
        /// </summary>
        EntryNotFound,
        /// <summary>
        /// Entry differs from the stored one.
        /// </summary>
        EntryDiffer,
    }
}
