public class CapabilityStorageControl extends Capability
| Modifier and Type | Class and Description |
|---|---|
static class |
CapabilityStorageControl.AttributeId
enum denoting various possible attributes of the
CapabilityStorageControl. |
static class |
CapabilityStorageControl.CommandId
enum denoting the possible Commands that can be sent for
CapabilityStorageControl. |
static class |
CapabilityStorageControl.Download
This class can be sent as an argument to
Capability.sendResourceCommand(buzz.getcoco.iot.Command<T>, buzz.getcoco.iot.Capability.CommandStatusListener<T>) while sending download commands. |
static interface |
CapabilityStorageControl.DownloadSegmentListener
Listener provides callback to listen for download segment events.
|
static class |
CapabilityStorageControl.GetMetadata
This class can be sent as an argument to
Capability.sendResourceCommand(buzz.getcoco.iot.Command<T>, buzz.getcoco.iot.Capability.CommandStatusListener<T>) while sending get_metadata commands. |
static class |
CapabilityStorageControl.GetVideoMetadataResponse
Class useful in binding json response to object.
|
static class |
CapabilityStorageControl.MimeType
Possible values for mime types of each frame.
|
static class |
CapabilityStorageControl.PlaybackError
An enum denoting possible values for playback errors.
|
static class |
CapabilityStorageControl.SegmentDownloadStatus
Possible values for status of segment download.
|
static class |
CapabilityStorageControl.StreamProtocol
possible values for stream protocols.
|
static class |
CapabilityStorageControl.Upload
This class can be sent as an argument to
Capability.sendResourceCommand(buzz.getcoco.iot.Command<T>, buzz.getcoco.iot.Capability.CommandStatusListener<T>) while sending upload commands. |
Capability.CapabilityId, Capability.CommandStatusListener<T extends Capability.CommandId>| Modifier and Type | Field and Description |
|---|---|
static Capability.CapabilityId |
ID
ID for CapabilityStorageControl.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CapabilityStorageControl(int id,
Resource parent)
Constructor of the current class.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends CommandIdInterface> |
createCommandResponseArgs(T commandId,
com.google.gson.JsonElement jsonResponse)
create response for the command.
|
void |
downloadSegments(long contentId,
java.lang.String sdp,
long[] segmentIds,
long timeout,
CapabilityStorageControl.DownloadSegmentListener listener)
A function to downloadSegments from the resource, provided timeout
and save the segments at provided download path.
|
protected Command<? extends Capability.CommandId> |
extendedCreateCommand(int primitiveCommandId,
com.google.gson.JsonElement commandParams)
A function to create the command from the Json params.
|
boolean |
supports(Capability.CommandId commandId)
This function is used to check if a command is supported by the capability or not.
|
clearAndSetStandardCommandSet, containsAttribute, containsAttribute, createCommand, getAttribute, getAttribute, getAttributeMap, getCapabilityWrapper, getId, getName, getParent, getSupportedCommands, hashCode, interceptCommand, internalAddAttribute, internalMarkAsReady, internalRemoveAttribute, internalSetName, internalSetParent, isReady, iterator, sendResourceCommand, setCapabilityWrapper, toStringpublic static final Capability.CapabilityId ID
protected CapabilityStorageControl(int id,
Resource parent)
id - The unique id Of the capabilityparent - The parent Resource of the capability.public boolean supports(Capability.CommandId commandId)
supports in class CapabilitycommandId - The ID denoting the command to be sent.protected Command<? extends Capability.CommandId> extendedCreateCommand(int primitiveCommandId, com.google.gson.JsonElement commandParams)
extendedCreateCommand in class CapabilityprimitiveCommandId - The int form of the commandIdcommandParams - The Json params that can form a commandprotected <T extends CommandIdInterface> CommandResponse.Args<T> createCommandResponseArgs(T commandId, com.google.gson.JsonElement jsonResponse)
createCommandResponseArgs in class CapabilityT - Capture for casting.commandId - The command ID which has to be respondedjsonResponse - The response bodyCommandResponse.Argspublic void downloadSegments(long contentId,
java.lang.String sdp,
long[] segmentIds,
long timeout,
CapabilityStorageControl.DownloadSegmentListener listener)
contentId - ID of the content.sdp - Format supported by the capability.segmentIds - SegmentIds to be downloaded.timeout - Timeout for this command.listener - The listener which will be triggered after the callback.