]> git.r.bdr.sh - rbdr/mobius/blame - file_transfer.go
Initial squashed commit
[rbdr/mobius] / file_transfer.go
CommitLineData
6988a057
JH
1package hotline
2
3import "fmt"
4
5// File transfer types
6const (
7 FileDownload = 0
8 FileUpload = 1
9 FolderDownload = 2
10 FolderUpload = 3
11)
12
13type FileTransfer struct {
14 FileName []byte
15 FilePath []byte
16 ReferenceNumber []byte
17 Type int
18 TransferSize []byte // total size of all items in the folder. Only used in FolderUpload action
19 FolderItemCount []byte
20 BytesSent int
21 clientID uint16
22}
23
24func (ft *FileTransfer) String() string {
25 percentComplete := 10
26 out := fmt.Sprintf("%s\t %v", ft.FileName, percentComplete)
27
28 return out
29}