LLTrustNet Class Reference

Interface to the TrustNet database. More...

#include <lltrustnet.h>

Collaboration diagram for LLTrustNet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLTrustNet ()
F32 getScore (const LLUUID &avatar, const LLString &type)
 Returns the score for the avatar.
ETrustNetDatumState getScoreState (const LLUUID &avatar, const LLString &type)
 State of a score retrieval.
LLColor4 getScoreColor (const LLUUID &avatar, const LLString &type)
 Returns the color corresponding to the avatar's score This function calculates the color used to represent the avatar's score.
void processRequests ()
 Processes queued requests.
ETrustNetState getConnectionState () const
 State of the TrustNet connection.
LLString getConnectionStateString () const
 State of the TrustNet connection as a string.

Static Public Member Functions

static void viewerCommCallback (LLString &data, LLViewerCircuit &circuit, void *userdata)

Protected Member Functions

void setScore (const LLUUID &avatar, const LLString &type, F32 score)
LLTrustNetScore getScoreData (const LLUUID &avatar, const LLString &type)

Protected Attributes

LLViewerCircuitmCircuit
std::map< LLUUID, LLTrustNetAvatarDatamCache
std::deque< LLTrustNetRequest * > mQueue
ETrustNetState mConnectionState

Detailed Description

Interface to the TrustNet database.

Definition at line 276 of file lltrustnet.h.


Constructor & Destructor Documentation

LLTrustNet::LLTrustNet (  ) 

Definition at line 171 of file lltrustnet.cpp.

References gViewerCommunication, mCircuit, mConnectionState, NULL, LLViewerCommunication::registerExtension(), TRUSTNET_NO_ADAPTER, and viewerCommCallback().


Member Function Documentation

ETrustNetState LLTrustNet::getConnectionState (  )  const [inline]

State of the TrustNet connection.

Definition at line 314 of file lltrustnet.h.

References mConnectionState.

Referenced by LLVOAvatar::idleUpdate().

LLString LLTrustNet::getConnectionStateString (  )  const

State of the TrustNet connection as a string.

Definition at line 288 of file lltrustnet.cpp.

References mConnectionState, TRUSTNET_CONNECTED, TRUSTNET_CONNECTING, TRUSTNET_LOGGING_IN, TRUSTNET_LOGIN_ERROR, TRUSTNET_NO_ADAPTER, and TRUSTNET_NO_CONNECTION.

Referenced by LLVOAvatar::idleUpdate().

F32 LLTrustNet::getScore ( const LLUUID avatar,
const LLString type 
)

Returns the score for the avatar.

Parameters:
avatar Avatar
type Score type
Returns:
Score, 0.0 if unknown or doesn't have any

Definition at line 223 of file lltrustnet.cpp.

References getScoreData(), llendl, llwarns, mCircuit, LLTrustNetScore::mScore, NULL, and type.

Referenced by getScoreColor(), and LLVOAvatar::idleUpdate().

LLColor4 LLTrustNet::getScoreColor ( const LLUUID avatar,
const LLString type 
)

Returns the color corresponding to the avatar's score This function calculates the color used to represent the avatar's score.

Parameters:
avatar Avatar
type Score type
Returns:
Color

Definition at line 256 of file lltrustnet.cpp.

References f, getScore(), LLColor4::grey, and type.

Referenced by LLVOAvatar::idleUpdate().

LLTrustNetScore LLTrustNet::getScoreData ( const LLUUID avatar,
const LLString type 
) [protected]

Definition at line 182 of file lltrustnet.cpp.

References DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, first, gCacheName, LLCacheName::getName(), LLTrustNetDatum::getState(), mCache, mQueue, TNS_FETCHING, TNS_RETRIEVED, and type.

Referenced by getScore(), and getScoreState().

ETrustNetDatumState LLTrustNet::getScoreState ( const LLUUID avatar,
const LLString type 
)

State of a score retrieval.

Parameters:
avatar Avatar
type Score type
Returns:
State

Definition at line 235 of file lltrustnet.cpp.

References getScoreData(), LLTrustNetDatum::getState(), llendl, llwarns, mCircuit, NULL, TNS_UNKNOWN, and type.

Referenced by LLVOAvatar::idleUpdate().

void LLTrustNet::processRequests (  ) 

Processes queued requests.

Definition at line 303 of file lltrustnet.cpp.

References llendl, llinfos, llwarns, mCircuit, mQueue, and LLViewerCircuit::sendReply().

Referenced by idle().

void LLTrustNet::setScore ( const LLUUID avatar,
const LLString type,
F32  score 
) [protected]

Definition at line 248 of file lltrustnet.cpp.

References mCache, and type.

Referenced by viewerCommCallback().

void LLTrustNet::viewerCommCallback ( LLString data,
LLViewerCircuit circuit,
void userdata 
) [static]

Definition at line 133 of file lltrustnet.cpp.

References gTrustNet, i, llendl, llinfos, llwarns, mCircuit, mConnectionState, setScore(), tokenize(), TRUSTNET_CONNECTED, TRUSTNET_LOGGING_IN, TRUSTNET_NO_CONNECTION, and type.

Referenced by LLTrustNet().


Member Data Documentation

std::map<LLUUID, LLTrustNetAvatarData> LLTrustNet::mCache [protected]

Definition at line 328 of file lltrustnet.h.

Referenced by getScoreData(), and setScore().

LLViewerCircuit* LLTrustNet::mCircuit [protected]

Definition at line 327 of file lltrustnet.h.

Referenced by getScore(), getScoreState(), LLTrustNet(), processRequests(), and viewerCommCallback().

ETrustNetState LLTrustNet::mConnectionState [protected]

Definition at line 330 of file lltrustnet.h.

Referenced by getConnectionState(), getConnectionStateString(), LLTrustNet(), and viewerCommCallback().

std::deque<LLTrustNetRequest*> LLTrustNet::mQueue [protected]

Definition at line 329 of file lltrustnet.h.

Referenced by getScoreData(), and processRequests().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:54 2010 for Second Life Viewer by  doxygen 1.4.7