diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/authentication_controller.cpp | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/linden/indra/newview/authentication_controller.cpp b/linden/indra/newview/authentication_controller.cpp new file mode 100644 index 0000000..a060409 --- /dev/null +++ b/linden/indra/newview/authentication_controller.cpp | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * AuthenticationController.cpp | ||
3 | * SecondLife | ||
4 | * | ||
5 | * Created by RMS on 7/1/08. | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #include "llviewerprecompiledheaders.h" | ||
10 | #include "authentication_floater.h" | ||
11 | #include "llviewerobject.h" | ||
12 | #include "llcheckboxctrl.h" | ||
13 | #include "llselectmgr.h" | ||
14 | #include "authentication_controller.h" | ||
15 | |||
16 | // Statics | ||
17 | std::string AuthenticationController::target_grid; | ||
18 | std::string AuthenticationController::username; | ||
19 | std::string AuthenticationController::password; | ||
20 | BOOL AuthenticationController::store_pw = FALSE; | ||
21 | |||
22 | AuthenticationController::AuthenticationController(const std::string& tg, void (*cb)(void*)) | ||
23 | { | ||
24 | target_grid = tg; | ||
25 | callback = cb; | ||
26 | } | ||
27 | |||
28 | AuthenticationController::~AuthenticationController() | ||
29 | { | ||
30 | } | ||
31 | |||
32 | // user interface callbacks: all static | ||
33 | void AuthenticationController::onCommitUser(LLUICtrl* ctrl, void* userdata) | ||
34 | { | ||
35 | AuthenticationFloater *floater = (AuthenticationFloater*)userdata; | ||
36 | username = floater->childGetText("User_edit"); | ||
37 | } | ||
38 | |||
39 | void AuthenticationController::onCommitPassword(LLUICtrl* ctrl, void* userdata) | ||
40 | { | ||
41 | AuthenticationFloater *floater = (AuthenticationFloater*)userdata; | ||
42 | password = floater->childGetText("Password_edit"); | ||
43 | } | ||
44 | |||
45 | void AuthenticationController::onCommitRemember(LLUICtrl* ctrl, void* userdata) | ||
46 | { | ||
47 | LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); | ||
48 | if(!object) return; | ||
49 | |||
50 | LLCheckBoxCtrl *check = (LLCheckBoxCtrl*)ctrl; | ||
51 | store_pw = check->get(); | ||
52 | } | ||
53 | |||
54 | void AuthenticationController::onAccept(void* userdata) | ||
55 | { | ||
56 | |||
57 | } | ||
58 | |||
59 | void AuthenticationController::onCancel(void* userdata) | ||
60 | { | ||
61 | AuthenticationFloater *floater = (AuthenticationFloater*)userdata; | ||
62 | floater->cancel(); | ||
63 | floater->close(); | ||
64 | } | ||
65 | |||
66 | void AuthenticationController::onClickRegister(void* userdata) | ||
67 | { | ||
68 | llinfos << "onClickRegister" << llendl; | ||
69 | } | ||
70 | |||
71 | void AuthenticationController::retrieveStoredAccountData(void* userdata) | ||
72 | { | ||
73 | |||
74 | } | ||
75 | |||
76 | // static | ||
77 | std::string AuthenticationController::getTargetGrid() | ||
78 | { | ||
79 | return target_grid; | ||
80 | } | ||