diff options
Diffstat (limited to 'libdino/src/entity')
-rw-r--r-- | libdino/src/entity/file_transfer.vala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdino/src/entity/file_transfer.vala b/libdino/src/entity/file_transfer.vala index 10fe99f5..e26b723c 100644 --- a/libdino/src/entity/file_transfer.vala +++ b/libdino/src/entity/file_transfer.vala @@ -25,6 +25,11 @@ public class FileTransfer : Object { public OutputStream output_stream { get; set; } public string file_name { get; set; } + private string? server_file_name_ = null; + public string server_file_name { + get { return server_file_name_ ?? file_name; } + set { server_file_name_ = value; } + } public string path { get; set; } public string mime_type { get; set; } public int size { get; set; } @@ -90,6 +95,10 @@ public class FileTransfer : Object { notify.connect(on_update); } + public string get_uri() { + return Path.build_filename(Dino.get_storage_dir(), "files", path); + } + private void on_update(Object o, ParamSpec sp) { Qlite.UpdateBuilder update_builder = db.file_transfer.update().with(db.file_transfer.id, "=", id); switch (sp.name) { |