C++11 tidying.
[dcpomatic.git] / src / lib / disk_writer_messages.h
index 61cdbcfbddebaa3c119ebf5d092163a5b7b45334..ab86f083e57d2d45d47627fae090720731028415 100644 (file)
 
 */
 
-/* dcpomatic_disk_writer receives
+/* We have the front-end application dcpomatic2_disk and the back-end
+ * dcpomatic2_disk_writer.  The communication is line-based, separated
+ * by \n.
+ */
 
-DCP pathname\n
-Internal name of drive to write to\n
+/* PING */
 
-   Then responds with one of the following.
-*/
+// Front-end sends:
 
-/** Write finished and everything was OK, e.g.
+#define DISK_WRITER_PING "P"
 
-D\n
+// Back-end responds
 
-*/
-#define DISK_WRITER_OK "D"
+#define DISK_WRITER_PONG "O"
 
-/** There was an error.  Following this will come
+/* REQUEST TO WRITE DCP */
 
-error message\n
-error number\n
+// Front-end sends:
 
-e.g.
+#define DISK_WRITER_WRITE "W"
+// DCP pathname
+// Internal name of the drive to write to
 
-E\n
-Disc full\n
-42\n
+// Back-end responds:
 
-*/
+// everything is ok
+#define DISK_WRITER_OK "D"
+
+// there was an error
 #define DISK_WRITER_ERROR "E"
+// Error message
+// Error number
 
-/** The disk writer is formatting the drive.  It is not possible
- *  to give progress reports on this so the writer just tells us
- *  it's happening.  This is finished when DISK_WRITER_PROGRESS
- *  messages start arriving
- */
-#define DISK_WRITER_FORMATTING "F"
+// the drive is being formatted, 40% done
+#define DISK_WRITER_FORMAT_PROGRESS "F"
+// 0.4\n
 
-/** Some progress has been made in the main "copy" part of the task.
- *  Following this will come
+// data is being copied, 30% done
+#define DISK_WRITER_COPY_PROGRESS "C"
+// 0.3\n
 
-progress as a float from 0 to 1\n
+// data is being verified, 60% done
+#define DISK_WRITER_VERIFY_PROGRESS "V"
+// 0.6\n
 
-e.g.
 
-P\n
-0.3\n
+/* REQUEST TO QUIT */
 
-*/
-#define DISK_WRITER_PROGRESS "P"
+// Front-end sends:
+#define DISK_WRITER_QUIT "Q"
 
-/** dcpomatic_disk_writer may also receive
 
-Q\n
+/* REQUEST TO UNMOUNT A DRIVE */
 
-as a request to quit.
-*/
-#define DISK_WRITER_QUIT "Q"
+// Front-end sends:
+#define DISK_WRITER_UNMOUNT "U"
+// XML representation of Drive object to unmount
+
+// Back-end responds:
+// DISK_WRITER_OK
+// or
+// DISK_WRITER_ERROR