Package com.teamviewer.sdk.screensharing
Interface FileBoxItem
public interface FileBoxItem
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Register aFileBoxItem.StateChangeCallback
instance that receives state changes callbacks.void
Register aFileBoxItem.TransferProgressCallback
instance that receives file item transfer progress callbacks.void
Cancels a running download.
Has no effect if called while the item is not in StateTRANSFER_IN_PROGRESS
.long
getId()
long
getState()
boolean
void
Removes this item from the file box.void
Unregister aFileBoxItem.StateChangeCallback
previously registered withaddStateChangeCallback()
.void
Unregister aFileBoxItem.TransferProgressCallback
previously registered withaddTransferProgressCallback()
.void
Starts downloading the item to an app-local location.void
startDownload
(String savePath) Starts downloading the item to a given path.
Has no effect if called while the item is not in StateREADY_TO_DOWNLOAD
.
-
Method Details
-
getId
long getId()- Returns:
- the unique id of this item in the file box.
-
getFileName
String getFileName()- Returns:
- the name of the file including its extension.
- See Also:
-
getFilePath
String getFilePath()- Returns:
- the full file path if the file is available locally (own file or downloaded) else just the file name including its extension.
- See Also:
-
getSizeInBytes
long getSizeInBytes()- Returns:
- the file size of this item in bytes.
-
isOwnItem
boolean isOwnItem()- Returns:
true
if this item was added to the file box by us, elsefalse
.
-
getState
FileBoxItem.State getState()- Returns:
- the current
FileBoxItem.State
of this item.
-
addStateChangeCallback
Register aFileBoxItem.StateChangeCallback
instance that receives state changes callbacks.- Parameters:
callback
- The callback instance to register.
-
removeStateChangeCallback
Unregister aFileBoxItem.StateChangeCallback
previously registered withaddStateChangeCallback()
. It will not receive any further callbacks.- Parameters:
callback
- The callback instance to unregister.
-
addTransferProgressCallback
Register aFileBoxItem.TransferProgressCallback
instance that receives file item transfer progress callbacks.- Parameters:
callback
- The callback instance to register.
-
removeTransferProgressCallback
Unregister aFileBoxItem.TransferProgressCallback
previously registered withaddTransferProgressCallback()
. It will not receive any further callbacks.- Parameters:
callback
- The callback instance to unregister.
-
startDownload
void startDownload()Starts downloading the item to an app-local location. If you want to specify the download location use thestartDownload(String)
method.- See Also:
-
startDownload
Starts downloading the item to a given path.
Has no effect if called while the item is not in StateREADY_TO_DOWNLOAD
.- Parameters:
savePath
- The path where the item will be downloaded to. If it'snull
or empty an app-local location will be used.- See Also:
-
cancelDownload
void cancelDownload()Cancels a running download.
Has no effect if called while the item is not in StateTRANSFER_IN_PROGRESS
. -
removeItem
void removeItem()Removes this item from the file box. Doesn't remove it locally!
Has no effect if the item was not added by us.- See Also:
-