diff options
author | Armin Weatherwax | 2009-06-26 09:39:58 +0200 |
---|---|---|
committer | Armin Weatherwax | 2009-07-11 13:42:35 +0200 |
commit | 7067b31a6114089217e482bfecc58fd56bed4272 (patch) | |
tree | e0bb99a42c64cdb75e9ca15a38bc1171377c7739 /linden/indra/newview/floaterlogin.h | |
parent | Updated URL for Mac OpenAL libs package. (diff) | |
download | meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.zip meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.gz meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.bz2 meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.xz |
BROKEN logoff/relog crashing inconsistently on various startup states.
Diffstat (limited to 'linden/indra/newview/floaterlogin.h')
-rw-r--r-- | linden/indra/newview/floaterlogin.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/linden/indra/newview/floaterlogin.h b/linden/indra/newview/floaterlogin.h new file mode 100644 index 0000000..1800897 --- /dev/null +++ b/linden/indra/newview/floaterlogin.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * floaterlogin.h | ||
3 | * SecondLife | ||
4 | * | ||
5 | * Created by RMS on 7/15/08. | ||
6 | * | ||
7 | */ | ||
8 | #ifndef PL_floaterlogin_H | ||
9 | #define PL_floaterlogin_H | ||
10 | |||
11 | #define LOGIN_OPTION_CONNECT 0 | ||
12 | #define LOGIN_OPTION_QUIT 1 | ||
13 | |||
14 | #include "llfloater.h" | ||
15 | |||
16 | class LoginController; | ||
17 | class AuthenticationModel; | ||
18 | |||
19 | class LoginFloater : public LLFloater | ||
20 | { | ||
21 | public: | ||
22 | LoginFloater(void (*callback)(S32 option, void *user_data), | ||
23 | void *callback_data); | ||
24 | virtual ~LoginFloater(); | ||
25 | |||
26 | virtual BOOL postBuild(); | ||
27 | |||
28 | static void refresh_grids(); | ||
29 | void apply(); | ||
30 | void setDefault(); | ||
31 | void cancel(); | ||
32 | |||
33 | // new-style login methods | ||
34 | static void newShow(const std::string &grid, bool initialLogin, | ||
35 | void (*callback)(S32 option, void *user_data), | ||
36 | void *callback_data); | ||
37 | static void testShow(void *lies); | ||
38 | static void testCallback(S32 option, void *user_data); | ||
39 | virtual std::string& getPassword(); | ||
40 | virtual void setPassword(std::string &password); | ||
41 | virtual bool isSamePassword(std::string &password); | ||
42 | static void getFields(std::string &loginname, std::string &password, | ||
43 | BOOL &remember); | ||
44 | static void setFields(const std::string &loginname, const std::string &password, | ||
45 | BOOL remember); | ||
46 | |||
47 | // LLLoginPanel compatibility | ||
48 | //TODO: Make this not suck | ||
49 | static void show(const LLRect &rect, BOOL show_server, | ||
50 | void (*callback)(S32 option, void *user_data), | ||
51 | void *callback_data); | ||
52 | static void close(); | ||
53 | static void setAlwaysRefresh(bool refresh); | ||
54 | static void refreshLocation(bool force_visible); | ||
55 | virtual void setFocus(BOOL b); | ||
56 | static void giveFocus(); | ||
57 | static void getFields(std::string& firstname, std::string& lastname, | ||
58 | std::string& password, BOOL& remember); | ||
59 | static void setFields(const std::string& firstname, const std::string &lastname, | ||
60 | const std::string& password, BOOL remember); | ||
61 | static void getLocation(std::string &location); | ||
62 | static BOOL isGridComboDirty(); | ||
63 | static void addServer(const std::string& server, S32 domain_name); | ||
64 | static void accept(); | ||
65 | static void cancel_old(); | ||
66 | static void hashPassword(const std::string& password, std::string& hashedPassword); | ||
67 | protected: | ||
68 | static bool sIsInitialLogin; | ||
69 | static std::string sGrid; | ||
70 | private: | ||
71 | enum State { NORMAL, ADD_NEW, ADD_COPY }; | ||
72 | State mState; | ||
73 | std::string mCurGrid; | ||
74 | |||
75 | std::string mIncomingPassword; | ||
76 | std::string mMungedPassword; | ||
77 | |||
78 | void applyChanges(); | ||
79 | bool createNewGrid(); | ||
80 | void update(); | ||
81 | |||
82 | static void onSelectGrid(LLUICtrl *ctrl, void *data); | ||
83 | static void onClickDelete(void *data); | ||
84 | static void onClickAdd(void *data); | ||
85 | static void onClickCopy(void *data); | ||
86 | static void onClickApply(void *data); | ||
87 | static void onClickDefault(void *data); | ||
88 | static void onClickCancel(void *data); | ||
89 | |||
90 | static LoginFloater *sInstance; | ||
91 | static LoginController *sController; | ||
92 | static AuthenticationModel *sModel; | ||
93 | |||
94 | void (*mCallback)(S32 option, void *userdata); | ||
95 | void *mCallbackData; | ||
96 | }; | ||
97 | |||
98 | #endif // PL_floaterlogin_H | ||