aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewernetwork.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewernetwork.h63
1 files changed, 9 insertions, 54 deletions
diff --git a/linden/indra/newview/llviewernetwork.h b/linden/indra/newview/llviewernetwork.h
index 6c5823c..881629e 100644
--- a/linden/indra/newview/llviewernetwork.h
+++ b/linden/indra/newview/llviewernetwork.h
@@ -5,7 +5,7 @@
5 * 5 *
6 * $LicenseInfo:firstyear=2006&license=viewergpl$ 6 * $LicenseInfo:firstyear=2006&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2006-2009, Linden Research, Inc. 8 * Copyright (c) 2006-2008, Linden Research, Inc.
9 * 9 *
10 * Second Life Viewer Source Code 10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab 11 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -29,21 +29,9 @@
29 * COMPLETENESS OR PERFORMANCE. 29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$ 30 * $/LicenseInfo$
31 */ 31 */
32
33#ifndef LL_LLVIEWERNETWORK_H 32#ifndef LL_LLVIEWERNETWORK_H
34#define LL_LLVIEWERNETWORK_H 33#define LL_LLVIEWERNETWORK_H
35 34
36class LLHost;
37
38enum EGridInfo
39{
40 GRID_INFO_NONE,
41 GRID_INFO_AGNI,
42 GRID_INFO_ADITI,
43 GRID_INFO_LOCAL,
44 GRID_INFO_OTHER, // IP address set via command line option
45 GRID_INFO_COUNT
46};
47 35
48/** 36/**
49 * @brief A class to manage the viewer's login state. 37 * @brief A class to manage the viewer's login state.
@@ -52,53 +40,20 @@ enum EGridInfo
52class LLViewerLogin : public LLSingleton<LLViewerLogin> 40class LLViewerLogin : public LLSingleton<LLViewerLogin>
53{ 41{
54public: 42public:
55 LLViewerLogin();
56
57 void setGridChoice(EGridInfo grid);
58 void setGridChoice(const std::string& grid_name);
59 void resetURIs();
60
61 /**
62 * @brief Get the enumeration of the grid choice.
63 * Should only return values > 0 && < GRID_INFO_COUNT
64 **/
65 EGridInfo getGridChoice() const;
66
67 /**
68 * @brief Get a readable label for the grid choice.
69 * Returns the readable name for the grid choice.
70 * If the grid is 'other', returns something
71 * the string used to specifiy the grid.
72 **/
73 std::string getGridLabel() const;
74
75 /**
76 * @brief Get the code name for the grid choice.
77 *
78 * Returns the code name for the grid choice, as designated
79 * by Linden Lab. The SL main grid is Agni, and the beta
80 * grid is Aditi. There are other LL testing grids with code
81 * names, but we don't care about those.
82 *
83 * This string is used primarily for fetching the proper
84 * login splash page, since the web server expects "Agni"
85 * and "Aditi", not "SL Main Grid" and "SL Beta Grid".
86 */
87 std::string getGridCodeName() const;
88
89 std::string getKnownGridLabel(EGridInfo grid_index) const;
90
91 void getLoginURIs(std::vector<std::string>& uris) const; 43 void getLoginURIs(std::vector<std::string>& uris) const;
92 std::string getHelperURI() const; 44 const std::string &getGridLabel() const;
45 const std::string &getLoginPage() const;
46 const std::string &getHelperURI() const;
93 47
94 bool isInProductionGrid(); 48 bool isOpenSimulator();
49 bool isSecondLife();
95 50
96private: 51 bool isInProductionGrid();
97 EGridInfo mGridChoice;
98 std::string mGridName;
99}; 52};
100 53
54
101const S32 MAC_ADDRESS_BYTES = 6; 55const S32 MAC_ADDRESS_BYTES = 6;
102extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ 56extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */
103 57
58
104#endif 59#endif