Represents identity information about a NetDog node. More...
Public Member Functions | |
| NDIdentity (const void *p) | |
| Constructor, do not call this directly. | |
| ~NDIdentity () | |
| Destructor, do not call this directly. | |
| NDUserID | getUserID (void) |
| Gets an identity's UserID. | |
| void | setUserID (NDUserID id) |
| Sets identity's UserID. | |
| const char * | getUserName (void) |
| Gets an identity's username. | |
| void | setUserName (const char *name) |
| Sets an identity's username. | |
| const char * | getPassword (void) const |
| Gets an identity's password. | |
| void | setPassword (const char *name) |
| Sets an identity's password. | |
| NDNodeID | getNodeID (void) |
| Gets identity's NodeID. | |
| void | setNodeID (NDNodeID id) |
| Sets an identity's NodeID. | |
| NDObjectID | getDefaultObject (void) |
| Gets an identity's default ObjectID. | |
| void | setDefaultObject (NDObjectID oid) |
| Sets an identity's default ObjectID. | |
| NDUserID | getProviderUserID (void) |
| Gets the NodeID of the node that provided this NDIdentity information. | |
| NDRole | getRoleFlags (void) const |
| Gets the NDRole flags of this identity. | |
Public Attributes | |
| void * | _nd_ident |
Examples of using NDIdentity:
// ND: Setup our server's identity
NDIdentity id = channel->getLocalIdentity();
id.setNodeID(1);
channel->setLocalIdentity(id);
| NDIdentity::NDIdentity | ( | const void * | p | ) |
Constructor, do not call this directly
| NDIdentity::~NDIdentity | ( | ) |
Destructor, do not call this directly
| NDObjectID NDIdentity::getDefaultObject | ( | void | ) |
Gets an identity's default ObjectID.
The default object for an identity is a single NDObject which is most closely related to that identity. This would normally be a player-record object. Any other identity-related objects can then be child objects of the default object.
| NDNodeID NDIdentity::getNodeID | ( | void | ) |
Gets an identity's NodeID.
See getUserID for details on NodeID vs UserID.
| const char * NDIdentity::getPassword | ( | void | ) | const |
Gets an identity's password.
| NDUserID NDIdentity::getProviderUserID | ( | void | ) |
Gets the NodeID of the node that provided this NDIdentity information.
| NDRole NDIdentity::getRoleFlags | ( | void | ) | const |
Gets the NDRole flags of this identity.
Role flags can be used to determine a nodes role in the network.
The following roles are supported:
ND_ROLE_LOGIN_SERVER is set for nodes which are accepting login requests (servers)
ND_ROLE_SESSION_SERVER is set for nodes which manage events (servers)
ND_ROLE_OBJECT_SERVER is set for nodes which are object authorities (servers)
| NDUserID NDIdentity::getUserID | ( | void | ) |
Gets an identity's UserID.
The concept of the NDUserID is different from a NDNodeID. An NDNodeID is a unique identifier for each instance of NetDog on the network. An NDUserID is a unique identifier for each user on the network.
So if a single user had multiple applications connected to the same NetDog server, then each application would have the same NDUserID, but different NDNodeIDs.
| const char * NDIdentity::getUserName | ( | void | ) |
Gets an identity's username.
| void NDIdentity::setDefaultObject | ( | NDObjectID | oid | ) |
Sets an identity's default ObjectID.
| oid | New default ObjectID of an identity |
| void NDIdentity::setNodeID | ( | NDNodeID | id | ) |
Sets an identity's NodeID.
| id | New NodeID of an identity |
| void NDIdentity::setPassword | ( | const char * | name | ) |
Sets an identity's password.
| name | The identity's password as a NULL terminated C-string. |
| void NDIdentity::setUserID | ( | NDUserID | id | ) |
Sets an identity's UserID.
| id | New UserID of identity |
| void NDIdentity::setUserName | ( | const char * | name | ) |
Sets an identity's username.
| name | The identity's username as a NULL terminated C-string. |
1.6.1