/**
 * Copyright (C) 2014-2016 Open Whisper Systems
 *
 * Licensed according to the LICENSE file in this repository.
 */

syntax = "proto3";

package signal;

option java_package = "org.thoughtcrime.securesms.keyvalue.protos";


message LeastActiveLinkedDevice {
    string name = 1;
    uint64 lastActiveTimestamp = 2;
}

message ArchiveUploadProgressState {
    enum State {
        None = 0;
        Export = 1;
        UploadBackupFile = 2;
        UploadMedia = 3;
        UserCanceled = 4;
    }

    /**
     * Describes the current phase the backup is in when we are exporting the database
     * to the temporary file.
     */
    enum BackupPhase {
        BackupPhaseNone = 0;
        Account = 1;
        Recipient = 2;
        Thread = 3;
        Call = 4;
        Sticker = 5;
        Message = 6;
        NotificationProfile = 7;
        ChatFolder = 8;
    }

    State state = 1;
    BackupPhase backupPhase = 2;
    uint64 frameExportCount = 3;
    uint64 frameTotalCount = 4;
    uint64 backupFileUploadedBytes = 5;
    uint64 backupFileTotalBytes = 6;
    uint64 mediaUploadedBytes = 7;
    uint64 mediaTotalBytes = 8;
}

message BackupDownloadNotifierState {
    enum Type {
      SHEET = 0;
      DIALOG = 1;
    }

    uint64 entitlementExpirationSeconds = 1;
    uint64 lastSheetDisplaySeconds = 2;
    uint64 intervalSeconds = 3;
    Type type = 4;
}