package Ġse . g ust av kar l sson . sn app ier . receiver . state machine Ċ Ċ import Ġse . g ust av kar l sson . sn app ier . common . domain . File Ref Ċ import Ġse . g ust av kar l sson . sn app ier . common . message . Transfer File Ċ Ċ sealed Ġclass ĠState Ġ{ ĊĠĠĠ Ġobject ĠA waiting Handshake Ġ: ĠState () ĊĠĠĠ Ġobject ĠA waiting Int ended Files Ġ: ĠState () ĊĠĠĠ Ġdata Ġclass ĠA waiting Accepted Paths ( val Ġintended Files : ĠCollection < Transfer File >) Ġ: ĠState () ĊĠĠĠ Ġdata Ġclass ĠA waiting File ( val Ġremaining Files : ĠCollection < File Ref >) Ġ: ĠState () ĊĠĠĠ Ġdata Ġclass ĠRe ceiving File ( ĊĠĠĠĠĠĠĠ Ġval Ġcurrent File : ĠFile Ref , ĊĠĠĠĠĠĠĠ Ġval Ġcurrent Received Bytes : ĠLong , ĊĠĠĠĠĠĠĠ Ġval Ġremaining Files : ĠCollection < File Ref > ĊĠĠĠ Ġ) Ġ: ĠState () ĊĊĠĠĠ Ġobject ĠCompleted Ġ: ĠState () ĊĠĠĠ Ġdata Ġclass ĠFailed ( val Ġmessage : ĠString ) Ġ: ĠState () ĊĠĠĠ Ġ// ĠTODO ĠAdd Ġabort Ġand Ġpause / resume Ċ } Ċ