Static Public Member Functions | |
| static bool | is_available (out string error_message) |
| static string | mount (SmbShare share, out string error_message) |
| static bool | unmount (SmbShare share) |
| static bool | unmount_path (string mount_point) |
| static bool | is_mounted_at (string mount_point) |
| static Gee.ArrayList< SmbShare > | list_active_mounts () |
| static Gee.ArrayList< SmbShare > | load_saved_shares () |
| static void | save_share (SmbShare share) |
| static void | forget_share (SmbShare share) |
Properties | |
| static string | mount_root [get] |
Static Private Member Functions | |
| static void | write_shares (Gee.ArrayList< SmbShare > list) |
Static Private Attributes | |
| const string | SHARES_CONF = "/etc/bastionguard-backup/smb-shares.json" |
Static helper: drives mount.cifs, tracks active mounts and persists the user's recently-used shares.
Definition at line 88 of file SmbMount.vala.
|
inlinestatic |
Definition at line 371 of file SmbMount.vala.
References load_saved_shares(), and write_shares().
|
inlinestatic |
Returns true if both mount.cifs and cifs-utils look usable on this system. Sets error_message with a hint otherwise.
Definition at line 109 of file SmbMount.vala.
References _.
Referenced by mount(), and BackupDeviceBox.on_add_smb_share_clicked().
|
inlinestatic |
Definition at line 261 of file SmbMount.vala.
References Error, and TeeJee.Logging.log_debug().
Referenced by mount().
|
inlinestatic |
Returns every CIFS mount currently visible in /proc/mounts as an SmbShare with the mount_point field populated. Username and credentials are NOT recoverable from the kernel.
Definition at line 283 of file SmbMount.vala.
References Error, and TeeJee.Logging.log_debug().
Referenced by BackupDeviceBox.device_list_refresh().
|
inlinestatic |
Definition at line 324 of file SmbMount.vala.
References Error, SmbShare.from_json(), TeeJee.Logging.log_error(), and SHARES_CONF.
Referenced by forget_share(), and save_share().
|
inlinestatic |
Mount the SMB share described by share. On success the mount_point field of share is populated and the path is returned. On failure returns an empty string and error_message carries a translated explanation.
Definition at line 126 of file SmbMount.vala.
References _, TeeJee.FileSystem.dir_create(), SmbShare.domain, TeeJee.ProcessHelper.exec_sync(), is_available(), is_mounted_at(), TeeJee.Logging.log_debug(), TeeJee.Logging.log_error(), TeeJee.Logging.log_msg(), mount_root, SmbShare.password, TeeJee.FileSystem.path_combine(), SmbShare.server, SmbShare.share, and SmbShare.username.
Referenced by SmbShareDialog.on_connect_clicked().
|
inlinestatic |
Definition at line 350 of file SmbMount.vala.
References load_saved_shares(), SmbShare.server, SmbShare.share, SmbShare.subpath, and write_shares().
Referenced by SmbShareDialog.on_connect_clicked().
|
inlinestatic |
Definition at line 243 of file SmbMount.vala.
References SmbShare.mount_point, and Device.unmount().
|
inlinestatic |
Definition at line 254 of file SmbMount.vala.
References Device.unmount().
|
inlinestaticprivate |
Definition at line 385 of file SmbMount.vala.
References TeeJee.FileSystem.dir_create(), Error, TeeJee.Logging.log_error(), and SHARES_CONF.
Referenced by forget_share(), and save_share().
|
staticprivate |
Definition at line 103 of file SmbMount.vala.
Referenced by load_saved_shares(), and write_shares().
|
staticget |
Definition at line 93 of file SmbMount.vala.
Referenced by mount().