using System; using System.Collections.Generic; using System.Net.Sockets; using System.Text; using Renci.SshNet.Common; using Renci.SshNet.Connection; using Renci.SshNet.NetConf; using Renci.SshNet.Security; using Renci.SshNet.Sftp; namespace Renci.SshNet { /// /// Factory for creating new services. /// internal partial interface IServiceFactory { /// /// Creates an . /// /// /// An . /// IClientAuthentication CreateClientAuthentication(); /// /// Creates a new in a given /// and with the specified operation timeout. /// /// The to create the in. /// The number of milliseconds to wait for an operation to complete, or -1 to wait indefinitely. /// /// An . /// INetConfSession CreateNetConfSession(ISession session, int operationTimeout); /// /// Creates a new with the specified and /// . /// /// The to use for creating a new session. /// A factory to create instances. /// /// An for the specified . /// /// is . /// is . ISession CreateSession(ConnectionInfo connectionInfo, ISocketFactory socketFactory); /// /// Creates a new in a given and with /// the specified operation timeout and encoding. /// /// The to create the in. /// The number of milliseconds to wait for an operation to complete, or -1 to wait indefinitely. /// The encoding. /// The factory to use for creating SFTP messages. /// /// An . /// ISftpSession CreateSftpSession(ISession session, int operationTimeout, Encoding encoding, ISftpResponseFactory sftpMessageFactory); /// /// Create a new . /// /// /// A . /// PipeStream CreatePipeStream(); /// /// Negotiates a key exchange algorithm, and creates a for the negotiated /// algorithm. /// /// A of the key exchange algorithms supported by the client where the key is the name of the algorithm, and the value is the type implementing this algorithm. /// The names of the key exchange algorithms supported by the SSH server. /// /// A that was negotiated between client and server. /// /// is . /// is . /// No key exchange algorithm is supported by both client and server. IKeyExchange CreateKeyExchange(IDictionary clientAlgorithms, string[] serverAlgorithms); /// /// Creates an for the specified file and with the specified /// buffer size. /// /// The file to read. /// The SFTP session to use. /// The size of buffer. /// /// An . /// ISftpFileReader CreateSftpFileReader(string fileName, ISftpSession sftpSession, uint bufferSize); /// /// Creates a new instance. /// /// /// An . /// ISftpResponseFactory CreateSftpResponseFactory(); /// /// Creates a shell stream. /// /// The SSH session. /// The TERM environment variable. /// The terminal width in columns. /// The terminal width in rows. /// The terminal width in pixels. /// The terminal height in pixels. /// The terminal mode values. /// Size of the buffer. /// /// The created instance. /// /// Client is not connected. /// /// /// The TERM environment variable contains an identifier for the text window's capabilities. /// You can get a detailed list of these cababilities by using the ‘infocmp’ command. /// /// /// The column/row dimensions override the pixel dimensions(when non-zero). Pixel dimensions refer /// to the drawable area of the window. /// /// ShellStream CreateShellStream(ISession session, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary terminalModeValues, int bufferSize); /// /// Creates an that encloses a path in double quotes, and escapes /// any embedded double quote with a backslash. /// /// /// An that encloses a path in double quotes, and escapes any /// embedded double quote with a backslash. /// with a shell. /// IRemotePathTransformation CreateRemotePathDoubleQuoteTransformation(); /// /// Creates an that can be used to establish a connection /// to the server identified by the specified . /// /// A detailing the server to establish a connection to. /// A factory to create instances. /// /// An that can be used to establish a connection to the /// server identified by the specified . /// /// is . /// is . /// The value of is not supported. IConnector CreateConnector(IConnectionInfo connectionInfo, ISocketFactory socketFactory); /// /// Creates an that deals with the SSH protocol /// version exchange. /// /// /// An . /// IProtocolVersionExchange CreateProtocolVersionExchange(); /// /// Creates a factory to create instances. /// /// /// An . /// ISocketFactory CreateSocketFactory(); } }