blob: 46b00611d418c9e9015e7284fc9fb838f3796c42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
}
|