#include <lluserauth.h>
Public Types | |
enum | UserAuthcode { E_NO_RESPONSE_YET = -2, E_DOWNLOADING = -1, E_OK = 0, E_COULDNT_RESOLVE_HOST, E_SSL_PEER_CERTIFICATE, E_SSL_CACERT, E_SSL_CONNECT_ERROR, E_UNHANDLED_ERROR, E_LAST } |
typedef std::map< std::string, std::string > | response_t |
typedef std::vector< response_t > | options_t |
Public Member Functions | |
LLUserAuth () | |
~LLUserAuth () | |
void | authenticate (const char *auth_uri, const char *auth_method, const char *firstname, const char *lastname, LLUUID web_login_key, const char *start, BOOL skip_optional_update, BOOL accept_tos, BOOL accept_critical_message, BOOL last_exec_froze, const std::vector< const char * > &requested_options, const std::string &hashed_mac, const std::string &hashed_volume_serial) |
void | authenticate (const char *auth_uri, const char *auth_method, const char *firstname, const char *lastname, const char *password, const char *start, BOOL skip_optional_update, BOOL accept_tos, BOOL accept_critical_message, BOOL last_exec_froze, const std::vector< const char * > &requested_options, const std::string &hashed_mac, const std::string &hashed_volume_serial) |
UserAuthcode | authResponse () |
void | reset () |
std::string | errorMessage () const |
const char * | getResponse (const char *name) const |
BOOL | getOptions (const char *name, options_t &options) const |
F64 | getLastTransferRateBPS () const |
Private Types | |
typedef std::map< std::string, options_t > | all_options_t |
Private Member Functions | |
UserAuthcode | parseResponse () |
Private Attributes | |
LLXMLRPCTransaction * | mTransaction |
UserAuthcode | mAuthResponse |
std::string | mErrorMessage |
response_t | mResponses |
all_options_t | mOptions |
F64 | mLastTransferRateBPS |
Definition at line 73 of file lluserauth.h.
typedef std::map<std::string, std::string> LLUserAuth::response_t |
Definition at line 93 of file lluserauth.h.
typedef std::vector<response_t> LLUserAuth::options_t |
Definition at line 94 of file lluserauth.h.
typedef std::map<std::string, options_t> LLUserAuth::all_options_t [private] |
Definition at line 149 of file lluserauth.h.
E_NO_RESPONSE_YET | |
E_DOWNLOADING | |
E_OK | |
E_COULDNT_RESOLVE_HOST | |
E_SSL_PEER_CERTIFICATE | |
E_SSL_CACERT | |
E_SSL_CONNECT_ERROR | |
E_UNHANDLED_ERROR | |
E_LAST |
Definition at line 80 of file lluserauth.h.
LLUserAuth::LLUserAuth | ( | ) |
LLUserAuth::~LLUserAuth | ( | ) |
Definition at line 77 of file lluserauth.cpp.
References reset().
void LLUserAuth::authenticate | ( | const char * | auth_uri, | |
const char * | auth_method, | |||
const char * | firstname, | |||
const char * | lastname, | |||
LLUUID | web_login_key, | |||
const char * | start, | |||
BOOL | skip_optional_update, | |||
BOOL | accept_tos, | |||
BOOL | accept_critical_message, | |||
BOOL | last_exec_froze, | |||
const std::vector< const char * > & | requested_options, | |||
const std::string & | hashed_mac, | |||
const std::string & | hashed_volume_serial | |||
) |
Definition at line 91 of file lluserauth.cpp.
References E_NO_RESPONSE_YET, gCurrentVersion, LLControlGroup::getString(), LLUUID::getString(), gSavedSettings, LL_ENDL, LL_INFOS2, mAuthResponse, mTransaction, NULL, and request().
Referenced by idle_startup().
void LLUserAuth::authenticate | ( | const char * | auth_uri, | |
const char * | auth_method, | |||
const char * | firstname, | |||
const char * | lastname, | |||
const char * | password, | |||
const char * | start, | |||
BOOL | skip_optional_update, | |||
BOOL | accept_tos, | |||
BOOL | accept_critical_message, | |||
BOOL | last_exec_froze, | |||
const std::vector< const char * > & | requested_options, | |||
const std::string & | hashed_mac, | |||
const std::string & | hashed_volume_serial | |||
) |
Definition at line 175 of file lluserauth.cpp.
References E_NO_RESPONSE_YET, gCurrentVersion, LLControlGroup::getString(), gSavedSettings, LL_ENDL, LL_INFOS2, mAuthResponse, mTransaction, NULL, and request().
LLUserAuth::UserAuthcode LLUserAuth::authResponse | ( | ) |
Definition at line 257 of file lluserauth.cpp.
References E_COULDNT_RESOLVE_HOST, E_DOWNLOADING, E_SSL_CACERT, E_SSL_CONNECT_ERROR, E_SSL_PEER_CERTIFICATE, E_UNHANDLED_ERROR, LL_ENDL, LL_INFOS2, mAuthResponse, mErrorMessage, mLastTransferRateBPS, mTransaction, NULL, parseResponse(), LLXMLRPCTransaction::process(), LLXMLRPCTransaction::status(), LLXMLRPCTransaction::StatusDownloading, LLXMLRPCTransaction::statusMessage(), and LLXMLRPCTransaction::transferRate().
Referenced by idle_startup().
void LLUserAuth::reset | ( | ) |
Definition at line 82 of file lluserauth.cpp.
References mOptions, mResponses, mTransaction, and NULL.
Referenced by idle_startup(), and ~LLUserAuth().
std::string LLUserAuth::errorMessage | ( | ) | const [inline] |
Definition at line 133 of file lluserauth.h.
References mErrorMessage.
Referenced by idle_startup().
const char * LLUserAuth::getResponse | ( | const char * | name | ) | const |
Definition at line 410 of file lluserauth.cpp.
References mResponses, and NULL.
Referenced by idle_startup().
F64 LLUserAuth::getLastTransferRateBPS | ( | ) | const [inline] |
Definition at line 140 of file lluserauth.h.
References mLastTransferRateBPS.
Referenced by idle_startup().
LLUserAuth::UserAuthcode LLUserAuth::parseResponse | ( | ) | [private] |
Definition at line 346 of file lluserauth.cpp.
References E_OK, E_UNHANDLED_ERROR, lldebugs, llendl, llwarns, MAX_STRING, mOptions, mResponses, mTransaction, NULL, parseOptionInto(), and LLXMLRPCTransaction::response().
Referenced by authResponse().
LLXMLRPCTransaction* LLUserAuth::mTransaction [private] |
Definition at line 143 of file lluserauth.h.
Referenced by authenticate(), authResponse(), parseResponse(), and reset().
UserAuthcode LLUserAuth::mAuthResponse [private] |
Definition at line 145 of file lluserauth.h.
Referenced by authenticate(), authResponse(), and LLUserAuth().
std::string LLUserAuth::mErrorMessage [private] |
response_t LLUserAuth::mResponses [private] |
Definition at line 150 of file lluserauth.h.
Referenced by getResponse(), parseResponse(), and reset().
all_options_t LLUserAuth::mOptions [private] |
Definition at line 151 of file lluserauth.h.
Referenced by getOptions(), parseResponse(), and reset().
F64 LLUserAuth::mLastTransferRateBPS [private] |
Definition at line 155 of file lluserauth.h.
Referenced by authResponse(), and getLastTransferRateBPS().