1 // This code was autogenerated with `dbus-codegen-rust -s -m None`, see https://github.com/diwic/dbus-rs 2 use dbus as dbus; 3 #[allow(unused_imports)] 4 use dbus::arg; 5 use dbus::blocking; 6 7 pub trait OrgChromiumSpaced { get_free_disk_space(&self, path: &str) -> Result<i64, dbus::Error>8 fn get_free_disk_space(&self, path: &str) -> Result<i64, dbus::Error>; get_total_disk_space(&self, path: &str) -> Result<i64, dbus::Error>9 fn get_total_disk_space(&self, path: &str) -> Result<i64, dbus::Error>; get_root_device_size(&self) -> Result<i64, dbus::Error>10 fn get_root_device_size(&self) -> Result<i64, dbus::Error>; is_quota_supported(&self, path: &str) -> Result<bool, dbus::Error>11 fn is_quota_supported(&self, path: &str) -> Result<bool, dbus::Error>; get_quota_current_space_for_uid(&self, path: &str, uid: u32) -> Result<i64, dbus::Error>12 fn get_quota_current_space_for_uid(&self, path: &str, uid: u32) -> Result<i64, dbus::Error>; get_quota_current_space_for_gid(&self, path: &str, gid: u32) -> Result<i64, dbus::Error>13 fn get_quota_current_space_for_gid(&self, path: &str, gid: u32) -> Result<i64, dbus::Error>; get_quota_current_space_for_project_id(&self, path: &str, project_id: u32) -> Result<i64, dbus::Error>14 fn get_quota_current_space_for_project_id(&self, path: &str, project_id: u32) -> Result<i64, dbus::Error>; get_quota_current_spaces_for_ids(&self, request: Vec<u8>) -> Result<Vec<u8>, dbus::Error>15 fn get_quota_current_spaces_for_ids(&self, request: Vec<u8>) -> Result<Vec<u8>, dbus::Error>; get_quota_overall_usage(&self, path: &str) -> Result<Vec<u8>, dbus::Error>16 fn get_quota_overall_usage(&self, path: &str) -> Result<Vec<u8>, dbus::Error>; get_quota_overall_usage_pretty_print(&self, path: &str) -> Result<String, dbus::Error>17 fn get_quota_overall_usage_pretty_print(&self, path: &str) -> Result<String, dbus::Error>; set_project_id(&self, fd: arg::OwnedFd, project_id: u32) -> Result<Vec<u8>, dbus::Error>18 fn set_project_id(&self, fd: arg::OwnedFd, project_id: u32) -> Result<Vec<u8>, dbus::Error>; set_project_inheritance_flag(&self, fd: arg::OwnedFd, enable: bool) -> Result<Vec<u8>, dbus::Error>19 fn set_project_inheritance_flag(&self, fd: arg::OwnedFd, enable: bool) -> Result<Vec<u8>, dbus::Error>; 20 } 21 22 #[derive(Debug)] 23 pub struct OrgChromiumSpacedStatefulDiskSpaceUpdate { 24 pub status: Vec<u8>, 25 } 26 27 impl arg::AppendAll for OrgChromiumSpacedStatefulDiskSpaceUpdate { append(&self, i: &mut arg::IterAppend)28 fn append(&self, i: &mut arg::IterAppend) { 29 arg::RefArg::append(&self.status, i); 30 } 31 } 32 33 impl arg::ReadAll for OrgChromiumSpacedStatefulDiskSpaceUpdate { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>34 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 35 Ok(OrgChromiumSpacedStatefulDiskSpaceUpdate { 36 status: i.read()?, 37 }) 38 } 39 } 40 41 impl dbus::message::SignalArgs for OrgChromiumSpacedStatefulDiskSpaceUpdate { 42 const NAME: &'static str = "StatefulDiskSpaceUpdate"; 43 const INTERFACE: &'static str = "org.chromium.Spaced"; 44 } 45 46 impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target=T>> OrgChromiumSpaced for blocking::Proxy<'a, C> { 47 get_free_disk_space(&self, path: &str) -> Result<i64, dbus::Error>48 fn get_free_disk_space(&self, path: &str) -> Result<i64, dbus::Error> { 49 self.method_call("org.chromium.Spaced", "GetFreeDiskSpace", (path, )) 50 .and_then(|r: (i64, )| Ok(r.0, )) 51 } 52 get_total_disk_space(&self, path: &str) -> Result<i64, dbus::Error>53 fn get_total_disk_space(&self, path: &str) -> Result<i64, dbus::Error> { 54 self.method_call("org.chromium.Spaced", "GetTotalDiskSpace", (path, )) 55 .and_then(|r: (i64, )| Ok(r.0, )) 56 } 57 get_root_device_size(&self) -> Result<i64, dbus::Error>58 fn get_root_device_size(&self) -> Result<i64, dbus::Error> { 59 self.method_call("org.chromium.Spaced", "GetRootDeviceSize", ()) 60 .and_then(|r: (i64, )| Ok(r.0, )) 61 } 62 is_quota_supported(&self, path: &str) -> Result<bool, dbus::Error>63 fn is_quota_supported(&self, path: &str) -> Result<bool, dbus::Error> { 64 self.method_call("org.chromium.Spaced", "IsQuotaSupported", (path, )) 65 .and_then(|r: (bool, )| Ok(r.0, )) 66 } 67 get_quota_current_space_for_uid(&self, path: &str, uid: u32) -> Result<i64, dbus::Error>68 fn get_quota_current_space_for_uid(&self, path: &str, uid: u32) -> Result<i64, dbus::Error> { 69 self.method_call("org.chromium.Spaced", "GetQuotaCurrentSpaceForUid", (path, uid, )) 70 .and_then(|r: (i64, )| Ok(r.0, )) 71 } 72 get_quota_current_space_for_gid(&self, path: &str, gid: u32) -> Result<i64, dbus::Error>73 fn get_quota_current_space_for_gid(&self, path: &str, gid: u32) -> Result<i64, dbus::Error> { 74 self.method_call("org.chromium.Spaced", "GetQuotaCurrentSpaceForGid", (path, gid, )) 75 .and_then(|r: (i64, )| Ok(r.0, )) 76 } 77 get_quota_current_space_for_project_id(&self, path: &str, project_id: u32) -> Result<i64, dbus::Error>78 fn get_quota_current_space_for_project_id(&self, path: &str, project_id: u32) -> Result<i64, dbus::Error> { 79 self.method_call("org.chromium.Spaced", "GetQuotaCurrentSpaceForProjectId", (path, project_id, )) 80 .and_then(|r: (i64, )| Ok(r.0, )) 81 } 82 get_quota_current_spaces_for_ids(&self, request: Vec<u8>) -> Result<Vec<u8>, dbus::Error>83 fn get_quota_current_spaces_for_ids(&self, request: Vec<u8>) -> Result<Vec<u8>, dbus::Error> { 84 self.method_call("org.chromium.Spaced", "GetQuotaCurrentSpacesForIds", (request, )) 85 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 86 } 87 get_quota_overall_usage(&self, path: &str) -> Result<Vec<u8>, dbus::Error>88 fn get_quota_overall_usage(&self, path: &str) -> Result<Vec<u8>, dbus::Error> { 89 self.method_call("org.chromium.Spaced", "GetQuotaOverallUsage", (path, )) 90 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 91 } 92 get_quota_overall_usage_pretty_print(&self, path: &str) -> Result<String, dbus::Error>93 fn get_quota_overall_usage_pretty_print(&self, path: &str) -> Result<String, dbus::Error> { 94 self.method_call("org.chromium.Spaced", "GetQuotaOverallUsagePrettyPrint", (path, )) 95 .and_then(|r: (String, )| Ok(r.0, )) 96 } 97 set_project_id(&self, fd: arg::OwnedFd, project_id: u32) -> Result<Vec<u8>, dbus::Error>98 fn set_project_id(&self, fd: arg::OwnedFd, project_id: u32) -> Result<Vec<u8>, dbus::Error> { 99 self.method_call("org.chromium.Spaced", "SetProjectId", (fd, project_id, )) 100 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 101 } 102 set_project_inheritance_flag(&self, fd: arg::OwnedFd, enable: bool) -> Result<Vec<u8>, dbus::Error>103 fn set_project_inheritance_flag(&self, fd: arg::OwnedFd, enable: bool) -> Result<Vec<u8>, dbus::Error> { 104 self.method_call("org.chromium.Spaced", "SetProjectInheritanceFlag", (fd, enable, )) 105 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 106 } 107 } 108