aboutsummaryrefslogtreecommitdiff
path: root/file_transfer.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-24 17:54:17 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-24 17:54:17 -0700
commit6988a0571d5d37ea0f38ee3e4066533158f608bc (patch)
tree172010de54ea7e732d7daa836db659021dc8a933 /file_transfer.go
Initial squashed commit
Diffstat (limited to 'file_transfer.go')
-rw-r--r--file_transfer.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/file_transfer.go b/file_transfer.go
new file mode 100644
index 0000000..46b0061
--- /dev/null
+++ b/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
+}