Search in sources :

Example 1 with DeleteRequest

use of org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest in project Signal-Android by signalapp.

the class KeyBackupCipher method createKeyDeleteRequest.

public static KeyBackupRequest createKeyDeleteRequest(TokenResponse token, RemoteAttestation remoteAttestation, byte[] serviceId) {
    DeleteRequest deleteRequest = DeleteRequest.newBuilder().setServiceId(ByteString.copyFrom(serviceId)).setBackupId(ByteString.copyFrom(token.getBackupId())).build();
    Request request = Request.newBuilder().setDelete(deleteRequest).build();
    return createKeyBackupRequest(request, remoteAttestation, "delete");
}
Also used : BackupRequest(org.whispersystems.signalservice.internal.keybackup.protos.BackupRequest) DeleteRequest(org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest) Request(org.whispersystems.signalservice.internal.keybackup.protos.Request) RestoreRequest(org.whispersystems.signalservice.internal.keybackup.protos.RestoreRequest) KeyBackupRequest(org.whispersystems.signalservice.internal.contacts.entities.KeyBackupRequest) DeleteRequest(org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest)

Example 2 with DeleteRequest

use of org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest in project Signal-Android by WhisperSystems.

the class KeyBackupCipher method createKeyDeleteRequest.

public static KeyBackupRequest createKeyDeleteRequest(TokenResponse token, RemoteAttestation remoteAttestation, byte[] serviceId) {
    DeleteRequest deleteRequest = DeleteRequest.newBuilder().setServiceId(ByteString.copyFrom(serviceId)).setBackupId(ByteString.copyFrom(token.getBackupId())).build();
    Request request = Request.newBuilder().setDelete(deleteRequest).build();
    return createKeyBackupRequest(request, remoteAttestation, "delete");
}
Also used : BackupRequest(org.whispersystems.signalservice.internal.keybackup.protos.BackupRequest) DeleteRequest(org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest) Request(org.whispersystems.signalservice.internal.keybackup.protos.Request) RestoreRequest(org.whispersystems.signalservice.internal.keybackup.protos.RestoreRequest) KeyBackupRequest(org.whispersystems.signalservice.internal.contacts.entities.KeyBackupRequest) DeleteRequest(org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest)

Aggregations

KeyBackupRequest (org.whispersystems.signalservice.internal.contacts.entities.KeyBackupRequest)2 BackupRequest (org.whispersystems.signalservice.internal.keybackup.protos.BackupRequest)2 DeleteRequest (org.whispersystems.signalservice.internal.keybackup.protos.DeleteRequest)2 Request (org.whispersystems.signalservice.internal.keybackup.protos.Request)2 RestoreRequest (org.whispersystems.signalservice.internal.keybackup.protos.RestoreRequest)2