summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login/lllogin.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-05-22 19:04:52 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-05-22 19:04:52 +0200
commit1b67dd855c41f5a0cda7ec2a68d98071986ca703 (patch)
treeab243607f74f78200787bba5b9b88f07ef1b966f /indra/viewer_components/login/lllogin.cpp
parent6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff)
parente1623bb276f83a43ce7a197e388720c05bdefe61 (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts: # autobuild.xml # indra/cmake/CMakeLists.txt # indra/cmake/GoogleMock.cmake # indra/llaudio/llaudioengine_fmodstudio.cpp # indra/llaudio/llaudioengine_fmodstudio.h # indra/llaudio/lllistener_fmodstudio.cpp # indra/llaudio/lllistener_fmodstudio.h # indra/llaudio/llstreamingaudio_fmodstudio.cpp # indra/llaudio/llstreamingaudio_fmodstudio.h # indra/llcharacter/llmultigesture.cpp # indra/llcharacter/llmultigesture.h # indra/llimage/llimage.cpp # indra/llimage/llimagepng.cpp # indra/llimage/llimageworker.cpp # indra/llimage/tests/llimageworker_test.cpp # indra/llmessage/tests/llmockhttpclient.h # indra/llprimitive/llgltfmaterial.h # indra/llrender/llfontfreetype.cpp # indra/llui/llcombobox.cpp # indra/llui/llfolderview.cpp # indra/llui/llfolderviewmodel.h # indra/llui/lllineeditor.cpp # indra/llui/lllineeditor.h # indra/llui/lltextbase.cpp # indra/llui/lltextbase.h # indra/llui/lltexteditor.cpp # indra/llui/lltextvalidate.cpp # indra/llui/lltextvalidate.h # indra/llui/lluictrl.h # indra/llui/llview.cpp # indra/llwindow/llwindowmacosx.cpp # indra/newview/app_settings/settings.xml # indra/newview/llappearancemgr.cpp # indra/newview/llappearancemgr.h # indra/newview/llavatarpropertiesprocessor.cpp # indra/newview/llavatarpropertiesprocessor.h # indra/newview/llbreadcrumbview.cpp # indra/newview/llbreadcrumbview.h # indra/newview/llbreastmotion.cpp # indra/newview/llbreastmotion.h # indra/newview/llconversationmodel.h # indra/newview/lldensityctrl.cpp # indra/newview/lldensityctrl.h # indra/newview/llface.inl # indra/newview/llfloatereditsky.cpp # indra/newview/llfloatereditwater.cpp # indra/newview/llfloateremojipicker.h # indra/newview/llfloaterimsessiontab.cpp # indra/newview/llfloaterprofiletexture.cpp # indra/newview/llfloaterprofiletexture.h # indra/newview/llgesturemgr.cpp # indra/newview/llgesturemgr.h # indra/newview/llimpanel.cpp # indra/newview/llimpanel.h # indra/newview/llinventorybridge.cpp # indra/newview/llinventorybridge.h # indra/newview/llinventoryclipboard.cpp # indra/newview/llinventoryclipboard.h # indra/newview/llinventoryfunctions.cpp # indra/newview/llinventoryfunctions.h # indra/newview/llinventorygallery.cpp # indra/newview/lllistbrowser.cpp # indra/newview/lllistbrowser.h # indra/newview/llpanelobjectinventory.cpp # indra/newview/llpanelprofile.cpp # indra/newview/llpanelprofile.h # indra/newview/llpreviewgesture.cpp # indra/newview/llsavedsettingsglue.cpp # indra/newview/llsavedsettingsglue.h # indra/newview/lltooldraganddrop.cpp # indra/newview/llurllineeditorctrl.cpp # indra/newview/llvectorperfoptions.cpp # indra/newview/llvectorperfoptions.h # indra/newview/llviewerparceloverlay.cpp # indra/newview/llviewertexlayer.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/macmain.h # indra/test/test.cpp
Diffstat (limited to 'indra/viewer_components/login/lllogin.cpp')
-rw-r--r--indra/viewer_components/login/lllogin.cpp140
1 files changed, 70 insertions, 70 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 5d50d1e182..2a0468f3ad 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -1,24 +1,24 @@
-/**
+/**
* @file lllogin.cpp
*
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -30,8 +30,8 @@
/*==========================================================================*|
#ifdef LL_WINDOWS
- // non-virtual destructor warning, boost::statechart does this intentionally.
- #pragma warning (disable : 4265)
+ // non-virtual destructor warning, boost::statechart does this intentionally.
+ #pragma warning (disable : 4265)
#endif
|*==========================================================================*/
@@ -53,7 +53,7 @@ class LLLogin::Impl
{
public:
Impl():
- mPump("login", true) // Create the module's event pump with a tweaked (unique) name.
+ mPump("login", true) // Create the module's event pump with a tweaked (unique) name.
{
mValidAuthResponse["status"] = LLSD();
mValidAuthResponse["errorcode"] = LLSD();
@@ -63,35 +63,35 @@ public:
void connect(const std::string& uri, const LLSD& credentials);
void disconnect();
- LLEventPump& getEventPump() { return mPump; }
+ LLEventPump& getEventPump() { return mPump; }
private:
- LLSD getProgressEventLLSD(const std::string& state, const std::string& change,
- const LLSD& data = LLSD())
- {
- LLSD status_data;
- status_data["state"] = state;
- status_data["change"] = change;
- status_data["progress"] = 0.0f;
-
- if(mAuthResponse.has("transfer_rate"))
- {
- status_data["transfer_rate"] = mAuthResponse["transfer_rate"];
- }
-
- if(data.isDefined())
- {
- status_data["data"] = data;
- }
- return status_data;
- }
-
- void sendProgressEvent(const std::string& state, const std::string& change,
- const LLSD& data = LLSD())
- {
- LLSD status_data = getProgressEventLLSD(state, change, data);
- mPump.post(status_data);
- }
+ LLSD getProgressEventLLSD(const std::string& state, const std::string& change,
+ const LLSD& data = LLSD())
+ {
+ LLSD status_data;
+ status_data["state"] = state;
+ status_data["change"] = change;
+ status_data["progress"] = 0.0f;
+
+ if(mAuthResponse.has("transfer_rate"))
+ {
+ status_data["transfer_rate"] = mAuthResponse["transfer_rate"];
+ }
+
+ if(data.isDefined())
+ {
+ status_data["data"] = data;
+ }
+ return status_data;
+ }
+
+ void sendProgressEvent(const std::string& state, const std::string& change,
+ const LLSD& data = LLSD())
+ {
+ LLSD status_data = getProgressEventLLSD(state, change, data);
+ mPump.post(status_data);
+ }
LLSD validateResponse(const std::string& pumpName, const LLSD& response)
{
@@ -114,19 +114,19 @@ private:
void loginCoro(std::string uri, LLSD credentials);
LLEventStream mPump;
- LLSD mAuthResponse, mValidAuthResponse;
+ LLSD mAuthResponse, mValidAuthResponse;
};
void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params)
{
LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL;
-
+
// Launch a coroutine with our login_() method. Run the coroutine until
// its first wait; at that point, return here.
- std::string coroname =
+ std::string coroname =
LLCoros::instance().launch("LLLogin::Impl::login_",
boost::bind(&Impl::loginCoro, this, uri, login_params));
- LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL;
+ LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL;
}
namespace {
@@ -141,8 +141,8 @@ static LLEventMailDrop sSyncPoint("LoginSync");
void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params)
{
LLSD printable_params = login_params;
- if (printable_params.has("params")
- && printable_params["params"].has("passwd"))
+ if (printable_params.has("params")
+ && printable_params["params"].has("passwd"))
{
printable_params["params"]["passwd"] = "*******";
}
@@ -322,7 +322,7 @@ void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params)
// Tell caller this didn't work out so well.
// *NOTE: The response from LLXMLRPCListener's Poller::poll method returns an
- // llsd with no "responses" node. To make the output from an incomplete login symmetrical
+ // llsd with no "responses" node. To make the output from an incomplete login symmetrical
// to success, add a data/message and data/reason fields.
LLSD error_response(LLSDMap
("reason", mAuthResponse["status"])
@@ -349,7 +349,7 @@ void LLLogin::Impl::disconnect()
//*********************
// LLLogin
LLLogin::LLLogin() :
- mImpl(new LLLogin::Impl())
+ mImpl(new LLLogin::Impl())
{
}
@@ -359,21 +359,21 @@ LLLogin::~LLLogin()
void LLLogin::connect(const std::string& uri, const LLSD& credentials)
{
- mImpl->connect(uri, credentials);
+ mImpl->connect(uri, credentials);
}
void LLLogin::disconnect()
{
- mImpl->disconnect();
+ mImpl->disconnect();
}
LLEventPump& LLLogin::getEventPump()
{
- return mImpl->getEventPump();
+ return mImpl->getEventPump();
}
-// The following is the list of important functions that happen in the
+// The following is the list of important functions that happen in the
// current login process that we want to move to this login module.
// The list associates to event with the original idle_startup() 'STATE'.
@@ -381,15 +381,15 @@ LLEventPump& LLLogin::getEventPump()
// Setup login
// State_LOGIN_AUTH_INIT
-// Authenticate
+// Authenticate
// STATE_LOGIN_AUTHENTICATE
-// Connect to the login server, presumably login.cgi, requesting the login
+// Connect to the login server, presumably login.cgi, requesting the login
// and a slew of related initial connection information.
// This is an asynch action. The final response, whether success or error
// is handled by STATE_LOGIN_PROCESS_REPONSE.
// There is no immediate error or output from this call.
-//
-// Input:
+//
+// Input:
// URI
// Credentials (first, last, password)
// Start location
@@ -404,19 +404,19 @@ LLEventPump& LLLogin::getEventPump()
//sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
//LLUserAuth::getInstance()->authenticate(
-// sAuthUris[sAuthUriNum],
-// auth_method,
-// firstname,
-// lastname,
-// password, // web_login_key,
-// start.str(),
-// gSkipOptionalUpdate,
-// gAcceptTOS,
-// gAcceptCriticalMessage,
-// gLastExecEvent,
-// requested_options,
-// hashed_mac_string,
-// LLAppViewer::instance()->getSerialNumber());
+// sAuthUris[sAuthUriNum],
+// auth_method,
+// firstname,
+// lastname,
+// password, // web_login_key,
+// start.str(),
+// gSkipOptionalUpdate,
+// gAcceptTOS,
+// gAcceptCriticalMessage,
+// gLastExecEvent,
+// requested_options,
+// hashed_mac_string,
+// LLAppViewer::instance()->getSerialNumber());
//
// Download the Response
@@ -427,22 +427,22 @@ LLEventPump& LLLogin::getEventPump()
// that don't need to do so, but geez!
// There are two states to do this one function just to update the login
// status text from 'Logging In...' to 'Downloading...'
-//
+//
//
// Handle Login Response
// STATE_LOGIN_PROCESS_RESPONSE
-//
+//
// This state handle the result of the request to login. There is a metric ton of
// code in this case. This state will transition to:
// STATE_WORLD_INIT, on success.
// STATE_AUTHENTICATE, on failure.
// STATE_UPDATE_CHECK, to handle user during login interaction like TOS display.
//
-// Much of the code in this case belongs on the viewer side of the fence and not in login.
+// Much of the code in this case belongs on the viewer side of the fence and not in login.
// Login should probably return with a couple of events, success and failure.
-// Failure conditions can be specified in the events data pacet to allow the viewer
+// Failure conditions can be specified in the events data pacet to allow the viewer
// to re-engauge login as is appropriate. (Or should there be multiple failure messages?)
-// Success is returned with the data requested from the login. According to OGP specs
-// there may be intermediate steps before reaching this result in future login
+// Success is returned with the data requested from the login. According to OGP specs
+// there may be intermediate steps before reaching this result in future login
// implementations.