1
2@namespace("keybase.1")
3protocol install {
4
5  import idl "common.avdl";
6
7  /**
8    Install status describes state of install for a component or service.
9    */
10  @go("nostring")
11  enum InstallStatus {
12    UNKNOWN_0,
13    ERROR_1,
14    NOT_INSTALLED_2,
15    INSTALLED_4
16  }
17
18  @go("nostring")
19  enum InstallAction {
20    UNKNOWN_0,
21    NONE_1, // Nothing to do
22    UPGRADE_2, // Upgrade from earlier version
23    REINSTALL_3, // Something bad happened and need re-install
24    INSTALL_4 // Installing (not installed)
25  }
26
27  record ServiceStatus {
28    string version;
29    string label;
30    string pid;
31    string lastExitStatus;
32    string bundleVersion;
33    InstallStatus installStatus;
34    InstallAction installAction;
35    Status status;
36  }
37
38  record ServicesStatus {
39    array<ServiceStatus> service;
40    array<ServiceStatus> kbfs;
41    array<ServiceStatus> updater;
42  }
43
44  record FuseMountInfo {
45    string path;
46    string fstype;
47    string output; // Output from mount, may be platform specific
48  }
49
50  record FuseStatus {
51    string version;
52    string bundleVersion;
53    string kextID;
54    string path;
55    boolean kextStarted;
56    InstallStatus installStatus;
57    InstallAction installAction;
58    array<FuseMountInfo> mountInfos;
59    Status status;
60  }
61
62  record ComponentResult {
63    string name;
64    Status status;
65    int exitCode;
66  }
67
68  record InstallResult {
69    array<ComponentResult> componentResults;
70    Status status;
71    boolean fatal;
72  }
73
74  record UninstallResult {
75    array<ComponentResult> componentResults;
76    Status status;
77  }
78
79  /*
80    Return status for Fuse install.
81    If you specify bundleVersion, it will tell you if an upgrade is needed.
82   */
83  FuseStatus fuseStatus(int sessionID, string bundleVersion);
84
85  /*
86    Install Fuse.
87   */
88  InstallResult installFuse();
89
90  /*
91    Install KBFS (including mount).
92   */
93  InstallResult installKBFS();
94
95  /*
96    Uninstalls KBFS (and Fuse, mount).
97   */
98  UninstallResult uninstallKBFS();
99
100  /*
101    Install command line via privileged helper.
102   */
103  InstallResult installCommandLinePrivileged();
104}
105