]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/file_transfer.go
Add initial validations of config.yaml
[rbdr/mobius] / hotline / file_transfer.go
index c0c2f8700895443acb83cc42ff1bc4c13fe43cb5..9e86bb8724558164f948bc5a916f6c781cc4fb9c 100644 (file)
@@ -23,6 +23,8 @@ type FileTransfer struct {
        FolderItemCount []byte
        BytesSent       int
        clientID        uint16
+       fileResumeData  *FileResumeData
+       options         []byte
 }
 
 func (ft *FileTransfer) String() string {
@@ -32,6 +34,10 @@ func (ft *FileTransfer) String() string {
        return out
 }
 
+func (ft *FileTransfer) ItemCount() int {
+       return int(binary.BigEndian.Uint16(ft.FolderItemCount))
+}
+
 // 00 28 // DataSize
 // 00 00 // IsFolder
 // 00 02 // PathItemCount
@@ -56,7 +62,6 @@ func readFolderUpload(buf []byte) folderUpload {
        return fu
 }
 
-
 func (fu *folderUpload) UnmarshalBinary(b []byte) error {
        fu.DataSize = [2]byte{b[0], b[1]}
        fu.IsFolder = [2]byte{b[2], b[3]}