package szakdolgozat.client;

import java.util.ArrayList;

import szakdolgozat.shared.User;
import szakdolgozat.shared.UserStats;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ServicesAsync {
	/**
	 * 
	 * @param user
	 * @param callback the callback to return A játékos ID-je
	 */
	public void isUserPasswordValid(User user, AsyncCallback<Integer> callback);
	public void logoutUser(User user, AsyncCallback<Void> callback);
	public void registerNewUser(User user, AsyncCallback<Boolean> callback);
	public void getUserStats(User user, AsyncCallback<UserStats> callback);
	public void getLoggedInUsersList(AsyncCallback<ArrayList<User>> callback);
	public void getLoggedInUsersStats(AsyncCallback<ArrayList<UserStats>> callback);
	public void sendMessageToGamePartner(User partner, String message, AsyncCallback<Void> callback);	
	public void proposeGameTo(User from, User to, AsyncCallback<String> callback);
	public void replyToProposal(User opponent, boolean answer, AsyncCallback<Void> callback);
	public void sendMoveToOpponent(User opponent, int row, int col, AsyncCallback<Void> callback);
	public void gameStarted(User player1, User player2, AsyncCallback<Void> callback);
	public void gameWonByUser(User user, AsyncCallback<Void> callback);
	
}
