java.lang.Object
it.auties.whatsapp.model.sync.ExternalBlobReference
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,MutableAttachmentProvider<ExternalBlobReference>
public final class ExternalBlobReference
extends Object
implements MutableAttachmentProvider<ExternalBlobReference>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExternalBlobReference(byte[] mediaKey, String mediaDirectPath, String handle, long mediaSize, byte[] mediaSha256, byte[] mediaEncryptedSha256) -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this attachmenthandle()Returns the direct path to the mediaOptional<byte[]> Returns the sha256 of this encrypted mediaOptional<byte[]> mediaKey()Returns the key of this mediaOptional<byte[]> Returns the sha256 of this mediaReturns the size of this mediamediaUrl()Returns the url to the mediasetMediaDirectPath(String mediaDirectPath) Sets the direct path of this providersetMediaEncryptedSha256(byte[] bytes) Sets the sha256 of the encrypted media in this providersetMediaKey(byte[] bytes) Sets the media key of this providersetMediaKeyTimestamp(Long timestamp) Sets the timestamp of the media keysetMediaSha256(byte[] bytes) Sets the sha256 of the media in this providersetMediaSize(long mediaSize) Sets the size of this mediasetMediaUrl(String mediaUrl) Sets the media url of this provider
-
Field Details
-
mediaKey
private byte[] mediaKey -
mediaDirectPath
-
handle
-
mediaSize
private long mediaSize -
mediaSha256
private byte[] mediaSha256 -
mediaEncryptedSha256
private byte[] mediaEncryptedSha256
-
-
Constructor Details
-
ExternalBlobReference
-
-
Method Details
-
mediaUrl
Description copied from interface:MutableAttachmentProviderReturns the url to the media- Specified by:
mediaUrlin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a nullable String
-
setMediaUrl
Description copied from interface:MutableAttachmentProviderSets the media url of this provider- Specified by:
setMediaUrlin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
mediaDirectPath
Description copied from interface:MutableAttachmentProviderReturns the direct path to the media- Specified by:
mediaDirectPathin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a nullable String
-
setMediaDirectPath
Description copied from interface:MutableAttachmentProviderSets the direct path of this provider- Specified by:
setMediaDirectPathin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
mediaKey
Description copied from interface:MutableAttachmentProviderReturns the key of this media- Specified by:
mediaKeyin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a non-null array of bytes
-
setMediaKey
Description copied from interface:MutableAttachmentProviderSets the media key of this provider- Specified by:
setMediaKeyin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
setMediaKeyTimestamp
Description copied from interface:MutableAttachmentProviderSets the timestamp of the media key- Specified by:
setMediaKeyTimestampin interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
mediaSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this media- Specified by:
mediaSha256in interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a non-null array of bytes
-
setMediaSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the media in this provider- Specified by:
setMediaSha256in interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
mediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this encrypted media- Specified by:
mediaEncryptedSha256in interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the encrypted media in this provider- Specified by:
setMediaEncryptedSha256in interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- the same provider
-
mediaSize
Description copied from interface:MutableAttachmentProviderReturns the size of this media- Specified by:
mediaSizein interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a long
-
setMediaSize
Description copied from interface:MutableAttachmentProviderSets the size of this media- Specified by:
setMediaSizein interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a long
-
attachmentType
Description copied from interface:MutableAttachmentProviderReturns the type of this attachment- Specified by:
attachmentTypein interfaceMutableAttachmentProvider<ExternalBlobReference>- Returns:
- a non-null attachment
-
handle
-