Session Class Reference
#include <Ample.h>
List of all members.
Detailed Description
Session class. Represents a single session with a verse server.
Member Typedef Documentation
Member Enumeration Documentation
Session state enumeration.
- Enumerator:
| CONNECTING |
The session is still being created.
|
| CONNECTED |
The session is established and exchanging data.
|
| TERMINATED |
The session is terminated. The object will remain for inspection until a new session is created with the same server.
|
| RELEASED |
The session is released, i.e. flagged for deletion. The object will remain until the first subsequent call to Session::update.
|
Member Function Documentation
Adds the specified observer to this object.
- Parameters:
-
| observer | The observer to add. |
| static Session* create |
( |
const std::string & |
address, |
|
|
const std::string & |
username, |
|
|
const std::string & |
password, |
|
|
unsigned int |
typeMask = 0 | |
|
) |
| | [static] |
Creates a session with the specified verse server.
- Parameters:
-
| address | The address of the desired verse server. |
| username | The desired user name for the session. |
| password | The password for the specified user. |
| typeMask | A bitmask for the desired node types. |
| void createNode |
( |
const std::string & |
name, |
|
|
VNodeType |
type | |
|
) |
| | |
Creates a node with the specified name and of the specified type.
- Parameters:
-
| name | The desired name of the node. |
| type | The desired type of the node. |
| static Session* find |
( |
const std::string & |
address |
) |
[static] |
Searches for a session with the specified server address.
- Parameters:
-
| address | The server address to search for. |
- Returns:
- The session with the specified address, or
NULL.
| const std::string& getAddress |
( |
void |
|
) |
const |
- Returns:
- The address of the verse server for this session.
| const Node* getAvatarNode |
( |
void |
|
) |
const |
- Returns:
- The avatar node for this session.
| Node* getAvatarNode |
( |
void |
|
) |
|
- Returns:
- The avatar node for this session.
| static Session* getByIndex |
( |
unsigned int |
index |
) |
[static] |
- Parameters:
-
| index | The index of the desired session. |
- Returns:
- The session with the specified index, or
NULL if no such session exists.
| static unsigned int getCount |
( |
void |
|
) |
[static] |
- Returns:
- The number of sessions.
| static Session* getCurrent |
( |
void |
|
) |
[static] |
- Returns:
- The active session, or
NULL if no session is active.
| unsigned int getDataVersion |
( |
void |
|
) |
const [inherited] |
- Returns:
- The current version of the internal state.
| const Node* getNodeByID |
( |
VNodeID |
ID |
) |
const |
- Parameters:
-
| ID | The ID of the desired node. |
- Returns:
- The node with the specified ID, or
NULL if no such node exists.
| Node* getNodeByID |
( |
VNodeID |
ID |
) |
|
- Parameters:
-
| ID | The ID of the desired node. |
- Returns:
- The node with the specified ID, or
NULL if no such node exists.
| const Node* getNodeByIndex |
( |
unsigned int |
index |
) |
const |
- Parameters:
-
| index | The index of the desired node. |
- Returns:
- The node at the specified index, or
NULL if no such node exists.
| Node* getNodeByIndex |
( |
unsigned int |
index |
) |
|
- Parameters:
-
| index | The index of the desired node. |
- Returns:
- The node at the specified index, or
NULL if no such node exists.
| const Node* getNodeByName |
( |
const std::string & |
name |
) |
const |
- Parameters:
-
| name | The name of the desired node |
- Returns:
- The node with the specified name, or
NULL if no such node exists.
| Node* getNodeByName |
( |
const std::string & |
name |
) |
|
- Parameters:
-
| name | The name of the desired node |
- Returns:
- The node with the specified name, or
NULL if no such node exists.
| unsigned int getNodeCount |
( |
void |
|
) |
const |
- Returns:
- The number of nodes visible in this session.
| const ObserverList& getObservers |
( |
void |
|
) |
const [inline, inherited] |
- Returns:
- The list of observers attached to this object.
| State getState |
( |
void |
|
) |
const |
- Returns:
- The state of this session.
| unsigned int getStructureVersion |
( |
void |
|
) |
const [inherited] |
- Returns:
- The current version of the internal structure.
Pops this session from the internal stack and activates the previous one.
Pushes this session onto the internal stack and makes it the active session.
Schedules a terminated session for destruction. Actual destruction will take place at the first subsequent call to Session::update. Note that this call has no effect unless the session is in the terminated state.
Removes the specified observer from this object.
- Parameters:
-
| observer | The observer to remove. |
Removes the specified observer from this object.
- Parameters:
-
| observer | The observer to remove. |
| void terminate |
( |
const std::string & |
byebye |
) |
|
Terminates this session with the specified message.
- Parameters:
-
| byebye | The desired termination message. |
| static void terminateAll |
( |
const std::string & |
byebye |
) |
[static] |
Terminates all connected sessions with the specified message.
- Parameters:
-
| byebye | The desired termination message. |
| static void update |
( |
uint32 |
microseconds |
) |
[static] |
Updates all session and associated data. This call will cause all the commands issued and received since the last update to take effect, including triggering observers.
- Parameters:
-
| microseconds | The maximum number of microseconds to block, when waiting for new commands. |