X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=x_frame_buffer.hpp;fp=x_frame_buffer.hpp;h=198d58619b1beb03138146771f34eae23d197f1a;hp=0000000000000000000000000000000000000000;hb=0acb5f1329d294faf42e247f8c2daf68d82150f6;hpb=1b6026c7baa122b99011f760857b80b7f253dfbb diff --git a/x_frame_buffer.hpp b/x_frame_buffer.hpp new file mode 100644 index 0000000..198d586 --- /dev/null +++ b/x_frame_buffer.hpp @@ -0,0 +1,29 @@ +// Copyright 2005 Ben Hutchings . +// See the file "COPYING" for licence details. + +#ifndef INC_X_FRAME_BUFFER_HPP +#define INC_X_FRAME_BUFFER_HPP + +#include +#include + +#include "auto_fd.hpp" +#include "auto_proc.hpp" +#include "temp_file.hpp" + +// Run Xvfb with a frame buffer of the given dimensions. +class x_frame_buffer +{ +public: + x_frame_buffer(int width, int height, int depth); + std::string get_authority() const; + std::string get_display() const; + +private: + auto_fd tcp4_socket_, tcp6_socket_; + int display_num_; + std::auto_ptr auth_file_; + auto_kill_proc server_proc_; +}; + +#endif // !INC_X_FRAME_BUFFER_HPP