diff options
Diffstat (limited to 'linden/indra/newview/llloginhandler.h')
-rw-r--r-- | linden/indra/newview/llloginhandler.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/linden/indra/newview/llloginhandler.h b/linden/indra/newview/llloginhandler.h new file mode 100644 index 0000000..c76d7e8 --- /dev/null +++ b/linden/indra/newview/llloginhandler.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /** | ||
2 | * @file llloginhandler.h | ||
3 | * @brief Handles filling in the login panel information from a SLURL | ||
4 | * such as secondlife:///app/login?first=Bob&last=Dobbs | ||
5 | * | ||
6 | * $LicenseInfo:firstyear=2008&license=viewergpl$ | ||
7 | * | ||
8 | * Copyright (c) 2008-2009, Linden Research, Inc. | ||
9 | * | ||
10 | * Second Life Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
12 | * to you under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
16 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
17 | * | ||
18 | * There are special exceptions to the terms and conditions of the GPL as | ||
19 | * it is applied to this Source Code. View the full text of the exception | ||
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
21 | * online at | ||
22 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
23 | * | ||
24 | * By copying, modifying or distributing this software, you acknowledge | ||
25 | * that you have read and understood your obligations described above, | ||
26 | * and agree to abide by those obligations. | ||
27 | * | ||
28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
30 | * COMPLETENESS OR PERFORMANCE. | ||
31 | * $/LicenseInfo$ | ||
32 | */ | ||
33 | #ifndef LLLOGINHANDLER_H | ||
34 | #define LLLOGINHANDLER_H | ||
35 | |||
36 | #include "llcommandhandler.h" | ||
37 | |||
38 | class LLLoginHandler : public LLCommandHandler | ||
39 | { | ||
40 | public: | ||
41 | // allow from external browsers | ||
42 | LLLoginHandler() : LLCommandHandler("login", false) { } | ||
43 | /*virtual*/ bool handle(const LLSD& tokens, const LLSD& query_map, LLWebBrowserCtrl* web); | ||
44 | |||
45 | // Fill in our internal fields from a SLURL like | ||
46 | // secondlife:///app/login?first=Bob&last=Dobbs | ||
47 | bool parseDirectLogin(std::string url); | ||
48 | |||
49 | std::string getFirstName() const { return mFirstName; } | ||
50 | std::string getLastName() const { return mLastName; } | ||
51 | LLUUID getWebLoginKey() const { return mWebLoginKey; } | ||
52 | |||
53 | private: | ||
54 | void parse(const LLSD& queryMap); | ||
55 | |||
56 | private: | ||
57 | std::string mFirstName; | ||
58 | std::string mLastName; | ||
59 | LLUUID mWebLoginKey; | ||
60 | }; | ||
61 | |||
62 | extern LLLoginHandler gLoginHandler; | ||
63 | |||
64 | #endif | ||