From 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:50 -0500 Subject: Second Life viewer sources 1.20.7 --- linden/indra/newview/llviewernetwork.h | 46 ++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'linden/indra/newview/llviewernetwork.h') diff --git a/linden/indra/newview/llviewernetwork.h b/linden/indra/newview/llviewernetwork.h index 176ce43..966034f 100644 --- a/linden/indra/newview/llviewernetwork.h +++ b/linden/indra/newview/llviewernetwork.h @@ -59,18 +59,44 @@ enum EGridInfo GRID_INFO_COUNT }; - -struct LLGridData +/** + * @brief A class to manage the viewer's login state. + * + **/ +class LLViewerLogin : public LLSingleton { - const char* mLabel; - const char* mName; - const char* mLoginURI; - const char* mHelperURI; -}; +public: + LLViewerLogin(); + + void setGridChoice(EGridInfo grid); + void setGridChoice(const std::string& grid_name); + void resetURIs(); + + /** + * @brief Get the enumeration of the grid choice. + * Should only return values > 0 && < GRID_INFO_COUNT + **/ + EGridInfo getGridChoice() const; -extern EGridInfo gGridChoice; -extern LLGridData gGridInfo[]; -extern LLString gGridName; /* Flawfinder: ignore */ + /** + * @brief Get a readable label for the grid choice. + * Returns the readable name for the grid choice. + * If the grid is 'other', returns something + * the string used to specifiy the grid. + **/ + std::string getGridLabel() const; + + std::string getKnownGridLabel(EGridInfo grid_index) const; + + void getLoginURIs(std::vector& uris) const; + std::string getHelperURI() const; + + bool isInProductionGrid(); + +private: + EGridInfo mGridChoice; + std::string mGridName; +}; const S32 MAC_ADDRESS_BYTES = 6; extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ -- cgit v1.1