]> git.decadent.org.uk Git - videolink.git/blob - x_frame_buffer.hpp
Treat beta versions as having a version component of -1
[videolink.git] / x_frame_buffer.hpp
1 // Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
3
4 #ifndef INC_X_FRAME_BUFFER_HPP
5 #define INC_X_FRAME_BUFFER_HPP
6
7 #include <memory>
8 #include <string>
9
10 #include "auto_fd.hpp"
11 #include "auto_proc.hpp"
12 #include "temp_file.hpp"
13
14 // Run Xvfb with a frame buffer of the given dimensions.
15 class x_frame_buffer
16 {
17 public:
18     x_frame_buffer(int width, int height, int depth);
19     std::string get_authority() const;
20     std::string get_display() const;
21
22 private:
23     auto_fd tcp4_socket_, tcp6_socket_;
24     int display_num_;
25     std::auto_ptr<temp_file> auth_file_;
26     auto_kill_proc server_proc_;
27 };
28
29 #endif // !INC_X_FRAME_BUFFER_HPP