Main Page | Modules | Class List | File List | Class Members | File Members

# Functions
[Login Service]

Messages sent to the game service. More...

## Functions
GSbool | Login_Engine (GSuint uiMaxPostingDelay=500, GSuint uiMaxsOperationalDelay=800)
| Update connection status-messages handling relating to the login service.
GSbool | LoginSend_Connect (const GSchar *szAddress, GSushort usPort)
| Connect to the router.
GSbool | LoginSend_Disconnect ()
| Disconnect from the router.
GSbool | LoginSend_LoginRouter (const GSchar *szUsername, const GSchar *szPassword, const GSchar *szVersion, GSbool bPublicIP=GS_TRUE)
| Login to the router.
GSbool | LoginSend_JoinWaitModule ()
| Ask to join the wait module.
GSbool | LoginSend_LoginWaitModule (const GSchar *szUsername)
| Login to the wait module.
GSbool | LoginSend_PlayerInfo (const GSchar *szUsername)
| Get player account information.
GSbool | LoginSend_Sleep ()
| Put player in sleep mode.
GSbool | LoginSend_WakeUp ()
| Put player in awake mode.
GSbool | LoginSend_ModifyAccount (const GSchar *szPassword, const GSchar *szFirstName, const GSchar *szLastName, const GSchar *szEmail, const GSchar *szCountry)
| Modify player informations.
GSbool | LoginSend_CreateAccount (const GSchar *szVersion, const GSchar *szUsername, const GSchar *szPassword, const GSchar *szFirstName, const GSchar *szLastName, const GSchar *szEmail, const GSchar *szCountry)
| Account creation.
GSbool | LoginSend_RequestMOTD (const GSchar *szLanguage)
| Request the message of the day.

## Detailed Description

These function are used to send login-related messages to the server

## Function Documentation

GSbool Login_Engine | ( | GSuint | uiMaxPostingDelay = 500,
|  | GSuint | uiMaxsOperationalDelay = 800
| ) |

  | Description: Updates the connection between the client and the server, and handles the delivery of queued up messages and reception of messages relating to the login service. This function should be called regularly to ensure that the application will run smoothly. Returns: Status of the function call Return values:
  GS_TRUE | The connection is ok and function call was a success
  GS_FALSE | There has been a communication problem between the client and the server
  Parameters:
  uiMaxPostingDelay | The maximum time to be spent inside the engine to read incomming messages and posting them to the message queue. (Milliseconds)
  uiMaxsOperationalDelay | The maximum time to be spent inside the engine to decode message in the queue and calling appropriate callback. (Milliseconds)

GSbool LoginSend_Connect | ( | const GSchar * | szAddress,
|  | GSushort | usPort
| ) |

  | Description: This function is opens a connect to the router or wait module. When this function returns successfully LoginSend_LoginRouter() should be called. When connecting to the wait module you should call LoginSend_LoginWaitModule() next. Returns: Status of the function call Return values:
  GS_TRUE | Connection established
  GS_FALSE | Failed to established connection
  Parameters:
  szAddress | Router's IP address
  usPort | Router's client port number

GSbool LoginSend_CreateAccount | ( | const GSchar * | szVersion,
|  | const GSchar * | szUsername,
|  | const GSchar * | szPassword,
|  | const GSchar * | szFirstName,
|  | const GSchar * | szLastName,
|  | const GSchar * | szEmail,
|  | const GSchar * | szCountry
| ) |

  | Description: This function is used to create a new account on the gs network NOTE: You have to call this function before login to the waitmodule. and after the LoginSend_Connect function. Callbacks: CBLoginRcv_AccountCreationResult Returns: Status of the function call Return values:
  GS_TRUE | Account created successfully
  GS_FALSE | Failure to create account
  Parameters:
  szVersion | Version of the player'client
  szUsername | Username of the player
  szPassword | Password of the new player
  szFirstName | Player's first name
  szLastName | Player's last name
  szEmail | Player's email
  szCountry | Player's country

GSbool LoginSend_Disconnect | ( |  | ) |

  | Description: Disconnect from the Server Returns: Status of the function call Return values:
  GS_TRUE | Disconnection successfull
  GS_FALSE | Failed to disconnect

GSbool LoginSend_JoinWaitModule | ( |  | ) |

  | Description: This function is used to ask to join the wait module the router will respond with the ip and port of the wait module to join. This should only be called after receving a successfull CBLoginRcv_LoginRouterResult Callbacks: CBLoginRcv_JoinWaitModuleResult Returns: Status of the function call Return values:
  GS_TRUE | Request successfull
  GS_FALSE | Request failure

GSbool LoginSend_LoginRouter | ( | const GSchar * | szUsername,
|  | const GSchar * | szPassword,
|  | const GSchar * | szVersion,
|  | GSbool | bPublicIP = GS_TRUE
| ) |

  | Description: This function is used to login to the router using your username and password for your game service account. The szVersion parameter will is the games client version. This will be given to you by the Game Service developers. Callbacks: CBLoginRcv_LoginRouterResult Returns: Status of the function call Return values:
  GS_TRUE | Login successfull
  GS_FALSE | Login failed
  Parameters:
  szUsername | The username of the player that wants to log in
  szPassword | The password
  szVersion | The version of the client
  bPublicIP | If this flag is enabled, the ip address will be sent to players in your along with others player infos, if not your ip will not be sent to other players, thus preventing them to ping you.

GSbool LoginSend_LoginWaitModule | ( | const GSchar * | szUsername | ) |

  | Description: This function is used to login to the waitmodule. It should only be called after successfully using LoginSend_Connect() to connect to the wait module. Callbacks: CBLoginRcv_LoginWaitModuleResult Returns: Status of the function call Return values:
  GS_TRUE | Login successfull
  GS_FALSE | Login failed
  Parameters:
  szUsername | The Username of the player

GSbool LoginSend_ModifyAccount | ( | const GSchar * | szPassword,
|  | const GSchar * | szFirstName,
|  | const GSchar * | szLastName,
|  | const GSchar * | szEmail,
|  | const GSchar * | szCountry
| ) |

  | Description: This function is used to modify account information for a player. Callbacks: CBLoginRcv_ModifyUserResult Returns: Status of the function call Return values:
  GS_TRUE | Successfully modify the account
  GS_FALSE | Failure to modify the account
  Parameters:
  szPassword | the new Password for the player
  szFirstName | the new First name for the player
  szLastName | the new Last name for the player
  szEmail | the new Email for the player
  szCountry | the new Country for the player

GSbool LoginSend_PlayerInfo | ( | const GSchar * | szUsername | ) |

  | Description: This function is used to get information stored for a player. Inorder to use the chat sdk it is important to call this on yourself after sucessfully logging in. This is because you must get your szIRCID before using chat and the correct case for the username. Callbacks: CBLoginRcv_PlayerInfo Returns: Status of the function call Return values:
  GS_TRUE | Success
  GS_FALSE | Failure
  Parameters:
  szUsername | The username of the the player you want the info of.

GSbool LoginSend_RequestMOTD | ( | const GSchar * | szLanguage | ) |

  | Description: This function asks the server to send the message of the day based the client version and the requested language. If the request language is not available it will default to english. Callbacks: CBLoginRcv_RequestMOTD Returns: Status of the function call Return values:
  GS_TRUE | Account created successfully
  GS_FALSE | Failure to create account
  Parameters:
  szLanguage | The language to receive the MOTD in.

GSbool LoginSend_Sleep | ( |  | ) |

  | Description: This function is used to put the player in sleep mode, which means he will not receive any message from the server until he calls LoginSend_WakeUp(). The message are stored when a player is in sleep mode. Related Function: LoginSend_WakeUp() Returns: Status of the function call Return values:
  GS_TRUE | Successfully put in sleep mode
  GS_FALSE | Failure to put in sleep mode

GSbool LoginSend_WakeUp | ( |  | ) |

  | Description: This function is used to put the player in "awake" mode which means that he will start to receive message from the router again. Any system and page messages that were saved while the player was asleep will be sent. Related Function: LoginSend_Sleep() Returns: Status of the function call Return values:
  GS_TRUE | Successfully put in awake mode
  GS_FALSE | Failure to put in awake mode

Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team