diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-07-28 18:21:52 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-07-28 14:21:52 -0700 |
| commit | 22c599abc18895f73e96095f35b71cf3357d41b4 (patch) | |
| tree | 482ef57d386c955692ea43c43e4655b3c3763499 /hotline/file_transfer.go | |
| parent | 71c56068adca18f76ebee86355f000a3e51d3127 (diff) | |
Move code to hotline dir
Diffstat (limited to 'hotline/file_transfer.go')
| -rw-r--r-- | hotline/file_transfer.go | 29 |
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 +} |