aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_transfer.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/file_transfer.go')
-rw-r--r--hotline/file_transfer.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/hotline/file_transfer.go b/hotline/file_transfer.go
new file mode 100644
index 0000000..46b0061
--- /dev/null
+++ b/hotline/file_transfer.go
@@ -0,0 +1,29 @@
+package hotline
+
+import "fmt"
+
+// File transfer types
+const (
+ FileDownload = 0
+ FileUpload = 1
+ FolderDownload = 2
+ FolderUpload = 3
+)
+
+type FileTransfer struct {
+ FileName []byte
+ FilePath []byte
+ ReferenceNumber []byte
+ Type int
+ TransferSize []byte // total size of all items in the folder. Only used in FolderUpload action
+ FolderItemCount []byte
+ BytesSent int
+ clientID uint16
+}
+
+func (ft *FileTransfer) String() string {
+ percentComplete := 10
+ out := fmt.Sprintf("%s\t %v", ft.FileName, percentComplete)
+
+ return out
+}