2 * Copyright (C) 2010 Luca Barbieri
3 * Released under the terms of the Crawl General Public License.
13 virtual ~Connection() {}
15 virtual ptrdiff_t retrieve(void* buf
, size_t size
) = 0;
16 virtual ptrdiff_t transmit(const void* buf
, size_t size
) = 0;
20 Connection
* create_ssh_connection(const std::string
& host
, const char* host_hash
, const char* username
, const char* password
, const char* privkey
, unsigned rows
, unsigned cols
);
22 Connection
* create_telnet_connection(const std::string
& host
, unsigned port
, unsigned rows
, unsigned cols
);
24 Connection
* create_local_connection(const std::string
& command
, unsigned rows
, unsigned cols
);
25 #define create_local_connection create_local_connection
27 Connection
* create_ttyrec_connection(const std::string
& filename
);