aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/hippoGridManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/hippoGridManager.cpp211
1 files changed, 209 insertions, 2 deletions
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index 2143a40..ffac92d 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -48,6 +48,109 @@ HippoGridInfo::HippoGridInfo(const std::string &gridNick) :
48} 48}
49 49
50 50
51// ********************************************************************
52// Getters
53
54HippoGridInfo::Platform HippoGridInfo::getPlatform()
55{
56 return mPlatform;
57}
58
59bool HippoGridInfo::isOpenSimulator() const
60{
61 return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM);
62}
63
64bool HippoGridInfo::isSecondLife() const
65{
66 return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE);
67}
68
69const std::string& HippoGridInfo::getGridNick() const
70{
71 return mGridNick;
72}
73
74const std::string& HippoGridInfo::getGridName() const
75{
76 return mGridName;
77}
78
79const std::string& HippoGridInfo::getLoginUri() const
80{
81 return mLoginUri;
82}
83
84const std::string& HippoGridInfo::getLoginPage() const
85{
86 return mLoginPage;
87}
88
89const std::string& HippoGridInfo::getHelperUri() const
90{
91 return mHelperUri;
92}
93
94const std::string& HippoGridInfo::getWebSite() const
95{
96 return mWebSite;
97}
98
99const std::string& HippoGridInfo::getSupportUrl() const
100{
101 return mSupportUrl;
102}
103
104const std::string& HippoGridInfo::getRegisterUrl() const
105{
106 return mRegisterUrl;
107}
108
109const std::string& HippoGridInfo::getPasswordUrl() const
110{
111 return mPasswordUrl;
112}
113
114const std::string& HippoGridInfo::getSearchUrl() const
115{
116 return mSearchUrl;
117}
118
119const std::string& HippoGridInfo::getFirstName() const
120{
121 return mFirstName;
122}
123
124const std::string& HippoGridInfo::getLastName() const
125{
126 return mLastName;
127}
128
129const std::string& HippoGridInfo::getAvatarPassword() const
130{
131 return mAvatarPassword;
132}
133
134bool HippoGridInfo::isRenderCompat() const
135{
136 return mRenderCompat;
137}
138
139const std::string& HippoGridInfo::getCurrencySymbol() const
140{
141 return mCurrencySymbol;
142}
143
144const std::string& HippoGridInfo::getRealCurrencySymbol() const
145{
146 return mRealCurrencySymbol;
147}
148
149
150
151// ********************************************************************
152// Setters
153
51void HippoGridInfo::setPlatform(Platform platform) 154void HippoGridInfo::setPlatform(Platform platform)
52{ 155{
53 mPlatform = platform; 156 mPlatform = platform;
@@ -71,6 +174,89 @@ void HippoGridInfo::setPlatform(const std::string &platform)
71 } 174 }
72} 175}
73 176
177void HippoGridInfo::setGridName(const std::string &gridName)
178{
179 mGridName = gridName;
180}
181
182void HippoGridInfo::setLoginUri(const std::string &loginUri)
183{
184 mLoginUri = loginUri;
185 cleanUpUri(mLoginUri);
186}
187
188void HippoGridInfo::setLoginPage(const std::string &loginPage)
189{
190 mLoginPage = loginPage;
191}
192
193void HippoGridInfo::setHelperUri(const std::string &helperUri)
194{
195 mHelperUri = helperUri;
196 cleanUpUri(mHelperUri);
197}
198
199void HippoGridInfo::setWebSite(const std::string &website)
200{
201 mWebSite = website;
202}
203
204void HippoGridInfo::setSupportUrl(const std::string &url)
205{
206 mSupportUrl = url;
207}
208
209void HippoGridInfo::setRegisterUrl(const std::string &url)
210{
211 mRegisterUrl = url;
212}
213
214void HippoGridInfo::setPasswordUrl(const std::string &url)
215{
216 mPasswordUrl = url;
217}
218
219void HippoGridInfo::setSearchUrl(const std::string &url)
220{
221 mSearchUrl = url;
222}
223
224void HippoGridInfo::setFirstName(const std::string &firstName)
225{
226 mFirstName = firstName;
227}
228
229void HippoGridInfo::setLastName(const std::string &lastName)
230{
231 mLastName = lastName;
232}
233
234void HippoGridInfo::setAvatarPassword(const std::string &avatarPassword)
235{
236 mAvatarPassword = avatarPassword;
237}
238
239void HippoGridInfo::setRenderCompat(bool compat)
240{
241 mRenderCompat = compat;
242}
243
244void HippoGridInfo::setCurrencySymbol(const std::string &sym)
245{
246 mCurrencySymbol = sym.substr(0, 3);
247}
248
249void HippoGridInfo::setRealCurrencySymbol(const std::string &sym)
250{
251 mRealCurrencySymbol = sym.substr(0, 3);
252}
253
254void HippoGridInfo::setDirectoryFee(int fee)
255{
256 mDirectoryFee = fee;
257}
258
259
74 260
75// ******************************************************************** 261// ********************************************************************
76// Grid Info 262// Grid Info
@@ -355,7 +541,7 @@ void HippoGridManager::discardAndReload()
355// ******************************************************************** 541// ********************************************************************
356// Public Access 542// Public Access
357 543
358HippoGridInfo *HippoGridManager::getGrid(const std::string &grid) const 544HippoGridInfo* HippoGridManager::getGrid(const std::string &grid) const
359{ 545{
360 std::map<std::string, HippoGridInfo*>::const_iterator it; 546 std::map<std::string, HippoGridInfo*>::const_iterator it;
361 it = mGridInfo.find(grid); 547 it = mGridInfo.find(grid);
@@ -367,7 +553,13 @@ HippoGridInfo *HippoGridManager::getGrid(const std::string &grid) const
367} 553}
368 554
369 555
370HippoGridInfo *HippoGridManager::getCurrentGrid() const 556HippoGridInfo* HippoGridManager::getConnectedGrid() const
557{
558 return (mConnectedGrid)? mConnectedGrid: getCurrentGrid();
559}
560
561
562HippoGridInfo* HippoGridManager::getCurrentGrid() const
371{ 563{
372 HippoGridInfo *grid = getGrid(mCurrentGrid); 564 HippoGridInfo *grid = getGrid(mCurrentGrid);
373 if (grid) { 565 if (grid) {
@@ -377,6 +569,21 @@ HippoGridInfo *HippoGridManager::getCurrentGrid() const
377 } 569 }
378} 570}
379 571
572const std::string& HippoGridManager::getDefaultGridNick() const
573{
574 return mDefaultGrid;
575}
576
577const std::string& HippoGridManager::getCurrentGridNick() const
578{
579 return mCurrentGrid;
580}
581
582void HippoGridManager::setCurrentGridAsConnected()
583{
584 mConnectedGrid = getCurrentGrid();
585}
586
380 587
381void HippoGridManager::addGrid(HippoGridInfo *grid) 588void HippoGridManager::addGrid(HippoGridInfo *grid)
382{ 589{