playlist4ops.proto 2.7 KB

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