cplusplus-client-listener

*We assure you that we do not spam. You may receive occasional emails from us.
 You can always unsubscribe.
C Plus Plus

C++ Client Listener

Connection Request Listener
/**
   * Invoked in response to a connect request.
   * @param event
   */
   public  void  onConnectDone ( int result );

  /**
   * Invoked in response to a disconnect request.
   * @param event
   */
   public  void  onDisconnectDone ( int result );

  /**
   * Invoked when the initUDP handshake completes with the server.
   * @param result
   */
   public  void  onInitUDPDone ( int result );
Room Request Listener
/**
   * Invoked in response to a subscribeRoom request.
   * @param event
   */
   public  void  onSubscribeRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a UnSubscribeRoom request.
   * @param event
   */
   public  void  onUnSubscribeRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a joinRoom request.
   * @param event
   */
   public  void  onJoinRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a leaveRoom request.
   * @param event
   */
   public  void  onLeaveRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a getLiveRoomInfo request.
   * @param event
   */
   public  void  onGetLiveRoomInfoDone ( AppWarp :: liveroom event );
  /**
   * Invoked in response to a setCustomRoomData request.
   * @param event
   */
   public  void  onSetCustomRoomDataDone ( AppWarp :: liveroom event );
  /* TODO Added by saurav for match making
   * Invoked in response to add property to any room
   */
   public  void  onUpdatePropertyDone ( AppWarp :: liveroom event );
Zone Request Listener
/**
   * Invoked in response to a deleteRoom request.
   * @param event
   */
   public  void  onDeleteRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a getAllRooms request.
   * @param event
   */
   public  void  onGetAllRoomsDone ( AppWarp :: liveresult event );
  /**
   * Invoked in response to a createRoom request.
   * @param event
   */
   public  void  onCreateRoomDone ( AppWarp :: room event );
  /**
   * Invoked in response to a getOnlineUsers request.
   * @param event
   */
   public  void  onGetOnlineUsersDone ( AppWarp :: liveresult event );
  /**
   * Invoked in response to a getLiveUserInfo request.
   * @param event
   */
   public  void  onGetLiveUserInfoDone ( AppWarp :: liveuser event );
  /**
   * Invoked in response to a setCustomRoomData request.
   * @param event
   */
   public  void  onSetCustomUserDataDone ( AppWarp :: liveuser event );
  
   /**
   * Invoked in response to a getMatchMaking Rooms request.
   * @param event
   */
   public  void  onGetMatchedRoomsDone ( AppWarp :: matchedroom event );
Lobby Request Listener
/**
   * Invoked in response to a joinLobby request.
   * @param event
   */
   public  void  onJoinLobbyDone ( AppWarp :: lobby event );
  /**
   * Invoked in response to a leaveLobby request.
   * @param event
   */
   public  void  onLeaveLobbyDone ( AppWarp :: lobby event );
  /**
   * Invoked in response to a subscribeLobby request.
   * @param event
   */
   public  void  onSubscribeLobbyDone ( AppWarp :: lobby event );
  /**
   * Invoked in response to a UnSubscribeLobby request.
   * @param event
   */
   public  void  onUnSubscribeLobbyDone ( AppWarp :: lobby event );
  /**
   * Invoked in response to a getLiveLobbyInfo request.
   * @param event
   */
   public  void  onGetLiveLobbyInfoDone ( AppWarp :: livelobby event );
Update Request Listener
/**
   * Result of SendUpdatePeers request. The result value maps to a WarpResponseResultCode
   * @param result
   */
   public void  onSendUpdateDone ( int result );
Chat Request Listener
/**
   * Result of SendChat request. The result value maps to a WarpResponseResultCode
   * @param result
   */
   public  void  onSendChatDone ( int result );

  /**
   * Result of SendPrivateChat request. The result value maps to a WarpResponseResultCode
   * @param result
   */
   public  void  onSendPrivateChatDone ( int result );
Notify Listener
/**
   * Invoked when a room is created. Lobby subscribers will receive this.
   * @param event
   */
   public  void  onRoomCreated ( AppWarp :: room event );
  /**
   * Invoked when a room is deleted. Lobby subscribers will receive this.
   * @param event
   */
   public  void  onRoomDestroyed ( AppWarp :: room event );
  /**
   * Invoked when a user leaves a room. Lobby and the concerned room subscribers 
   * will receive this.
   * @param event
   * @param username
   */
   public  void  onUserLeftRoom ( AppWarp :: room event , std :: string username );
  /**
   * Invoked when a user joins a room. Lobby and the concerned room subscribers 
   * will receive this.
   * @param event
   * @param username
   */
   public  void  onUserJoinedRoom ( AppWarp :: room event , std :: string username );

  /**
   * Invoked when a user leaves a lobby. Lobby subscribers will receive this.
   * @param event
   * @param username
   */
   public  void  onUserLeftLobby ( AppWarp :: lobby event , std :: string username );
  /**
   * Invoked when a user joins a lobby. Lobby subscribers will receive this.
   * @param event
   * @param username
   */
   public  void  onUserJoinedLobby ( AppWarp :: lobby event , std :: string username );    
  
  /**
   * Invoked when a joined user sends a chat. Rooms subscribers will receive this.
   * @param event
   */
   public  void  onChatReceived ( AppWarp :: chat event );
  /**
   * Invoked when a joined user sends a updatePeers request. Rooms subscribers 
   * will receive this.
   * @param update
   * @param len
   * @param isUDP
   */
   public  void  onUpdatePeersReceived ( AppWarp :: byte update [],  int len, bool isUDP );
  /**
   * Invoked when a user change room property. Lobby and the concerned room subscribers 
   * will receive this.
   * @param event
   * @param username
 * @param properties
   */
   public  void  onUserChangeRoomProperty ( AppWarp :: room event , std :: string username , std :: map < std :: string , std :: string > properties , std :: map < std :: string , std :: string > lockTable );

  /**
   * Invoked when a game starts
   * @param sender
   * @param room
   * @param nextTurn
   */
  public void onGameStarted(std::string sender, std::string room, std::string nextTurn);

  /**
   * Invoked when game stops.
   * @param sender
   * @param room
   */
   public void onGameStopped(std::string sender, std::string room);
  /**
   * Invoked when a user had encountered a connection error and is trying to recover the connection.
   * @param user
   * @param locId
   * @param isLobby
   */
   public void onUserPaused(std::string user,std::string locId,bool isLobby);

  /**
   * Invoked when a user had recovered from the connection error.
   * @param user
   * @param locId
   * @param isLobby
   */
   public void onUserResumed(std::string user,std::string locId,bool isLobby);
Turn Based Room Listener
    /**
* Invoked when a response for a sendMove request is received.
* @param result
*/
void onSendMoveDone(int result);
/**
* Invoked when a response for a startGame request is received.
* @param result
*/
void onStartGameDone(int result);
/**
* Invoked when a response for a stopGame request is received.
* @param result
*/
void onStopGameDone(int result);
/**
* Invoked when a response for a getMoveHistory request is received.
* @param result
* @param history
*/
void onGetMoveHistoryDone(int result, std::vector<move> history);