mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
minor changes in MageServer interface
This commit is contained in:
parent
7a5b6dddee
commit
5274472d7d
1 changed files with 65 additions and 64 deletions
|
@ -45,89 +45,90 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public interface MageServer {
|
public interface MageServer {
|
||||||
|
|
||||||
public boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException;
|
// connection methods
|
||||||
public boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException;
|
||||||
public void deregisterClient(String sessionId) throws MageException;
|
boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
||||||
|
void deregisterClient(String sessionId) throws MageException;
|
||||||
|
|
||||||
public boolean setUserData(String userName, String sessionId, UserDataView userDataView) throws MageException;
|
// user methods
|
||||||
public ServerState getServerState() throws MageException;
|
boolean setUserData(String userName, String sessionId, UserDataView userDataView) throws MageException;
|
||||||
|
void sendFeedbackMessage(String sessionId, String username, String title, String type, String message, String email) throws MageException;
|
||||||
public boolean ping(String sessionId) throws MageException;
|
|
||||||
|
// server state methods
|
||||||
|
ServerState getServerState() throws MageException;
|
||||||
|
List<String> getConnectedPlayers(UUID roomId) throws MageException;
|
||||||
|
List<MatchView> getFinishedMatches(UUID roomId) throws MageException;
|
||||||
|
Object getServerMessagesCompressed(String sessionId) throws MageException; // messages of the day
|
||||||
|
|
||||||
|
// ping - extends session
|
||||||
|
boolean ping(String sessionId) throws MageException;
|
||||||
|
|
||||||
//table methods
|
//table methods
|
||||||
public TableView createTable(String sessionId, UUID roomId, MatchOptions matchOptions) throws MageException;
|
TableView createTable(String sessionId, UUID roomId, MatchOptions matchOptions) throws MageException;
|
||||||
public TableView createTournamentTable(String sessionId, UUID roomId, TournamentOptions tournamentOptions) throws MageException;
|
TableView createTournamentTable(String sessionId, UUID roomId, TournamentOptions tournamentOptions) throws MageException;
|
||||||
public boolean joinTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException, GameException;
|
boolean joinTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException, GameException;
|
||||||
public boolean joinTournamentTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill) throws MageException, GameException;
|
boolean joinTournamentTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill) throws MageException, GameException;
|
||||||
public boolean submitDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
|
boolean submitDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
|
||||||
public void updateDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
|
void updateDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
|
||||||
public boolean watchTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
boolean watchTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public void leaveTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
void leaveTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public void swapSeats(String sessionId, UUID roomId, UUID tableId, int seatNum1, int seatNum2) throws MageException;
|
void swapSeats(String sessionId, UUID roomId, UUID tableId, int seatNum1, int seatNum2) throws MageException;
|
||||||
public void removeTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
void removeTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public boolean isTableOwner(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
boolean isTableOwner(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public TableView getTable(UUID roomId, UUID tableId) throws MageException;
|
TableView getTable(UUID roomId, UUID tableId) throws MageException;
|
||||||
public List<TableView> getTables(UUID roomId) throws MageException;
|
List<TableView> getTables(UUID roomId) throws MageException;
|
||||||
public List<String> getConnectedPlayers(UUID roomId) throws MageException;
|
|
||||||
public List<MatchView> getFinishedMatches(UUID roomId) throws MageException;
|
|
||||||
|
|
||||||
//chat methods
|
//chat methods
|
||||||
public void sendChatMessage(UUID chatId, String userName, String message) throws MageException;
|
void sendChatMessage(UUID chatId, String userName, String message) throws MageException;
|
||||||
public void joinChat(UUID chatId, String sessionId, String userName) throws MageException;
|
void joinChat(UUID chatId, String sessionId, String userName) throws MageException;
|
||||||
public void leaveChat(UUID chatId, String sessionId) throws MageException;
|
void leaveChat(UUID chatId, String sessionId) throws MageException;
|
||||||
public UUID getTableChatId(UUID tableId) throws MageException;
|
UUID getTableChatId(UUID tableId) throws MageException;
|
||||||
public UUID getGameChatId(UUID gameId) throws MageException;
|
UUID getGameChatId(UUID gameId) throws MageException;
|
||||||
public UUID getRoomChatId(UUID roomId) throws MageException;
|
UUID getRoomChatId(UUID roomId) throws MageException;
|
||||||
public UUID getTournamentChatId(UUID tournamentId) throws MageException;
|
UUID getTournamentChatId(UUID tournamentId) throws MageException;
|
||||||
|
|
||||||
//room methods
|
//room methods
|
||||||
public UUID getMainRoomId() throws MageException;
|
UUID getMainRoomId() throws MageException;
|
||||||
|
|
||||||
//game methods
|
//game methods
|
||||||
public void startMatch(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
void startMatch(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public void joinGame(UUID gameId, String sessionId) throws MageException;
|
void joinGame(UUID gameId, String sessionId) throws MageException;
|
||||||
public void watchGame(UUID gameId, String sessionId) throws MageException;
|
void watchGame(UUID gameId, String sessionId) throws MageException;
|
||||||
public void stopWatching(UUID gameId, String sessionId) throws MageException;
|
void stopWatching(UUID gameId, String sessionId) throws MageException;
|
||||||
public void sendPlayerUUID(UUID gameId, String sessionId, UUID data) throws MageException;
|
void sendPlayerUUID(UUID gameId, String sessionId, UUID data) throws MageException;
|
||||||
public void sendPlayerString(UUID gameId, String sessionId, String data) throws MageException;
|
void sendPlayerString(UUID gameId, String sessionId, String data) throws MageException;
|
||||||
public void sendPlayerBoolean(UUID gameId, String sessionId, Boolean data) throws MageException;
|
void sendPlayerBoolean(UUID gameId, String sessionId, Boolean data) throws MageException;
|
||||||
public void sendPlayerInteger(UUID gameId, String sessionId, Integer data) throws MageException;
|
void sendPlayerInteger(UUID gameId, String sessionId, Integer data) throws MageException;
|
||||||
public void concedeGame(UUID gameId, String sessionId) throws MageException;
|
void concedeGame(UUID gameId, String sessionId) throws MageException;
|
||||||
|
GameView getGameView(UUID gameId, String sessionId, UUID playerId) throws MageException;
|
||||||
|
|
||||||
//tournament methods
|
//tournament methods
|
||||||
public void startTournament(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
void startTournament(String sessionId, UUID roomId, UUID tableId) throws MageException;
|
||||||
public void joinTournament(UUID draftId, String sessionId) throws MageException;
|
void joinTournament(UUID draftId, String sessionId) throws MageException;
|
||||||
public TournamentView getTournament(UUID tournamentId) throws MageException;
|
TournamentView getTournament(UUID tournamentId) throws MageException;
|
||||||
|
|
||||||
//draft methods
|
//draft methods
|
||||||
public void joinDraft(UUID draftId, String sessionId) throws MageException;
|
void joinDraft(UUID draftId, String sessionId) throws MageException;
|
||||||
public DraftPickView sendCardPick(UUID draftId, String sessionId, UUID cardId) throws MageException;
|
DraftPickView sendCardPick(UUID draftId, String sessionId, UUID cardId) throws MageException;
|
||||||
|
|
||||||
//challenge methods
|
//challenge methods
|
||||||
public void startChallenge(String sessionId, UUID roomId, UUID tableId, UUID challengeId) throws MageException;
|
void startChallenge(String sessionId, UUID roomId, UUID tableId, UUID challengeId) throws MageException;
|
||||||
|
|
||||||
//replay methods
|
//replay methods
|
||||||
public void replayGame(UUID gameId, String sessionId) throws MageException;
|
void replayGame(UUID gameId, String sessionId) throws MageException;
|
||||||
public void startReplay(UUID gameId, String sessionId) throws MageException;
|
void startReplay(UUID gameId, String sessionId) throws MageException;
|
||||||
public void stopReplay(UUID gameId, String sessionId) throws MageException;
|
void stopReplay(UUID gameId, String sessionId) throws MageException;
|
||||||
public void nextPlay(UUID gameId, String sessionId) throws MageException;
|
void nextPlay(UUID gameId, String sessionId) throws MageException;
|
||||||
public void previousPlay(UUID gameId, String sessionId) throws MageException;
|
void previousPlay(UUID gameId, String sessionId) throws MageException;
|
||||||
public void skipForward(UUID gameId, String sessionId, int moves) throws MageException;
|
void skipForward(UUID gameId, String sessionId, int moves) throws MageException;
|
||||||
|
|
||||||
//test methods
|
//test methods
|
||||||
public void cheat(UUID gameId, String sessionId, UUID playerId, DeckCardLists deckList) throws MageException;
|
void cheat(UUID gameId, String sessionId, UUID playerId, DeckCardLists deckList) throws MageException;
|
||||||
public boolean cheat(UUID gameId, String sessionId, UUID playerId, String cardName) throws MageException;
|
boolean cheat(UUID gameId, String sessionId, UUID playerId, String cardName) throws MageException;
|
||||||
public GameView getGameView(UUID gameId, String sessionId, UUID playerId) throws MageException;
|
|
||||||
|
|
||||||
//admin methods
|
//admin methods
|
||||||
public List<UserView> getUsers(String sessionId) throws MageException;
|
List<UserView> getUsers(String sessionId) throws MageException;
|
||||||
public void disconnectUser(String sessionId, String userSessionId) throws MageException;
|
void disconnectUser(String sessionId, String userSessionId) throws MageException;
|
||||||
public void removeTable(String sessionId, UUID tableId) throws MageException;
|
void removeTable(String sessionId, UUID tableId) throws MageException;
|
||||||
public void sendBroadcastMessage(String sessionId, String message) throws MageException;
|
void sendBroadcastMessage(String sessionId, String message) throws MageException;
|
||||||
|
|
||||||
// messages of the day
|
|
||||||
public Object getServerMessagesCompressed(String sessionId) throws MageException;
|
|
||||||
|
|
||||||
// feedback
|
|
||||||
public void sendFeedbackMessage(String sessionId, String username, String title, String type, String message, String email) throws MageException;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue