Implement list-devices and list-partitions.
[libguestfs.git] / src / guestfs_protocol.x
index 59bad58..be0efdb 100644 (file)
@@ -1,5 +1,8 @@
-/* libguestfs
- * Copyright (C) 2009 Red Hat Inc. 
+/* libguestfs generated file
+ * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
+ * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
+ *
+ * Copyright (C) 2009 Red Hat Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * This file describes the client [library] to server [daemon in
- * guest] protocol.  As far as possible, all code in the library is
- * automatically generated from this protocol description using
- * rpcgen and the perl script 'generator.pl'.
  */
+
+typedef string str<>;
+
+/* guestfs_mount */
+
+struct guestfs_mount_args {
+  string device<>;
+  string mountpoint<>;
+};
+
+/* guestfs_sync */
+
+/* guestfs_touch */
+
+struct guestfs_touch_args {
+  string path<>;
+};
+
+/* guestfs_cat */
+
+struct guestfs_cat_args {
+  string path<>;
+};
+
+struct guestfs_cat_ret {
+  string content<>;
+};
+
+/* guestfs_ll */
+
+struct guestfs_ll_args {
+  string directory<>;
+};
+
+struct guestfs_ll_ret {
+  string listing<>;
+};
+
+/* guestfs_ls */
+
+struct guestfs_ls_args {
+  string directory<>;
+};
+
+struct guestfs_ls_ret {
+  str listing<>;
+};
+
+/* guestfs_list_devices */
+
+struct guestfs_list_devices_ret {
+  str devices<>;
+};
+
+/* guestfs_list_partitions */
+
+struct guestfs_list_partitions_ret {
+  str partitions<>;
+};
+
+enum guestfs_procedure {
+  GUESTFS_PROC_MOUNT = 1,
+  GUESTFS_PROC_SYNC = 2,
+  GUESTFS_PROC_TOUCH = 3,
+  GUESTFS_PROC_CAT = 4,
+  GUESTFS_PROC_LL = 5,
+  GUESTFS_PROC_LS = 6,
+  GUESTFS_PROC_LIST_DEVICES = 7,
+  GUESTFS_PROC_LIST_PARTITIONS = 8,
+  GUESTFS_PROC_dummy
+};
+
+const GUESTFS_MESSAGE_MAX = 4194304;
+
+const GUESTFS_PROGRAM = 0x2000F5F5;
+const GUESTFS_PROTOCOL_VERSION = 1;
+
+enum guestfs_message_direction {
+  GUESTFS_DIRECTION_CALL = 0,        /* client -> daemon */
+  GUESTFS_DIRECTION_REPLY = 1        /* daemon -> client */
+};
+
+enum guestfs_message_status {
+  GUESTFS_STATUS_OK = 0,
+  GUESTFS_STATUS_ERROR = 1
+};
+
+const GUESTFS_ERROR_LEN = 256;
+
+struct guestfs_message_error {
+  string error<GUESTFS_ERROR_LEN>;   /* error message */
+};
+
+struct guestfs_message_header {
+  unsigned prog;                     /* GUESTFS_PROGRAM */
+  unsigned vers;                     /* GUESTFS_PROTOCOL_VERSION */
+  guestfs_procedure proc;            /* GUESTFS_PROC_x */
+  guestfs_message_direction direction;
+  unsigned serial;                   /* message serial number */
+  guestfs_message_status status;
+};