presence.proto 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. syntax = "proto2";
  2. message PlaylistPublishedState {
  3. optional string uri = 0x1;
  4. optional int64 timestamp = 0x2;
  5. }
  6. message PlaylistTrackAddedState {
  7. optional string playlist_uri = 0x1;
  8. optional string track_uri = 0x2;
  9. optional int64 timestamp = 0x3;
  10. }
  11. message TrackFinishedPlayingState {
  12. optional string uri = 0x1;
  13. optional string context_uri = 0x2;
  14. optional int64 timestamp = 0x3;
  15. optional string referrer_uri = 0x4;
  16. }
  17. message FavoriteAppAddedState {
  18. optional string app_uri = 0x1;
  19. optional int64 timestamp = 0x2;
  20. }
  21. message TrackStartedPlayingState {
  22. optional string uri = 0x1;
  23. optional string context_uri = 0x2;
  24. optional int64 timestamp = 0x3;
  25. optional string referrer_uri = 0x4;
  26. }
  27. message UriSharedState {
  28. optional string uri = 0x1;
  29. optional string message = 0x2;
  30. optional int64 timestamp = 0x3;
  31. }
  32. message ArtistFollowedState {
  33. optional string uri = 0x1;
  34. optional string artist_name = 0x2;
  35. optional string artist_cover_uri = 0x3;
  36. optional int64 timestamp = 0x4;
  37. }
  38. message DeviceInformation {
  39. optional string os = 0x1;
  40. optional string type = 0x2;
  41. }
  42. message GenericPresenceState {
  43. optional int32 type = 0x1;
  44. optional int64 timestamp = 0x2;
  45. optional string item_uri = 0x3;
  46. optional string item_name = 0x4;
  47. optional string item_image = 0x5;
  48. optional string context_uri = 0x6;
  49. optional string context_name = 0x7;
  50. optional string context_image = 0x8;
  51. optional string referrer_uri = 0x9;
  52. optional string referrer_name = 0xa;
  53. optional string referrer_image = 0xb;
  54. optional string message = 0xc;
  55. optional DeviceInformation device_information = 0xd;
  56. }
  57. message State {
  58. optional int64 timestamp = 0x1;
  59. optional Type type = 0x2;
  60. enum Type {
  61. PLAYLIST_PUBLISHED = 0x1;
  62. PLAYLIST_TRACK_ADDED = 0x2;
  63. TRACK_FINISHED_PLAYING = 0x3;
  64. FAVORITE_APP_ADDED = 0x4;
  65. TRACK_STARTED_PLAYING = 0x5;
  66. URI_SHARED = 0x6;
  67. ARTIST_FOLLOWED = 0x7;
  68. GENERIC = 0xb;
  69. }
  70. optional string uri = 0x3;
  71. optional PlaylistPublishedState playlist_published = 0x4;
  72. optional PlaylistTrackAddedState playlist_track_added = 0x5;
  73. optional TrackFinishedPlayingState track_finished_playing = 0x6;
  74. optional FavoriteAppAddedState favorite_app_added = 0x7;
  75. optional TrackStartedPlayingState track_started_playing = 0x8;
  76. optional UriSharedState uri_shared = 0x9;
  77. optional ArtistFollowedState artist_followed = 0xa;
  78. optional GenericPresenceState generic = 0xb;
  79. }
  80. message StateList {
  81. repeated State states = 0x1;
  82. }