Пример #1
0
//static
void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len)
{
	HippoGridInfo* self = (HippoGridInfo*)userData;
	switch (self->mXmlState) 
	{
		case XML_GRIDNICK:
		{
			if (self->mGridNick == "") self->mGridNick.assign(s, len);
			self->mGridNick = sanitizeGridNick(self->mGridNick);
			break;
		}

		case XML_PLATFORM:
		{
			std::string platform(s, len);
			self->setPlatform(platform); 
			break;
		}	

		case XML_LOGINURI:
		{
			std::string loginuri(s, len);
			self->mLoginUri = sanitizeUri( loginuri );
			break;
		}

		case XML_HELPERURI:
		{
			std::string helperuri(s, len);
			self->mHelperUri = sanitizeUri( helperuri );
			break;
		}

		case XML_SEARCH:
		{
			self->mSearchUrl.assign(s, len);
			//sanitizeQueryUrl(mSearchUrl);
			break;
		}

		case XML_GRIDNAME: self->mGridName.assign(s, len); break;
		case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break;
		case XML_WEBSITE: self->mWebSite.assign(s, len); break;
		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;
	}
}
Пример #2
0
void HippoGridInfo::setLoginUri(const std::string& loginUri)
{
	std::string uri = loginUri;
	mLoginUri = sanitizeUri(uri);
	if (utf8str_tolower(LLURI(uri).hostName()) == "login.agni.lindenlab.com")
	{
		mIsInProductionGrid = true;
	}
}
Пример #3
0
void HippoGridInfo::setLoginUri(const std::string& loginUri)
{
	mLoginUri = sanitizeUri(loginUri);
	if (utf8str_tolower(LLURI(mLoginUri).hostName()) == "login.agni.lindenlab.com")
	{
		mIsInProductionGrid = true;
		useHttps();
		setPlatform(PLATFORM_SECONDLIFE);
	}
	else if (utf8str_tolower(LLURI(mLoginUri).hostName()) == "login.aditi.lindenlab.com")
	{
		useHttps();
		setPlatform(PLATFORM_SECONDLIFE);
	}
	else if (utf8str_tolower(LLURI(mLoginUri).hostName()) == "login.avination.com" ||
		utf8str_tolower(LLURI(mLoginUri).hostName()) == "login.avination.net")
	{
		mIsInAvination = true;
		useHttps();
	}
}
void HippoGridInfo::setHelperUri(const std::string& helperUri)
{
	std::string uri = helperUri;
	mHelperUri = sanitizeUri(uri);
}
void HippoGridInfo::setLoginUri(const std::string& loginUri)
{
	std::string uri = loginUri;
	mLoginUri = sanitizeUri(uri);
}