interface & client tab for replay transfer

This commit is contained in:
Max-Wilhelm Bruker 2012-02-25 19:33:44 +01:00
parent faf6b2c5cb
commit c6c6a970c6
36 changed files with 702 additions and 52 deletions

View file

@ -12,6 +12,7 @@ SET(PROTO_FILES
command_deck_del_dir.proto
command_deck_del.proto
command_deck_download.proto
command_deck_list.proto
command_deck_new_dir.proto
command_deck_select.proto
command_deck_upload.proto
@ -29,6 +30,8 @@ SET(PROTO_FILES
command_mulligan.proto
command_next_turn.proto
command_ready_start.proto
command_replay_list.proto
command_replay_download.proto
command_reveal_cards.proto
command_roll_die.proto
command_set_active_phase.proto
@ -107,6 +110,8 @@ SET(PROTO_FILES
response_join_room.proto
response_list_users.proto
response_login.proto
response_replay_download.proto
response_replay_list.proto
response.proto
room_commands.proto
room_event.proto
@ -120,6 +125,7 @@ SET(PROTO_FILES
serverinfo_playerping.proto
serverinfo_playerproperties.proto
serverinfo_player.proto
serverinfo_replay.proto
serverinfo_room.proto
serverinfo_user.proto
serverinfo_zone.proto

View file

@ -0,0 +1,7 @@
import "session_commands.proto";
message Command_DeckList {
extend SessionCommand {
optional Command_DeckList ext = 1008;
}
}

View file

@ -0,0 +1,8 @@
import "session_commands.proto";
message Command_ReplayDownload {
extend SessionCommand {
optional Command_ReplayDownload ext = 1101;
}
optional sint32 game_id = 1 [default = -1];
}

View file

@ -0,0 +1,7 @@
import "session_commands.proto";
message Command_ReplayList {
extend SessionCommand {
optional Command_ReplayList ext = 1100;
}
}

View file

@ -20,6 +20,7 @@ message Response {
RespWouldOverwriteOldSession = 17;
RespChatFlood = 18;
RespUserIsBanned = 19;
RespAccessDenied = 20;
}
enum ResponseType {
JOIN_ROOM = 1000;
@ -31,6 +32,8 @@ message Response {
DECK_LIST = 1006;
DECK_DOWNLOAD = 1007;
DECK_UPLOAD = 1008;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
}
required uint64 cmd_id = 1;
optional ResponseCode response_code = 2;

View file

@ -0,0 +1,9 @@
import "response.proto";
message Response_ReplayDownload {
extend Response {
optional Response_ReplayDownload ext = 1101;
}
optional bytes replay_data = 1;
}

View file

@ -0,0 +1,9 @@
import "response.proto";
import "serverinfo_replay.proto";
message Response_ReplayList {
extend Response {
optional Response_ReplayList ext = 1100;
}
repeated ServerInfo_Replay replay_list = 1;
}

View file

@ -0,0 +1,9 @@
message ServerInfo_Replay {
optional sint32 game_id = 1 [default = -1];
optional string room_name = 2;
optional uint32 time_started = 3;
optional uint32 length = 4;
optional string game_name = 5;
optional string replay_name = 6;
repeated string player_names = 7;
}

View file

@ -18,4 +18,5 @@ message ServerInfo_User {
optional Gender gender = 5 [default = GenderUnknown];
optional string country = 6;
optional bytes avatar_bmp = 7;
optional sint32 id = 8 [default = -1];
}

View file

@ -16,6 +16,8 @@ message SessionCommand {
DECK_UPLOAD = 1013;
LIST_ROOMS = 1014;
JOIN_ROOM = 1015;
REPLAY_LIST = 1100;
REPLAY_DOWNLOAD = 1101;
}
extensions 100 to max;
}
@ -78,12 +80,6 @@ message Command_RemoveFromList {
optional string user_name = 2;
}
message Command_DeckList {
extend SessionCommand {
optional Command_DeckList ext = 1008;
}
}
message Command_ListRooms {
extend SessionCommand {
optional Command_ListRooms ext = 1014;