mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Convert SignalService, Database, Group, Payment, and other remaining protos to wire.
This commit is contained in:
committed by
Alex Hart
parent
a6b7d0bcc5
commit
efbd5cab85
274
app/src/main/protowire/Database.proto
Normal file
274
app/src/main/protowire/Database.proto
Normal file
@@ -0,0 +1,274 @@
|
||||
/**
|
||||
* 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.database.model.databaseprotos";
|
||||
option java_multiple_files = true;
|
||||
|
||||
// DEPRECATED -- only here for database migrations
|
||||
message ReactionList {
|
||||
option deprecated = true;
|
||||
|
||||
message Reaction {
|
||||
string emoji = 1;
|
||||
uint64 author = 2;
|
||||
uint64 sentTime = 3;
|
||||
uint64 receivedTime = 4;
|
||||
}
|
||||
|
||||
repeated Reaction reactions = 1;
|
||||
}
|
||||
|
||||
message BadgeList {
|
||||
message Badge {
|
||||
string id = 1;
|
||||
string category = 2;
|
||||
string name = 3;
|
||||
string description = 4;
|
||||
string imageUrl = 5;
|
||||
uint64 expiration = 6;
|
||||
bool visible = 7;
|
||||
string imageDensity = 8;
|
||||
}
|
||||
|
||||
repeated Badge badges = 1;
|
||||
}
|
||||
|
||||
import "SignalService.proto";
|
||||
import "DecryptedGroups.proto";
|
||||
|
||||
message DecryptedGroupV2Context {
|
||||
signalservice.GroupContextV2 context = 1;
|
||||
DecryptedGroupChange change = 2;
|
||||
DecryptedGroup groupState = 3;
|
||||
DecryptedGroup previousGroupState = 4;
|
||||
}
|
||||
|
||||
message TemporalAuthCredentialResponse {
|
||||
int64 date = 1;
|
||||
bytes authCredentialResponse = 2;
|
||||
}
|
||||
|
||||
message TemporalAuthCredentialResponses {
|
||||
repeated TemporalAuthCredentialResponse credentialResponse = 1;
|
||||
}
|
||||
|
||||
message AudioWaveFormData {
|
||||
int64 durationUs = 1;
|
||||
bytes waveForm = 2;
|
||||
}
|
||||
|
||||
message ProfileChangeDetails {
|
||||
message StringChange {
|
||||
string previous = 1;
|
||||
string newValue = 2;
|
||||
}
|
||||
|
||||
StringChange profileNameChange = 1;
|
||||
}
|
||||
|
||||
message BodyRangeList {
|
||||
message BodyRange {
|
||||
enum Style {
|
||||
BOLD = 0;
|
||||
ITALIC = 1;
|
||||
SPOILER = 2;
|
||||
STRIKETHROUGH = 3;
|
||||
MONOSPACE = 4;
|
||||
}
|
||||
|
||||
message Button {
|
||||
string label = 1;
|
||||
string action = 2;
|
||||
}
|
||||
|
||||
int32 start = 1;
|
||||
int32 length = 2;
|
||||
|
||||
oneof associatedValue {
|
||||
string mentionUuid = 3;
|
||||
Style style = 4;
|
||||
string link = 5;
|
||||
Button button = 6;
|
||||
}
|
||||
}
|
||||
|
||||
repeated BodyRange ranges = 1;
|
||||
}
|
||||
|
||||
message CryptoValue {
|
||||
oneof Value {
|
||||
MobileCoinValue mobileCoinValue = 1;
|
||||
}
|
||||
|
||||
message MobileCoinValue {
|
||||
string picoMobileCoin = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message GroupCallUpdateDetails {
|
||||
string eraId = 1;
|
||||
string startedCallUuid = 2;
|
||||
int64 startedCallTimestamp = 3;
|
||||
repeated string inCallUuids = 4;
|
||||
bool isCallFull = 5;
|
||||
}
|
||||
|
||||
message ExpiringProfileKeyCredentialColumnData {
|
||||
bytes profileKey = 1;
|
||||
bytes expiringProfileKeyCredential = 2;
|
||||
}
|
||||
|
||||
message DeviceLastResetTime {
|
||||
message Pair {
|
||||
int32 deviceId = 1;
|
||||
int64 lastResetTime = 2;
|
||||
}
|
||||
|
||||
repeated Pair resetTime = 1;
|
||||
}
|
||||
|
||||
message Wallpaper {
|
||||
message SingleColor {
|
||||
int32 color = 1;
|
||||
}
|
||||
|
||||
message LinearGradient {
|
||||
float rotation = 1;
|
||||
repeated int32 colors = 2;
|
||||
repeated float positions = 3;
|
||||
}
|
||||
|
||||
message File {
|
||||
string uri = 1;
|
||||
}
|
||||
|
||||
oneof wallpaper {
|
||||
SingleColor singleColor = 1;
|
||||
LinearGradient linearGradient = 2;
|
||||
File file = 3;
|
||||
}
|
||||
|
||||
float dimLevelInDarkTheme = 4;
|
||||
}
|
||||
|
||||
message ChatColor {
|
||||
message SingleColor {
|
||||
int32 color = 1;
|
||||
}
|
||||
|
||||
message LinearGradient {
|
||||
float rotation = 1;
|
||||
repeated int32 colors = 2;
|
||||
repeated float positions = 3;
|
||||
}
|
||||
|
||||
message File {
|
||||
string uri = 1;
|
||||
}
|
||||
|
||||
oneof chatColor {
|
||||
SingleColor singleColor = 1;
|
||||
LinearGradient linearGradient = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message RecipientExtras {
|
||||
bool manuallyShownAvatar = 1;
|
||||
bool hideStory = 2;
|
||||
int64 lastStoryView = 3;
|
||||
}
|
||||
|
||||
message CustomAvatar {
|
||||
|
||||
message Text {
|
||||
string text = 1;
|
||||
string colors = 2;
|
||||
}
|
||||
|
||||
message Vector {
|
||||
string key = 1;
|
||||
string colors = 2;
|
||||
}
|
||||
|
||||
message Photo {
|
||||
string uri = 1;
|
||||
int64 size = 2;
|
||||
}
|
||||
|
||||
oneof avatar {
|
||||
Text text = 1;
|
||||
Vector vector = 2;
|
||||
Photo photo = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message StoryTextPost {
|
||||
enum Style {
|
||||
DEFAULT = 0;
|
||||
REGULAR = 1;
|
||||
BOLD = 2;
|
||||
SERIF = 3;
|
||||
SCRIPT = 4;
|
||||
CONDENSED = 5;
|
||||
}
|
||||
|
||||
string body = 1;
|
||||
Style style = 2;
|
||||
int32 textForegroundColor = 3;
|
||||
int32 textBackgroundColor = 4;
|
||||
ChatColor background = 5;
|
||||
}
|
||||
|
||||
message GiftBadge {
|
||||
enum RedemptionState {
|
||||
PENDING = 0;
|
||||
STARTED = 1;
|
||||
REDEEMED = 2;
|
||||
FAILED = 3;
|
||||
}
|
||||
|
||||
bytes redemptionToken = 1;
|
||||
RedemptionState redemptionState = 2;
|
||||
}
|
||||
|
||||
message SignalStoreList {
|
||||
repeated string contents = 1;
|
||||
}
|
||||
|
||||
message PendingChangeNumberMetadata {
|
||||
bytes previousPni = 1;
|
||||
bytes pniIdentityKeyPair = 2;
|
||||
int32 pniRegistrationId = 3;
|
||||
int32 pniSignedPreKeyId = 4;
|
||||
}
|
||||
|
||||
message MessageExportState {
|
||||
|
||||
enum Progress {
|
||||
INIT = 0;
|
||||
STARTED = 1;
|
||||
COMPLETED = 2;
|
||||
}
|
||||
|
||||
int64 messageId = 1;
|
||||
repeated string startedRecipients = 2;
|
||||
repeated string completedRecipients = 3;
|
||||
repeated string startedAttachments = 4;
|
||||
repeated string completedAttachments = 5;
|
||||
Progress progress = 6;
|
||||
}
|
||||
|
||||
message ThreadMergeEvent {
|
||||
string previousE164 = 1;
|
||||
}
|
||||
|
||||
message SessionSwitchoverEvent {
|
||||
string e164 = 1;
|
||||
}
|
||||
39
app/src/main/protowire/Payments.proto
Normal file
39
app/src/main/protowire/Payments.proto
Normal file
@@ -0,0 +1,39 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package signal;
|
||||
|
||||
option java_package = "org.thoughtcrime.securesms.payments.proto";
|
||||
option java_multiple_files = true;
|
||||
|
||||
message MobileCoinLedger {
|
||||
|
||||
message OwnedTXO {
|
||||
uint64 amount = 1;
|
||||
bytes keyImage = 2;
|
||||
bytes publicKey = 3;
|
||||
Block receivedInBlock = 4;
|
||||
Block spentInBlock = 5;
|
||||
}
|
||||
|
||||
message Block {
|
||||
uint64 blockNumber = 1;
|
||||
uint64 timestamp = 2;
|
||||
}
|
||||
|
||||
uint64 balance = 1;
|
||||
uint64 transferableBalance = 2;
|
||||
Block highestBlock = 3;
|
||||
uint64 asOfTimeStamp = 4;
|
||||
repeated OwnedTXO spentTxos = 5;
|
||||
repeated OwnedTXO unspentTxos = 6;
|
||||
}
|
||||
|
||||
message PaymentMetaData {
|
||||
|
||||
message MobileCoinTxoIdentification {
|
||||
repeated bytes publicKey = 1;
|
||||
repeated bytes keyImages = 2;
|
||||
}
|
||||
|
||||
MobileCoinTxoIdentification mobileCoinTxoIdentification = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user