]> git.decadent.org.uk Git - videolink.git/blobdiff - x_frame_buffer.hpp
Renamed various types to fit lower_case_with_underscores convention.
[videolink.git] / x_frame_buffer.hpp
diff --git a/x_frame_buffer.hpp b/x_frame_buffer.hpp
new file mode 100644 (file)
index 0000000..198d586
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2005 Ben Hutchings <ben@decadentplace.org.uk>.
+// See the file "COPYING" for licence details.
+
+#ifndef INC_X_FRAME_BUFFER_HPP
+#define INC_X_FRAME_BUFFER_HPP
+
+#include <memory>
+#include <string>
+
+#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<temp_file> auth_file_;
+    auto_kill_proc server_proc_;
+};
+
+#endif // !INC_X_FRAME_BUFFER_HPP