ggz.client.core
Class GameEvent

java.lang.Object
  extended by ggz.client.core.GameEvent

public class GameEvent
extends java.lang.Object

A GGZGameEvent is an event associated with the game, that is triggered by a communication from the server or from the game. When a game event occurs, the associated event handle will be called, and will be passed the event data (a void*) along with the (optional) user data. All game events apply to the current game. Game events are usually triggered by calling ggzcore_server_read_data or ggzcore_game_read_data.

See Also:
ggzcore_game_add_event_hook, ggzcore_server_read_data

Field Summary
static GameEvent GGZ_GAME_LAUNCH_FAIL
          Your game launch has failed.
static GameEvent GGZ_GAME_LAUNCHED
          A game was launched by the player (you).
static GameEvent GGZ_GAME_NEGOTIATE_FAIL
          Negotiation was not successful, game launch failed.
static GameEvent GGZ_GAME_NEGOTIATED
          Negotiation with server was successful.
static GameEvent GGZ_GAME_PLAYING
          Game reached the 'playing' state.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GGZ_GAME_LAUNCHED

public static final GameEvent GGZ_GAME_LAUNCHED
A game was launched by the player (you). After this the core client should call ggzcore_game_get_control_fd, monitor the socket that function returns, and call ggzcore_game_read_data when there is data pending. This event is triggered inside of ggzcore_game_launch.

See Also:
ggzcore_game_launch

GGZ_GAME_LAUNCH_FAIL

public static final GameEvent GGZ_GAME_LAUNCH_FAIL
Your game launch has failed. Triggered instead of GGZ_GAME_LAUNCHED when there's a failure somewhere.

See Also:
GGZ_GAME_LAUNCHED

GGZ_GAME_NEGOTIATED

public static final GameEvent GGZ_GAME_NEGOTIATED
Negotiation with server was successful. This should happen some time after the launch succeeds. The core client need do nothing at this point.


GGZ_GAME_NEGOTIATE_FAIL

public static final GameEvent GGZ_GAME_NEGOTIATE_FAIL
Negotiation was not successful, game launch failed.


GGZ_GAME_PLAYING

public static final GameEvent GGZ_GAME_PLAYING
Game reached the 'playing' state. When this happens the core client should call ggzcore_room_launch_table or ggzcore_room_join_table to finalize the game join.