Set up reading the grid message from the get_grid_info from Aurora if it exists.

This commit is contained in:
RevolutionSmythe
2011-08-14 19:49:00 -05:00
committed by Siana Gearz
parent d84140ead9
commit 8fc875cee8
2 changed files with 18 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) :
mFirstName(LLStringUtil::null),
mLastName(LLStringUtil::null),
mAvatarPassword(LLStringUtil::null),
mGridMessage(""),
mXmlState(XML_VOID),
mVoiceConnector("SLVoice"),
mRenderCompat(true),
@@ -145,6 +146,11 @@ const std::string& HippoGridInfo::getSearchUrl() const
return mSearchUrl;
}
const std::string& HippoGridInfo::getGridMessage() const
{
return mGridMessage;
}
const std::string& HippoGridInfo::getFirstName() const
{
return mFirstName;
@@ -262,6 +268,11 @@ void HippoGridInfo::setSearchUrl(const std::string& url)
mSearchUrl = url;
}
void HippoGridInfo::setGridMessage(const std::string& message)
{
mGridMessage = url;
}
void HippoGridInfo::setFirstName(const std::string& firstName)
{
mFirstName = firstName;
@@ -421,6 +432,8 @@ void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, cons
self->mXmlState = XML_PASSWORD;
else if (strcasecmp(name, "search") == 0)
self->mXmlState = XML_SEARCH;
else if (strcasecmp(name, "message") == 0)
self->mXmlState = XML_MESSAGE;
}
//static
@@ -477,6 +490,7 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
case XML_SUPPORT: self->mSupportUrl.assign(s, len); break;
case XML_REGISTER: self->mRegisterUrl.assign(s, len); break;
case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break;
case XML_MESSAGE: self->mGridMessage.assign(s, len); break;
case XML_VOID: break;
}

View File

@@ -51,6 +51,7 @@ public:
const std::string& getPasswordUrl() const;
// Returns the url base used for the Web Search tab
const std::string& getSearchUrl() const;
const std::string& getGridMessage() const;
const std::string& getFirstName() const;
const std::string& getLastName() const;
const std::string& getAvatarPassword() const;
@@ -77,6 +78,7 @@ public:
void setPasswordUrl(const std::string& url);
// sets the url base used for the Web Search tab
void setSearchUrl(const std::string& url);
void setGridMessage(const std::string& message);
void setRenderCompat(bool compat);
void setMaxAgentGroups(int max) { mMaxAgentGroups = max; }
void setFirstName(const std::string& firstName);
@@ -121,13 +123,14 @@ private:
std::string mCurrencySymbol;
std::string mRealCurrencySymbol;
int mDirectoryFee;
std::string mGridMessage;
// for parsing grid info XML
enum XmlState
{
XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME,
XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI,
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH, XML_MESSAGE
};
XmlState mXmlState;