D2BS
Public Member Functions | Public Attributes

Profile Class Reference

This class represents the details needed to get a player to a game or lobby. More...

List of all members.

Public Member Functions

 Profile ()
 Create a Profile for the currently set profile.
 Profile (String profileName)
 Create a Profile for the named profile.
 Profile (ProfileType pt, String charName, int8_t diff)
 Create a Profile with the given information.
 Profile (ProfileType pt, String account, String pass, String charName, String gateway)
 Create a Profile with the given information.
 Profile (ProfileType pt, String charName, String ip)
 Create a Profile with the given information.
void login ()
 Log the profile in.

Public Attributes

ProfileType type
 The type of profile, see ProfileType.
union {
   String   ip
 The IP of the game to connect to (TCP/IP join).
   String   username
 The username to use to connect to battle.net.
gateway
 The battle.net gateway to connect to.
String character
 The character to select.
int8_t difficulty
 The difficulty to use: 0 - normal, 1 - nightmare, 2 - hell.
uint32_t maxLoginTime
 The number of milliseconds to wait while logging in.
uint32_t maxCharacterSelectTime
 The number of milliseconds to wait for the characters to load.

Detailed Description

This class represents the details needed to get a player to a game or lobby.

This class hides the password. It provides the login() method to use the password.


Constructor & Destructor Documentation

Profile::Profile ( String  profileName)

Create a Profile for the named profile.

Parameters:
profileNameName of the profile to load.
Profile::Profile ( ProfileType  pt,
String  charName,
int8_t  diff 
)

Create a Profile with the given information.

Parameters:
ptThe type of profile, this constructor handles singlePlayer and tcpIpHost types.
charNameName of the character.
diffDifficulty, 0 - normal, 1 - nightmare, 2 - hell.
Profile::Profile ( ProfileType  pt,
String  account,
String  pass,
String  charName,
String  gateway 
)

Create a Profile with the given information.

Parameters:
ptThe type of profile, this constructor handles battleNet and openBattleNet types.
accountAccount name.
passPassword.
charNameName of the character.
gatewaySearch string for the gateway (any substring of the desired gateway, will take first gateway that matches).
Profile::Profile ( ProfileType  pt,
String  charName,
String  ip 
)

Create a Profile with the given information.

Parameters:
ptThe type of profile, this constructor handles singlePlayer and tcpIpHost types.
charNameName of the character.
ipIP address to connect to.