common.proto 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. syntax = "proto3";
  2. package common;
  3. option java_package = "ch.threema.protobuf";
  4. // Threema Blob to be uploaded/downloaded from the Blob server.
  5. message Blob {
  6. // Blob ID as given by the Blob server
  7. bytes id = 1;
  8. // Nonce used for encrypting/decrypting the Blob.
  9. // Note: May be omitted if unambigously defined by the context.
  10. bytes nonce = 2;
  11. // Secret (or public) key used for encrypting/decrypting the Blob.
  12. // Note: May be omitted if unambigously defined by the context.
  13. bytes key = 3;
  14. }
  15. // Generic image.
  16. message Image {
  17. // Format type of the image
  18. enum Type {
  19. JPEG = 0;
  20. }
  21. Type type = 1;
  22. // The image's source
  23. oneof source {
  24. // The image's data needs to be downloaded from the Blob server
  25. Blob blob = 2;
  26. // The image's data is inlined.
  27. // Note: This MUST only be used when explicitly allowed.
  28. // Almost always use a global/device group shared Blob instead!
  29. bytes data = 3;
  30. }
  31. }
  32. // Unique group identity.
  33. message GroupIdentity {
  34. // Group id as chosen by the group's creator
  35. fixed64 group_id = 1;
  36. // Threema ID of the group's creator
  37. string creator_identity = 2;
  38. }