aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-16 00:23:51 +0200
committerfiaxh <git@mx.ax.lt>2017-10-22 18:26:31 +0200
commit9ea16b6d8568cb383eb1f469d1dc54bfcad4f188 (patch)
tree27da8705fc99f2407af5e60083e34ddeeff39630 /libdino/src/entity
parent8b43df8ec3f92477f857280668a9f29f0b9d6229 (diff)
downloaddino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.tar.gz
dino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.zip
PGP encrypted file transfers
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/file_transfer.vala9
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) {