From 7067b31a6114089217e482bfecc58fd56bed4272 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 26 Jun 2009 09:39:58 +0200 Subject: BROKEN logoff/relog crashing inconsistently on various startup states. --- linden/indra/newview/authentication_model.h | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 linden/indra/newview/authentication_model.h (limited to 'linden/indra/newview/authentication_model.h') diff --git a/linden/indra/newview/authentication_model.h b/linden/indra/newview/authentication_model.h new file mode 100644 index 0000000..858e936 --- /dev/null +++ b/linden/indra/newview/authentication_model.h @@ -0,0 +1,53 @@ +/* + * authentication_model.h + * SecondLife + * + * Created by RMS on 7/17/08. + * + */ + +#ifndef PL_authentication_model_H +#define PL_authentication_model_H + +#include +#include +#include +#include +#include +#include "lluuid.h" +#include "llmemory.h" +#include "llsd.h" + +class AuthenticationModel : public LLSingleton +{ +public: + typedef boost::signal event_t; + typedef boost::signals::connection connection_t; + + AuthenticationModel(); + virtual ~AuthenticationModel(); + + void loadPersistentData(); + void savePersistentData(); + void revert(); + + /* generic update, pull model: */ + connection_t subscribeToModelUpdates(event_t::slot_function_type subscriber); + void unsubscribe(connection_t subscriber); + + /* setters */ + void addAccount(const std::string &grid, const std::string &accountName, const std::string &accountPassword); + void removeAccount(const std::string &grid, const std::string &accountName); + void changePassword(const std::string &grid, const std::string &accountName, const std::string &newPassword); + + /* getters */ + void getAllAccountNames(std::list &names); + void getAccountNames(const std::string &grid, std::set &names); + void getPassword(const std::string &grid, const std::string &accountName, std::string &password); + void requestUpdate(); +protected: + LLSD mAuthLLSD; +private: + event_t mEventUpdate; +}; +#endif // PL_authentication_model_H -- cgit v1.1