playlist4ops.proto 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import "playlist4meta.proto";
  2. import "playlist4content.proto";
  3. message Add {
  4. optional int32 fromIndex = 0x1;
  5. repeated Item items = 0x2;
  6. optional ListChecksum list_checksum = 0x3;
  7. optional bool addLast = 0x4;
  8. optional bool addFirst = 0x5;
  9. }
  10. message Rem {
  11. optional int32 fromIndex = 0x1;
  12. optional int32 length = 0x2;
  13. repeated Item items = 0x3;
  14. optional ListChecksum list_checksum = 0x4;
  15. optional ListChecksum items_checksum = 0x5;
  16. optional ListChecksum uris_checksum = 0x6;
  17. optional bool itemsAsKey = 0x7;
  18. }
  19. message Mov {
  20. optional int32 fromIndex = 0x1;
  21. optional int32 length = 0x2;
  22. optional int32 toIndex = 0x3;
  23. optional ListChecksum list_checksum = 0x4;
  24. optional ListChecksum items_checksum = 0x5;
  25. optional ListChecksum uris_checksum = 0x6;
  26. }
  27. message ItemAttributesPartialState {
  28. optional ItemAttributes values = 0x1;
  29. repeated ItemAttributeKind no_value = 0x2;
  30. enum ItemAttributeKind {
  31. ITEM_UNKNOWN = 0x0;
  32. ITEM_ADDED_BY = 0x1;
  33. ITEM_TIMESTAMP = 0x2;
  34. ITEM_MESSAGE = 0x3;
  35. ITEM_SEEN = 0x4;
  36. ITEM_DOWNLOAD_COUNT = 0x5;
  37. ITEM_DOWNLOAD_FORMAT = 0x6;
  38. ITEM_SEVENDIGITAL_ID = 0x7;
  39. ITEM_SEVENDIGITAL_LEFT = 0x8;
  40. ITEM_SEEN_AT = 0x9;
  41. ITEM_PUBLIC = 0xa;
  42. }
  43. }
  44. message ListAttributesPartialState {
  45. optional ListAttributes values = 0x1;
  46. repeated ListAttributeKind no_value = 0x2;
  47. enum ListAttributeKind {
  48. LIST_UNKNOWN = 0x0;
  49. LIST_NAME = 0x1;
  50. LIST_DESCRIPTION = 0x2;
  51. LIST_PICTURE = 0x3;
  52. LIST_COLLABORATIVE = 0x4;
  53. LIST_PL3_VERSION = 0x5;
  54. LIST_DELETED_BY_OWNER = 0x6;
  55. LIST_RESTRICTED_COLLABORATIVE = 0x7;
  56. }
  57. }
  58. message UpdateItemAttributes {
  59. optional int32 index = 0x1;
  60. optional ItemAttributesPartialState new_attributes = 0x2;
  61. optional ItemAttributesPartialState old_attributes = 0x3;
  62. optional ListChecksum list_checksum = 0x4;
  63. optional ListChecksum old_attributes_checksum = 0x5;
  64. }
  65. message UpdateListAttributes {
  66. optional ListAttributesPartialState new_attributes = 0x1;
  67. optional ListAttributesPartialState old_attributes = 0x2;
  68. optional ListChecksum list_checksum = 0x3;
  69. optional ListChecksum old_attributes_checksum = 0x4;
  70. }
  71. message Op {
  72. optional Kind kind = 0x1;
  73. enum Kind {
  74. KIND_UNKNOWN = 0x0;
  75. ADD = 0x2;
  76. REM = 0x3;
  77. MOV = 0x4;
  78. UPDATE_ITEM_ATTRIBUTES = 0x5;
  79. UPDATE_LIST_ATTRIBUTES = 0x6;
  80. }
  81. optional Add add = 0x2;
  82. optional Rem rem = 0x3;
  83. optional Mov mov = 0x4;
  84. optional UpdateItemAttributes update_item_attributes = 0x5;
  85. optional UpdateListAttributes update_list_attributes = 0x6;
  86. }
  87. message OpList {
  88. repeated Op ops = 0x1;
  89. }