proto update
This commit is contained in:
		
							
								
								
									
										14
									
								
								doc/messages.puml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								doc/messages.puml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					@startwbs
 | 
				
			||||||
 | 
					* Messages
 | 
				
			||||||
 | 
					** To server packed (protobuf) 
 | 
				
			||||||
 | 
					*** Encrypted server message and signature (binary data)
 | 
				
			||||||
 | 
					**** ToServerMessage (protobuf)
 | 
				
			||||||
 | 
					***** Encrypted user message and signature
 | 
				
			||||||
 | 
					****** UserMessage (protobuf)
 | 
				
			||||||
 | 
					** From server packed (protobuf) 
 | 
				
			||||||
 | 
					*** Encrypted server message and signature (binary data)
 | 
				
			||||||
 | 
					**** FromServerMessage (protobuf)
 | 
				
			||||||
 | 
					***** Encrypted user message and signature
 | 
				
			||||||
 | 
					****** UserMessage (protobuf)
 | 
				
			||||||
 | 
					@endwbs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -17,30 +17,46 @@ message PackedUserMessage {
 | 
				
			|||||||
	bytes Signature=4;
 | 
						bytes Signature=4;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// structure defining a message to be forwarded encrypted, then sent in a "packedmessage"
 | 
					// structure defining a message encrypted, then sent in a "packedmessage" payload
 | 
				
			||||||
message ServerMessage {
 | 
					message ToServerMessage {
 | 
				
			||||||
	string Type = 1; 
 | 
						string Type = 1; // Type 
 | 
				
			||||||
	string ServerPubKey = 2 ; 
 | 
						string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer
 | 
				
			||||||
	bytes Payload = 3 ; 
 | 
						bytes Payload = 3 ; // optional payload for server
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    message ConversationRequest {  // Structure for requestion incoming messages
 | 
				
			||||||
 | 
					        string lookupKey = 1; // lookup key for a conversation
 | 
				
			||||||
 | 
					        string LastServerUuidOK = 2; // Last Server message UUID received (send me all after that one)
 | 
				
			||||||
 | 
					        bool PublishOnline = 3; // ?? Publish my online status for that contact ?
 | 
				
			||||||
 | 
					        string lookupSignature = 4; // prove that I own the private key by signing that block
 | 
				
			||||||
 | 
					    } 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    repeated ConversationRequest PullRequest = 7; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    message PostedMessage{
 | 
				
			||||||
 | 
					        string lookupKey= 1;
 | 
				
			||||||
 | 
					        repeated PackedUserMessage Messages = 2;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
						repeated PostedMessage Messages = 9; 
 | 
				
			||||||
 | 
						string NextServerKey = 10; 
 | 
				
			||||||
 | 
						string Url = 11; 
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// structure defining a from serve receiver message decrypted from a "packedmessage" payload
 | 
				
			||||||
 | 
					message FromServerMessage {
 | 
				
			||||||
 | 
						string Type = 1; // Type 
 | 
				
			||||||
 | 
						string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer
 | 
				
			||||||
 | 
						bytes Payload = 3 ; // 
 | 
				
			||||||
	uint64 ServerReceived = 4 ; 
 | 
						uint64 ServerReceived = 4 ; 
 | 
				
			||||||
	string ServerUuid = 5 ;
 | 
						string ServerUuid = 5 ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    message ConversationRequest {
 | 
					 | 
				
			||||||
        string ccid = 1;
 | 
					 | 
				
			||||||
        string LastUuidOK = 2;
 | 
					 | 
				
			||||||
        bool PublishOnline = 3;
 | 
					 | 
				
			||||||
    } 
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
    message ConversationResponse {
 | 
					    message ConversationResponse {
 | 
				
			||||||
        repeated string MessageUuids = 1;
 | 
					        repeated string MessageUuids = 1;
 | 
				
			||||||
        string SourceIpAddress = 2;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    repeated ConversationRequest PollRequest = 7; 
 | 
						map<string,ConversationResponse> PullResponse = 8; 
 | 
				
			||||||
	map<string,ConversationResponse> PollResponse = 8; 
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    message PostedMessage{
 | 
					    message PostedMessage{
 | 
				
			||||||
        string ccid= 1;
 | 
					        string lookupKey= 1;
 | 
				
			||||||
        repeated PackedUserMessage Messages = 2;
 | 
					        repeated PackedUserMessage Messages = 2;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
	repeated PostedMessage Messages = 9; 
 | 
						repeated PostedMessage Messages = 9; 
 | 
				
			||||||
@@ -62,7 +78,6 @@ message MinimalContact {
 | 
				
			|||||||
    repeated Server TrustedServers = 3;
 | 
					    repeated Server TrustedServers = 3;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
message UserMessage {
 | 
					message UserMessage {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
	string Destination = 1; 
 | 
						string Destination = 1; 
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user