df3e936830516326b322e69bb2a89fc49a6718cc
[libguestfs.git] / src / guestfs_protocol.x
1 /* libguestfs generated file
2  * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
3  * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
4  *
5  * Copyright (C) 2009 Red Hat Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 typedef string str<>;
23
24 /* guestfs_cat */
25
26 struct guestfs_cat_args {
27   string path<>;
28 };
29
30 struct guestfs_cat_ret {
31   string content<>;
32 };
33
34 /* guestfs_ll */
35
36 struct guestfs_ll_args {
37   string directory<>;
38 };
39
40 struct guestfs_ll_ret {
41   string listing<>;
42 };
43
44 /* guestfs_ls */
45
46 struct guestfs_ls_args {
47   string directory<>;
48 };
49
50 struct guestfs_ls_ret {
51   str listing<>;
52 };
53
54 /* guestfs_mount */
55
56 struct guestfs_mount_args {
57   string device<>;
58   string mountpoint<>;
59 };
60
61 /* guestfs_sync */
62
63 /* guestfs_touch */
64
65 struct guestfs_touch_args {
66   string path<>;
67 };
68
69 enum guestfs_procedure {
70   GUESTFS_PROC_CAT = 4,
71   GUESTFS_PROC_LL = 5,
72   GUESTFS_PROC_LS = 6,
73   GUESTFS_PROC_MOUNT = 1,
74   GUESTFS_PROC_SYNC = 2,
75   GUESTFS_PROC_TOUCH = 3,
76   GUESTFS_PROC_dummy
77 };
78
79 const GUESTFS_MESSAGE_MAX = 4194304;
80
81 const GUESTFS_PROGRAM = 0x2000F5F5;
82 const GUESTFS_PROTOCOL_VERSION = 1;
83
84 enum guestfs_message_direction {
85   GUESTFS_DIRECTION_CALL = 0,        /* client -> daemon */
86   GUESTFS_DIRECTION_REPLY = 1        /* daemon -> client */
87 };
88
89 enum guestfs_message_status {
90   GUESTFS_STATUS_OK = 0,
91   GUESTFS_STATUS_ERROR = 1
92 };
93
94 const GUESTFS_ERROR_LEN = 256;
95
96 struct guestfs_message_error {
97   string error<GUESTFS_ERROR_LEN>;   /* error message */
98 };
99
100 struct guestfs_message_header {
101   unsigned prog;                     /* GUESTFS_PROGRAM */
102   unsigned vers;                     /* GUESTFS_PROTOCOL_VERSION */
103   guestfs_procedure proc;            /* GUESTFS_PROC_x */
104   guestfs_message_direction direction;
105   unsigned serial;                   /* message serial number */
106   guestfs_message_status status;
107 };