From de9acf64ab27435dcdbed6e47d871457e39467bd Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 10 Apr 2019 10:03:36 -0400 Subject: [PATCH 1/7] move repeated attributes into Claim directly, added ClaimList --- v2/proto/claim.proto | 86 ++++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index c1f1019..7e3a496 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -3,51 +3,54 @@ syntax = "proto3"; package pb; message Claim { + string title = 1; + string description = 2; + string thumbnail_url = 3; + repeated string tags = 4; + repeated Language languages = 5; + repeated Location locations = 6; + oneof type { - Stream stream = 1; - Channel channel = 2; + Stream stream = 10; + Channel channel = 11; + ClaimList claim_list = 12; } } message Channel { bytes public_key = 1; - - string title = 2; - string description = 3; - string thumbnail_url = 4; - repeated string tags = 5; - repeated Language languages = 6; - repeated Location locations = 7; - - string contact_email = 8; - string homepage_url = 9; - string cover_url = 10; + string contact_email = 2; + string homepage_url = 3; + string cover_url = 4; } message Stream { bytes sd_hash = 1; - string title = 2; - string description = 3; - string thumbnail_url = 4; - repeated string tags = 5; - repeated Language languages = 6; - repeated Location locations = 7; + string author = 2; + string license = 3; + string license_url = 4; + int64 release_time = 5; // seconds since UNIX epoch - string author = 8; - string license = 9; - string license_url = 10; - int64 release_time = 11; // seconds since UNIX epoch - - string media_type = 13; - File file = 14; - Fee fee = 15; + string media_type = 6; + File file = 7; + Fee fee = 8; oneof type { - Image image = 16; - Video video = 17; - Audio audio = 18; - } + Image image = 16; + Video video = 17; + Audio audio = 18; + Software software = 19; + } +} + +message ClaimList { + enum ListType { + COLLECTION = 0; + DERIVATION = 1; + } + repeated bytes claims = 1; + ListType list_type = 2; } message Fee { @@ -63,9 +66,9 @@ message Fee { } message File { - bytes hash = 3; - string name = 1; - uint64 size = 2; + bytes hash = 1; + string name = 2; + uint64 size = 3; } message Image { @@ -76,13 +79,26 @@ message Image { message Video { uint32 width = 1; uint32 height = 2; - uint32 duration = 3; + Audio audio = 3; } message Audio { uint32 duration = 1; } +message Software { + enum OS { + UNKNOWN_OS = 0; + ANY = 1; + LINUX = 2; + WINDOWS = 3; + MAC = 4; + ANDROID = 5; + IOS = 6; + } + string os = 1; +} + // RFC 5646 message Language { Language language = 1; -- 2.45.2 From 48a7102fa5939875b5cd251e8cff563f055fed9a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 10 Apr 2019 11:22:35 -0400 Subject: [PATCH 2/7] removed list type for now --- v2/proto/claim.proto | 5 ----- 1 file changed, 5 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index 7e3a496..a43305e 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -45,12 +45,7 @@ message Stream { } message ClaimList { - enum ListType { - COLLECTION = 0; - DERIVATION = 1; - } repeated bytes claims = 1; - ListType list_type = 2; } message Fee { -- 2.45.2 From ee3f878244faed809751dc43f8eb76df94bb8818 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 10 Apr 2019 15:33:27 -0400 Subject: [PATCH 3/7] add parent claim_id --- v2/proto/claim.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index a43305e..876e8eb 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -10,6 +10,8 @@ message Claim { repeated Language languages = 5; repeated Location locations = 6; + bytes parent = 7; + oneof type { Stream stream = 10; Channel channel = 11; -- 2.45.2 From c3a67080b9ece1bb1272e3eb408ac3c91e693976 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 10 Apr 2019 18:27:40 -0400 Subject: [PATCH 4/7] removed parent --- v2/proto/claim.proto | 2 -- 1 file changed, 2 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index 876e8eb..a43305e 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -10,8 +10,6 @@ message Claim { repeated Language languages = 5; repeated Location locations = 6; - bytes parent = 7; - oneof type { Stream stream = 10; Channel channel = 11; -- 2.45.2 From 8ea71933f7054e9ee8ae619b709e7ffe0b9901ca Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 15 Apr 2019 11:54:02 -0400 Subject: [PATCH 5/7] changes --- v2/proto/claim.proto | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index a43305e..7653a77 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -3,29 +3,35 @@ syntax = "proto3"; package pb; message Claim { - string title = 1; - string description = 2; - string thumbnail_url = 3; - repeated string tags = 4; - repeated Language languages = 5; - repeated Location locations = 6; - oneof type { - Stream stream = 10; - Channel channel = 11; - ClaimList claim_list = 12; - } + Stream stream = 1; + Channel channel = 2; + ClaimList claim_list = 3; + } + string title = 8; + string description = 9; + Source thumbnail = 10; + repeated string tags = 11; + repeated Language languages = 12; + repeated Location locations = 13; } message Channel { bytes public_key = 1; string contact_email = 2; string homepage_url = 3; - string cover_url = 4; + Source cover = 4; +} + +message Source { + oneof source { + string url = 1; + bytes sd_hash = 2; + } } message Stream { - bytes sd_hash = 1; + Source source = 1; string author = 2; string license = 3; @@ -45,7 +51,14 @@ message Stream { } message ClaimList { - repeated bytes claims = 1; + enum ListType { + UNKNOWN_LIST_TYPE = 0; + COLLECTION = 1; // play lists, etc + DERIVATION = 2; // movie in multiple languages, software for different OSes + REPOST = 3; + } + ListType list_type = 1; + repeated bytes claim_ids = 1; } message Fee { -- 2.45.2 From 70791fec8f7842ba59d2baefa803ed24dee2595a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 15 Apr 2019 13:40:57 -0400 Subject: [PATCH 6/7] more changes after feedback --- v2/proto/claim.proto | 46 +++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index 7653a77..e52b87d 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -4,9 +4,10 @@ package pb; message Claim { oneof type { - Stream stream = 1; - Channel channel = 2; - ClaimList claim_list = 3; + Stream stream = 1; + Channel channel = 2; + ClaimList claim_list = 3; + ClaimReference repost = 4; } string title = 8; string description = 9; @@ -23,25 +24,13 @@ message Channel { Source cover = 4; } -message Source { - oneof source { - string url = 1; - bytes sd_hash = 2; - } -} - message Stream { Source source = 1; - string author = 2; string license = 3; string license_url = 4; int64 release_time = 5; // seconds since UNIX epoch - - string media_type = 6; - File file = 7; - Fee fee = 8; - + Fee fee = 6; oneof type { Image image = 16; Video video = 17; @@ -50,15 +39,30 @@ message Stream { } } +message ClaimReference { + bytes claim_hash = 1; +} + message ClaimList { enum ListType { UNKNOWN_LIST_TYPE = 0; COLLECTION = 1; // play lists, etc DERIVATION = 2; // movie in multiple languages, software for different OSes - REPOST = 3; } ListType list_type = 1; - repeated bytes claim_ids = 1; + repeated ClaimReference claim_references = 1; +} + +message Source { + bytes hash = 1; + string name = 2; + uint64 size = 3; + string media_type = 4; + oneof source { + string url = 5; + bytes sd_hash = 6; + //Torrent bittorrent = 7; + } } message Fee { @@ -73,12 +77,6 @@ message Fee { uint64 amount = 3; // deweys for LBC/BTC, cents for USD } -message File { - bytes hash = 1; - string name = 2; - uint64 size = 3; -} - message Image { uint32 width = 1; uint32 height = 2; -- 2.45.2 From c6bb77146310f9ccc5050ad7bcb2d8f01a0bda4c Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 15 Apr 2019 13:59:36 -0400 Subject: [PATCH 7/7] final changes --- v2/proto/claim.proto | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/v2/proto/claim.proto b/v2/proto/claim.proto index e52b87d..118776e 100644 --- a/v2/proto/claim.proto +++ b/v2/proto/claim.proto @@ -17,13 +17,6 @@ message Claim { repeated Location locations = 13; } -message Channel { - bytes public_key = 1; - string contact_email = 2; - string homepage_url = 3; - Source cover = 4; -} - message Stream { Source source = 1; string author = 2; @@ -39,6 +32,13 @@ message Stream { } } +message Channel { + bytes public_key = 1; + string contact_email = 2; + string homepage_url = 3; + Source cover = 4; +} + message ClaimReference { bytes claim_hash = 1; } @@ -50,7 +50,7 @@ message ClaimList { DERIVATION = 2; // movie in multiple languages, software for different OSes } ListType list_type = 1; - repeated ClaimReference claim_references = 1; + repeated ClaimReference claim_references = 2; } message Source { @@ -58,11 +58,10 @@ message Source { string name = 2; uint64 size = 3; string media_type = 4; - oneof source { - string url = 5; - bytes sd_hash = 6; - //Torrent bittorrent = 7; - } + + string url = 5; + bytes sd_hash = 6; + //Torrent bittorrent = 7; } message Fee { -- 2.45.2