]>
Commit | Line | Data |
---|---|---|
6988a057 JH |
1 | package hotline |
2 | ||
3 | import "fmt" | |
4 | ||
5 | // File transfer types | |
6 | const ( | |
7 | FileDownload = 0 | |
8 | FileUpload = 1 | |
9 | FolderDownload = 2 | |
10 | FolderUpload = 3 | |
11 | ) | |
12 | ||
13 | type 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 | ||
24 | func (ft *FileTransfer) String() string { | |
25 | percentComplete := 10 | |
26 | out := fmt.Sprintf("%s\t %v", ft.FileName, percentComplete) | |
27 | ||
28 | return out | |
29 | } |