20 #if !defined(__MITSUBA_CORE_SSHSTREAM_H_)
21 #define __MITSUBA_CORE_SSHSTREAM_H_
23 #include <mitsuba/mitsuba.h>
24 #include <boost/scoped_ptr.hpp>
68 const std::string &hostName,
69 const std::vector<std::string> &cmdLine,
70 int port = 22,
int timeout = 10
84 const std::string &getUserName()
const;
87 size_t getReceivedBytes()
const;
90 size_t getSentBytes()
const;
99 void read(
void *ptr,
size_t size);
100 void write(
const void *ptr,
size_t size);
101 void seek(
size_t pos);
125 struct SSHStreamPrivate;
126 boost::scoped_ptr<SSHStreamPrivate> d;
virtual void flush()=0
Flush the stream's buffers.
virtual bool canRead() const =0
Can we read from the stream?
#define MTS_EXPORT_CORE
Definition: getopt.h:29
virtual bool canWrite() const =0
Can we write to the stream?
virtual void read(void *ptr, size_t size)=0
Read a specified amount of data from the stream.
Stream implementation based on an encrypted SSH tunnel.
Definition: sshstream.h:48
Abstract seekable stream class.
Definition: stream.h:58
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
virtual void write(const void *ptr, size_t size)=0
Write a specified amount of data into the stream.
MTS_EXPORT_CORE std::string getHostName()
Return the host name of this machine.
virtual size_t getPos() const =0
Get the current position inside the stream.
virtual std::string toString() const
Return a string representation.
virtual void seek(size_t pos)=0
Seek to a position inside the stream.
virtual size_t getSize() const =0
Return the size of the stream.
virtual void truncate(size_t size)=0
Truncate the stream to a given size.