Fixing loads of msvc warnings (mainly size_t vs int issues).
This commit is contained in:
@@ -97,10 +97,10 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
cacheDir += "cache\\";
|
cacheDir += "cache\\";
|
||||||
|
|
||||||
//create directories on first start of app
|
//create directories on first start of app
|
||||||
mkdir(configFileName.c_str());
|
_mkdir(configFileName.c_str());
|
||||||
mkdir(logDir.c_str());
|
_mkdir(logDir.c_str());
|
||||||
mkdir(dataDir.c_str());
|
_mkdir(dataDir.c_str());
|
||||||
mkdir(cacheDir.c_str());
|
_mkdir(cacheDir.c_str());
|
||||||
|
|
||||||
#else
|
#else
|
||||||
//define app-dir
|
//define app-dir
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ public:
|
|||||||
bool GetHashForAvatar(const std::string &fileName, MD5Buf &md5buf) const;
|
bool GetHashForAvatar(const std::string &fileName, MD5Buf &md5buf) const;
|
||||||
bool GetAvatarFileName(const MD5Buf &md5buf, std::string &fileName) const;
|
bool GetAvatarFileName(const MD5Buf &md5buf, std::string &fileName) const;
|
||||||
bool HasAvatar(const MD5Buf &md5buf) const;
|
bool HasAvatar(const MD5Buf &md5buf) const;
|
||||||
bool StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, unsigned size, bool upload);
|
bool StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, size_t size, bool upload);
|
||||||
|
|
||||||
static bool IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, unsigned fileHeaderSize);
|
static bool IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, size_t fileHeaderSize);
|
||||||
|
|
||||||
void RemoveOldAvatarCacheEntries();
|
void RemoveOldAvatarCacheEntries();
|
||||||
|
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ AvatarManager::HasAvatar(const MD5Buf &md5buf) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, unsigned size, bool upload)
|
AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, size_t size, bool upload)
|
||||||
{
|
{
|
||||||
bool retVal = false;
|
bool retVal = false;
|
||||||
string cacheDir;
|
string cacheDir;
|
||||||
@@ -380,7 +380,7 @@ AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
AvatarManager::IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, unsigned fileHeaderSize)
|
AvatarManager::IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, size_t fileHeaderSize)
|
||||||
{
|
{
|
||||||
bool validType = false;
|
bool validType = false;
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ CryptHelper::MD5Sum(const std::string &fileName, MD5Buf &buf)
|
|||||||
if (file) {
|
if (file) {
|
||||||
// Calculate MD5 sum of file.
|
// Calculate MD5 sum of file.
|
||||||
unsigned char *readBuf = new unsigned char[8192];
|
unsigned char *readBuf = new unsigned char[8192];
|
||||||
int numBytes;
|
size_t numBytes;
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
MD5_CTX context;
|
MD5_CTX context;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ ServerDBGeneric::EndGame(unsigned /*requestId*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ServerDBGeneric::AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id */*byPlayerId*/)
|
ServerDBGeneric::AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/)
|
||||||
{
|
{
|
||||||
m_ioService->post(boost::bind(&ServerDBCallback::ReportAvatarFailed, &m_callback, requestId, replyId));
|
m_ioService->post(boost::bind(&ServerDBCallback::ReportAvatarFailed, &m_callback, requestId, replyId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
virtual void SetGamePlayerPlace(unsigned /*requestId*/, DB_id /*playerId*/, unsigned /*place*/) {}
|
virtual void SetGamePlayerPlace(unsigned /*requestId*/, DB_id /*playerId*/, unsigned /*place*/) {}
|
||||||
virtual void EndGame(unsigned /*requestId*/) {}
|
virtual void EndGame(unsigned /*requestId*/) {}
|
||||||
|
|
||||||
virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id */*byPlayerId*/) {}
|
virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _SERVERDBNOACTION_H_
|
#endif // _SERVERDBNOACTION_H_
|
||||||
|
|||||||
@@ -1675,248 +1675,248 @@ QString gameLobbyDialogImpl::getFullCountryString(QString cs)
|
|||||||
// Initialise map of country strings, if needed.
|
// Initialise map of country strings, if needed.
|
||||||
if (countryStringMap.empty()) {
|
if (countryStringMap.empty()) {
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AF", tr("Afghanistan")));
|
countryStringMap.insert(CountryStringMap::value_type("AF", tr("Afghanistan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AX", tr("ALand Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("AX", tr("ALand Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AL", tr("Albania")));
|
countryStringMap.insert(CountryStringMap::value_type("AL", tr("Albania")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DZ", tr("Algeria")));
|
countryStringMap.insert(CountryStringMap::value_type("DZ", tr("Algeria")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AS", tr("American Samoa")));
|
countryStringMap.insert(CountryStringMap::value_type("AS", tr("American Samoa")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AD", tr("Andorra")));
|
countryStringMap.insert(CountryStringMap::value_type("AD", tr("Andorra")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AO", tr("Angola")));
|
countryStringMap.insert(CountryStringMap::value_type("AO", tr("Angola")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AI", tr("Anguilla")));
|
countryStringMap.insert(CountryStringMap::value_type("AI", tr("Anguilla")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AQ", tr("Antarctica")));
|
countryStringMap.insert(CountryStringMap::value_type("AQ", tr("Antarctica")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AG", tr("Antigua And Barbuda")));
|
countryStringMap.insert(CountryStringMap::value_type("AG", tr("Antigua And Barbuda")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AR", tr("Argentina")));
|
countryStringMap.insert(CountryStringMap::value_type("AR", tr("Argentina")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AM", tr("Armenia")));
|
countryStringMap.insert(CountryStringMap::value_type("AM", tr("Armenia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AW", tr("Aruba")));
|
countryStringMap.insert(CountryStringMap::value_type("AW", tr("Aruba")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AU", tr("Australia")));
|
countryStringMap.insert(CountryStringMap::value_type("AU", tr("Australia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AT", tr("Austria")));
|
countryStringMap.insert(CountryStringMap::value_type("AT", tr("Austria")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AZ", tr("Azerbaijan")));
|
countryStringMap.insert(CountryStringMap::value_type("AZ", tr("Azerbaijan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BS", tr("Bahamas")));
|
countryStringMap.insert(CountryStringMap::value_type("BS", tr("Bahamas")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BH", tr("Bahrain")));
|
countryStringMap.insert(CountryStringMap::value_type("BH", tr("Bahrain")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BD", tr("Bangladesh")));
|
countryStringMap.insert(CountryStringMap::value_type("BD", tr("Bangladesh")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BB", tr("Barbados")));
|
countryStringMap.insert(CountryStringMap::value_type("BB", tr("Barbados")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BY", tr("Belarus")));
|
countryStringMap.insert(CountryStringMap::value_type("BY", tr("Belarus")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BE", tr("Belgium")));
|
countryStringMap.insert(CountryStringMap::value_type("BE", tr("Belgium")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BZ", tr("Belize")));
|
countryStringMap.insert(CountryStringMap::value_type("BZ", tr("Belize")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BJ", tr("Benin")));
|
countryStringMap.insert(CountryStringMap::value_type("BJ", tr("Benin")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BM", tr("Bermuda")));
|
countryStringMap.insert(CountryStringMap::value_type("BM", tr("Bermuda")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BT", tr("Bhutan")));
|
countryStringMap.insert(CountryStringMap::value_type("BT", tr("Bhutan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BO", tr("Bolivia")));
|
countryStringMap.insert(CountryStringMap::value_type("BO", tr("Bolivia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BA", tr("Bosnia And Herzegovina")));
|
countryStringMap.insert(CountryStringMap::value_type("BA", tr("Bosnia And Herzegovina")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BW", tr("Botswana")));
|
countryStringMap.insert(CountryStringMap::value_type("BW", tr("Botswana")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BV", tr("Bouvet Island")));
|
countryStringMap.insert(CountryStringMap::value_type("BV", tr("Bouvet Island")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BR", tr("Brazil")));
|
countryStringMap.insert(CountryStringMap::value_type("BR", tr("Brazil")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IO", tr("British Indian Ocean Territory")));
|
countryStringMap.insert(CountryStringMap::value_type("IO", tr("British Indian Ocean Territory")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BN", tr("Brunei Darussalam")));
|
countryStringMap.insert(CountryStringMap::value_type("BN", tr("Brunei Darussalam")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BG", tr("Bulgaria")));
|
countryStringMap.insert(CountryStringMap::value_type("BG", tr("Bulgaria")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BF", tr("Burkina Faso")));
|
countryStringMap.insert(CountryStringMap::value_type("BF", tr("Burkina Faso")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("BI", tr("Burundi")));
|
countryStringMap.insert(CountryStringMap::value_type("BI", tr("Burundi")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KH", tr("Cambodia")));
|
countryStringMap.insert(CountryStringMap::value_type("KH", tr("Cambodia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CM", tr("Cameroon")));
|
countryStringMap.insert(CountryStringMap::value_type("CM", tr("Cameroon")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CA", tr("Canada")));
|
countryStringMap.insert(CountryStringMap::value_type("CA", tr("Canada")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CV", tr("Cape Verde")));
|
countryStringMap.insert(CountryStringMap::value_type("CV", tr("Cape Verde")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KY", tr("Cayman Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("KY", tr("Cayman Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CF", tr("Central African Republic")));
|
countryStringMap.insert(CountryStringMap::value_type("CF", tr("Central African Republic")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TD", tr("Chad")));
|
countryStringMap.insert(CountryStringMap::value_type("TD", tr("Chad")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CL", tr("Chile")));
|
countryStringMap.insert(CountryStringMap::value_type("CL", tr("Chile")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CN", tr("China")));
|
countryStringMap.insert(CountryStringMap::value_type("CN", tr("China")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CX", tr("Christmas Island")));
|
countryStringMap.insert(CountryStringMap::value_type("CX", tr("Christmas Island")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CC", tr("Cocos (Keeling) Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("CC", tr("Cocos (Keeling) Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CO", tr("Colombia")));
|
countryStringMap.insert(CountryStringMap::value_type("CO", tr("Colombia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KM", tr("Comoros")));
|
countryStringMap.insert(CountryStringMap::value_type("KM", tr("Comoros")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CG", tr("Congo")));
|
countryStringMap.insert(CountryStringMap::value_type("CG", tr("Congo")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CD", tr("Congo, The Democratic Republic Of The")));
|
countryStringMap.insert(CountryStringMap::value_type("CD", tr("Congo, The Democratic Republic Of The")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CK", tr("Cook Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("CK", tr("Cook Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CR", tr("Costa Rica")));
|
countryStringMap.insert(CountryStringMap::value_type("CR", tr("Costa Rica")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CI", tr("Cote D'Ivoire")));
|
countryStringMap.insert(CountryStringMap::value_type("CI", tr("Cote D'Ivoire")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HR", tr("Croatia")));
|
countryStringMap.insert(CountryStringMap::value_type("HR", tr("Croatia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CU", tr("Cuba")));
|
countryStringMap.insert(CountryStringMap::value_type("CU", tr("Cuba")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CY", tr("Cyprus")));
|
countryStringMap.insert(CountryStringMap::value_type("CY", tr("Cyprus")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CZ", tr("Czech Republic")));
|
countryStringMap.insert(CountryStringMap::value_type("CZ", tr("Czech Republic")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DK", tr("Denmark")));
|
countryStringMap.insert(CountryStringMap::value_type("DK", tr("Denmark")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DJ", tr("Djibouti")));
|
countryStringMap.insert(CountryStringMap::value_type("DJ", tr("Djibouti")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DM", tr("Dominica")));
|
countryStringMap.insert(CountryStringMap::value_type("DM", tr("Dominica")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DO", tr("Dominican Republic")));
|
countryStringMap.insert(CountryStringMap::value_type("DO", tr("Dominican Republic")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("EC", tr("Ecuador")));
|
countryStringMap.insert(CountryStringMap::value_type("EC", tr("Ecuador")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("EG", tr("Egypt")));
|
countryStringMap.insert(CountryStringMap::value_type("EG", tr("Egypt")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SV", tr("El Salvador")));
|
countryStringMap.insert(CountryStringMap::value_type("SV", tr("El Salvador")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GQ", tr("Equatorial Guinea")));
|
countryStringMap.insert(CountryStringMap::value_type("GQ", tr("Equatorial Guinea")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ER", tr("Eritrea")));
|
countryStringMap.insert(CountryStringMap::value_type("ER", tr("Eritrea")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("EE", tr("Estonia")));
|
countryStringMap.insert(CountryStringMap::value_type("EE", tr("Estonia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ET", tr("Ethiopia")));
|
countryStringMap.insert(CountryStringMap::value_type("ET", tr("Ethiopia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FK", tr("Falkland Islands (Malvinas)")));
|
countryStringMap.insert(CountryStringMap::value_type("FK", tr("Falkland Islands (Malvinas)")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FO", tr("Faroe Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("FO", tr("Faroe Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FJ", tr("Fiji")));
|
countryStringMap.insert(CountryStringMap::value_type("FJ", tr("Fiji")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FI", tr("Finland")));
|
countryStringMap.insert(CountryStringMap::value_type("FI", tr("Finland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FR", tr("France")));
|
countryStringMap.insert(CountryStringMap::value_type("FR", tr("France")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GF", tr("French Guiana")));
|
countryStringMap.insert(CountryStringMap::value_type("GF", tr("French Guiana")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PF", tr("French Polynesia")));
|
countryStringMap.insert(CountryStringMap::value_type("PF", tr("French Polynesia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TF", tr("French Southern Territories")));
|
countryStringMap.insert(CountryStringMap::value_type("TF", tr("French Southern Territories")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GA", tr("Gabon")));
|
countryStringMap.insert(CountryStringMap::value_type("GA", tr("Gabon")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GM", tr("Gambia")));
|
countryStringMap.insert(CountryStringMap::value_type("GM", tr("Gambia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GE", tr("Georgia")));
|
countryStringMap.insert(CountryStringMap::value_type("GE", tr("Georgia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("DE", tr("Germany")));
|
countryStringMap.insert(CountryStringMap::value_type("DE", tr("Germany")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GH", tr("Ghana")));
|
countryStringMap.insert(CountryStringMap::value_type("GH", tr("Ghana")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GI", tr("Gibraltar")));
|
countryStringMap.insert(CountryStringMap::value_type("GI", tr("Gibraltar")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GR", tr("Greece")));
|
countryStringMap.insert(CountryStringMap::value_type("GR", tr("Greece")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GL", tr("Greenland")));
|
countryStringMap.insert(CountryStringMap::value_type("GL", tr("Greenland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GD", tr("Grenada")));
|
countryStringMap.insert(CountryStringMap::value_type("GD", tr("Grenada")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GP", tr("Guadeloupe")));
|
countryStringMap.insert(CountryStringMap::value_type("GP", tr("Guadeloupe")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GU", tr("Guam")));
|
countryStringMap.insert(CountryStringMap::value_type("GU", tr("Guam")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GT", tr("Guatemala")));
|
countryStringMap.insert(CountryStringMap::value_type("GT", tr("Guatemala")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GG", tr("Guernsey")));
|
countryStringMap.insert(CountryStringMap::value_type("GG", tr("Guernsey")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GN", tr("Guinea")));
|
countryStringMap.insert(CountryStringMap::value_type("GN", tr("Guinea")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GW", tr("Guinea-Bissau")));
|
countryStringMap.insert(CountryStringMap::value_type("GW", tr("Guinea-Bissau")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GY", tr("Guyana")));
|
countryStringMap.insert(CountryStringMap::value_type("GY", tr("Guyana")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HT", tr("Haiti")));
|
countryStringMap.insert(CountryStringMap::value_type("HT", tr("Haiti")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HM", tr("Heard Island And Mcdonald Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("HM", tr("Heard Island And Mcdonald Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VA", tr("Holy See (Vatican City State)")));
|
countryStringMap.insert(CountryStringMap::value_type("VA", tr("Holy See (Vatican City State)")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HN", tr("Honduras")));
|
countryStringMap.insert(CountryStringMap::value_type("HN", tr("Honduras")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HK", tr("Hong Kong")));
|
countryStringMap.insert(CountryStringMap::value_type("HK", tr("Hong Kong")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("HU", tr("Hungary")));
|
countryStringMap.insert(CountryStringMap::value_type("HU", tr("Hungary")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IS", tr("Iceland")));
|
countryStringMap.insert(CountryStringMap::value_type("IS", tr("Iceland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IN", tr("India")));
|
countryStringMap.insert(CountryStringMap::value_type("IN", tr("India")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ID", tr("Indonesia")));
|
countryStringMap.insert(CountryStringMap::value_type("ID", tr("Indonesia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IR", tr("Iran, Islamic Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("IR", tr("Iran, Islamic Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IQ", tr("Iraq")));
|
countryStringMap.insert(CountryStringMap::value_type("IQ", tr("Iraq")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IE", tr("Ireland")));
|
countryStringMap.insert(CountryStringMap::value_type("IE", tr("Ireland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IM", tr("Isle Of Man")));
|
countryStringMap.insert(CountryStringMap::value_type("IM", tr("Isle Of Man")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IL", tr("Israel")));
|
countryStringMap.insert(CountryStringMap::value_type("IL", tr("Israel")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("IT", tr("Italy")));
|
countryStringMap.insert(CountryStringMap::value_type("IT", tr("Italy")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("JM", tr("Jamaica")));
|
countryStringMap.insert(CountryStringMap::value_type("JM", tr("Jamaica")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("JP", tr("Japan")));
|
countryStringMap.insert(CountryStringMap::value_type("JP", tr("Japan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("JE", tr("Jersey")));
|
countryStringMap.insert(CountryStringMap::value_type("JE", tr("Jersey")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("JO", tr("Jordan")));
|
countryStringMap.insert(CountryStringMap::value_type("JO", tr("Jordan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KZ", tr("Kazakhstan")));
|
countryStringMap.insert(CountryStringMap::value_type("KZ", tr("Kazakhstan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KE", tr("Kenya")));
|
countryStringMap.insert(CountryStringMap::value_type("KE", tr("Kenya")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KI", tr("Kiribati")));
|
countryStringMap.insert(CountryStringMap::value_type("KI", tr("Kiribati")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KP", tr("Korea, Democratic People'S Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("KP", tr("Korea, Democratic People'S Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KR", tr("Korea, Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("KR", tr("Korea, Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KW", tr("Kuwait")));
|
countryStringMap.insert(CountryStringMap::value_type("KW", tr("Kuwait")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KG", tr("Kyrgyzstan")));
|
countryStringMap.insert(CountryStringMap::value_type("KG", tr("Kyrgyzstan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LA", tr("Lao People'S Democratic Republic")));
|
countryStringMap.insert(CountryStringMap::value_type("LA", tr("Lao People'S Democratic Republic")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LV", tr("Latvia")));
|
countryStringMap.insert(CountryStringMap::value_type("LV", tr("Latvia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LB", tr("Lebanon")));
|
countryStringMap.insert(CountryStringMap::value_type("LB", tr("Lebanon")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LS", tr("Lesotho")));
|
countryStringMap.insert(CountryStringMap::value_type("LS", tr("Lesotho")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LR", tr("Liberia")));
|
countryStringMap.insert(CountryStringMap::value_type("LR", tr("Liberia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LY", tr("Libyan Arab Jamahiriya")));
|
countryStringMap.insert(CountryStringMap::value_type("LY", tr("Libyan Arab Jamahiriya")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LI", tr("Liechtenstein")));
|
countryStringMap.insert(CountryStringMap::value_type("LI", tr("Liechtenstein")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LT", tr("Lithuania")));
|
countryStringMap.insert(CountryStringMap::value_type("LT", tr("Lithuania")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LU", tr("Luxembourg")));
|
countryStringMap.insert(CountryStringMap::value_type("LU", tr("Luxembourg")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MO", tr("Macao")));
|
countryStringMap.insert(CountryStringMap::value_type("MO", tr("Macao")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MK", tr("Macedonia, The Former Yugoslav Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("MK", tr("Macedonia, The Former Yugoslav Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MG", tr("Madagascar")));
|
countryStringMap.insert(CountryStringMap::value_type("MG", tr("Madagascar")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MW", tr("Malawi")));
|
countryStringMap.insert(CountryStringMap::value_type("MW", tr("Malawi")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MY", tr("Malaysia")));
|
countryStringMap.insert(CountryStringMap::value_type("MY", tr("Malaysia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MV", tr("Maldives")));
|
countryStringMap.insert(CountryStringMap::value_type("MV", tr("Maldives")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ML", tr("Mali")));
|
countryStringMap.insert(CountryStringMap::value_type("ML", tr("Mali")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MT", tr("Malta")));
|
countryStringMap.insert(CountryStringMap::value_type("MT", tr("Malta")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MH", tr("Marshall Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("MH", tr("Marshall Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MQ", tr("Martinique")));
|
countryStringMap.insert(CountryStringMap::value_type("MQ", tr("Martinique")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MR", tr("Mauritania")));
|
countryStringMap.insert(CountryStringMap::value_type("MR", tr("Mauritania")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MU", tr("Mauritius")));
|
countryStringMap.insert(CountryStringMap::value_type("MU", tr("Mauritius")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("YT", tr("Mayotte")));
|
countryStringMap.insert(CountryStringMap::value_type("YT", tr("Mayotte")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MX", tr("Mexico")));
|
countryStringMap.insert(CountryStringMap::value_type("MX", tr("Mexico")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("FM", tr("Micronesia, Federated States Of")));
|
countryStringMap.insert(CountryStringMap::value_type("FM", tr("Micronesia, Federated States Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MD", tr("Moldova, Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("MD", tr("Moldova, Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MC", tr("Monaco")));
|
countryStringMap.insert(CountryStringMap::value_type("MC", tr("Monaco")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MN", tr("Mongolia")));
|
countryStringMap.insert(CountryStringMap::value_type("MN", tr("Mongolia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MS", tr("Montserrat")));
|
countryStringMap.insert(CountryStringMap::value_type("MS", tr("Montserrat")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MA", tr("Morocco")));
|
countryStringMap.insert(CountryStringMap::value_type("MA", tr("Morocco")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MZ", tr("Mozambique")));
|
countryStringMap.insert(CountryStringMap::value_type("MZ", tr("Mozambique")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MM", tr("Myanmar")));
|
countryStringMap.insert(CountryStringMap::value_type("MM", tr("Myanmar")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NA", tr("Namibia")));
|
countryStringMap.insert(CountryStringMap::value_type("NA", tr("Namibia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NR", tr("Nauru")));
|
countryStringMap.insert(CountryStringMap::value_type("NR", tr("Nauru")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NP", tr("Nepal")));
|
countryStringMap.insert(CountryStringMap::value_type("NP", tr("Nepal")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NL", tr("Netherlands")));
|
countryStringMap.insert(CountryStringMap::value_type("NL", tr("Netherlands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AN", tr("Netherlands Antilles")));
|
countryStringMap.insert(CountryStringMap::value_type("AN", tr("Netherlands Antilles")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NC", tr("New Caledonia")));
|
countryStringMap.insert(CountryStringMap::value_type("NC", tr("New Caledonia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NZ", tr("New Zealand")));
|
countryStringMap.insert(CountryStringMap::value_type("NZ", tr("New Zealand")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NI", tr("Nicaragua")));
|
countryStringMap.insert(CountryStringMap::value_type("NI", tr("Nicaragua")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NE", tr("Niger")));
|
countryStringMap.insert(CountryStringMap::value_type("NE", tr("Niger")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NG", tr("Nigeria")));
|
countryStringMap.insert(CountryStringMap::value_type("NG", tr("Nigeria")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NU", tr("Niue")));
|
countryStringMap.insert(CountryStringMap::value_type("NU", tr("Niue")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NF", tr("Norfolk Island")));
|
countryStringMap.insert(CountryStringMap::value_type("NF", tr("Norfolk Island")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("MP", tr("Northern Mariana Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("MP", tr("Northern Mariana Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("NO", tr("Norway")));
|
countryStringMap.insert(CountryStringMap::value_type("NO", tr("Norway")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("OM", tr("Oman")));
|
countryStringMap.insert(CountryStringMap::value_type("OM", tr("Oman")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PK", tr("Pakistan")));
|
countryStringMap.insert(CountryStringMap::value_type("PK", tr("Pakistan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PW", tr("Palau")));
|
countryStringMap.insert(CountryStringMap::value_type("PW", tr("Palau")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PS", tr("Palestinian Territory, Occupied")));
|
countryStringMap.insert(CountryStringMap::value_type("PS", tr("Palestinian Territory, Occupied")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PA", tr("Panama")));
|
countryStringMap.insert(CountryStringMap::value_type("PA", tr("Panama")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PG", tr("Papua New Guinea")));
|
countryStringMap.insert(CountryStringMap::value_type("PG", tr("Papua New Guinea")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PY", tr("Paraguay")));
|
countryStringMap.insert(CountryStringMap::value_type("PY", tr("Paraguay")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PE", tr("Peru")));
|
countryStringMap.insert(CountryStringMap::value_type("PE", tr("Peru")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PH", tr("Philippines")));
|
countryStringMap.insert(CountryStringMap::value_type("PH", tr("Philippines")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PN", tr("Pitcairn")));
|
countryStringMap.insert(CountryStringMap::value_type("PN", tr("Pitcairn")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PL", tr("Poland")));
|
countryStringMap.insert(CountryStringMap::value_type("PL", tr("Poland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PT", tr("Portugal")));
|
countryStringMap.insert(CountryStringMap::value_type("PT", tr("Portugal")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PR", tr("Puerto Rico")));
|
countryStringMap.insert(CountryStringMap::value_type("PR", tr("Puerto Rico")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("QA", tr("Qatar")));
|
countryStringMap.insert(CountryStringMap::value_type("QA", tr("Qatar")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("RE", tr("Reunion")));
|
countryStringMap.insert(CountryStringMap::value_type("RE", tr("Reunion")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("RO", tr("Romania")));
|
countryStringMap.insert(CountryStringMap::value_type("RO", tr("Romania")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("RU", tr("Russian Federation")));
|
countryStringMap.insert(CountryStringMap::value_type("RU", tr("Russian Federation")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("RW", tr("Rwanda")));
|
countryStringMap.insert(CountryStringMap::value_type("RW", tr("Rwanda")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SH", tr("Saint Helena")));
|
countryStringMap.insert(CountryStringMap::value_type("SH", tr("Saint Helena")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("KN", tr("Saint Kitts And Nevis")));
|
countryStringMap.insert(CountryStringMap::value_type("KN", tr("Saint Kitts And Nevis")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LC", tr("Saint Lucia")));
|
countryStringMap.insert(CountryStringMap::value_type("LC", tr("Saint Lucia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("PM", tr("Saint Pierre And Miquelon")));
|
countryStringMap.insert(CountryStringMap::value_type("PM", tr("Saint Pierre And Miquelon")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VC", tr("Saint Vincent And The Grenadines")));
|
countryStringMap.insert(CountryStringMap::value_type("VC", tr("Saint Vincent And The Grenadines")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("WS", tr("Samoa")));
|
countryStringMap.insert(CountryStringMap::value_type("WS", tr("Samoa")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SM", tr("San Marino")));
|
countryStringMap.insert(CountryStringMap::value_type("SM", tr("San Marino")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ST", tr("Sao Tome And Principe")));
|
countryStringMap.insert(CountryStringMap::value_type("ST", tr("Sao Tome And Principe")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SA", tr("Saudi Arabia")));
|
countryStringMap.insert(CountryStringMap::value_type("SA", tr("Saudi Arabia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SN", tr("Senegal")));
|
countryStringMap.insert(CountryStringMap::value_type("SN", tr("Senegal")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CS", tr("Serbia And Montenegro")));
|
countryStringMap.insert(CountryStringMap::value_type("CS", tr("Serbia And Montenegro")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SC", tr("Seychelles")));
|
countryStringMap.insert(CountryStringMap::value_type("SC", tr("Seychelles")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SL", tr("Sierra Leone")));
|
countryStringMap.insert(CountryStringMap::value_type("SL", tr("Sierra Leone")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SG", tr("Singapore")));
|
countryStringMap.insert(CountryStringMap::value_type("SG", tr("Singapore")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SK", tr("Slovakia")));
|
countryStringMap.insert(CountryStringMap::value_type("SK", tr("Slovakia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SI", tr("Slovenia")));
|
countryStringMap.insert(CountryStringMap::value_type("SI", tr("Slovenia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SB", tr("Solomon Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("SB", tr("Solomon Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SO", tr("Somalia")));
|
countryStringMap.insert(CountryStringMap::value_type("SO", tr("Somalia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ZA", tr("South Africa")));
|
countryStringMap.insert(CountryStringMap::value_type("ZA", tr("South Africa")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GS", tr("South Georgia And The South Sandwich Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("GS", tr("South Georgia And The South Sandwich Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ES", tr("Spain")));
|
countryStringMap.insert(CountryStringMap::value_type("ES", tr("Spain")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("LK", tr("Sri Lanka")));
|
countryStringMap.insert(CountryStringMap::value_type("LK", tr("Sri Lanka")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SD", tr("Sudan")));
|
countryStringMap.insert(CountryStringMap::value_type("SD", tr("Sudan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SR", tr("Suriname")));
|
countryStringMap.insert(CountryStringMap::value_type("SR", tr("Suriname")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SJ", tr("Svalbard And Jan Mayen")));
|
countryStringMap.insert(CountryStringMap::value_type("SJ", tr("Svalbard And Jan Mayen")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SZ", tr("Swaziland")));
|
countryStringMap.insert(CountryStringMap::value_type("SZ", tr("Swaziland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SE", tr("Sweden")));
|
countryStringMap.insert(CountryStringMap::value_type("SE", tr("Sweden")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("CH", tr("Switzerland")));
|
countryStringMap.insert(CountryStringMap::value_type("CH", tr("Switzerland")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("SY", tr("Syrian Arab Republic")));
|
countryStringMap.insert(CountryStringMap::value_type("SY", tr("Syrian Arab Republic")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TW", tr("Taiwan, Province Of China")));
|
countryStringMap.insert(CountryStringMap::value_type("TW", tr("Taiwan, Province Of China")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TJ", tr("Tajikistan")));
|
countryStringMap.insert(CountryStringMap::value_type("TJ", tr("Tajikistan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TZ", tr("Tanzania, United Republic Of")));
|
countryStringMap.insert(CountryStringMap::value_type("TZ", tr("Tanzania, United Republic Of")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TH", tr("Thailand")));
|
countryStringMap.insert(CountryStringMap::value_type("TH", tr("Thailand")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TL", tr("Timor-Leste")));
|
countryStringMap.insert(CountryStringMap::value_type("TL", tr("Timor-Leste")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TG", tr("Togo")));
|
countryStringMap.insert(CountryStringMap::value_type("TG", tr("Togo")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TK", tr("Tokelau")));
|
countryStringMap.insert(CountryStringMap::value_type("TK", tr("Tokelau")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TO", tr("Tonga")));
|
countryStringMap.insert(CountryStringMap::value_type("TO", tr("Tonga")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TT", tr("Trinidad And Tobago")));
|
countryStringMap.insert(CountryStringMap::value_type("TT", tr("Trinidad And Tobago")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TN", tr("Tunisia")));
|
countryStringMap.insert(CountryStringMap::value_type("TN", tr("Tunisia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TR", tr("Turkey")));
|
countryStringMap.insert(CountryStringMap::value_type("TR", tr("Turkey")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TM", tr("Turkmenistan")));
|
countryStringMap.insert(CountryStringMap::value_type("TM", tr("Turkmenistan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TC", tr("Turks And Caicos Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("TC", tr("Turks And Caicos Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("TV", tr("Tuvalu")));
|
countryStringMap.insert(CountryStringMap::value_type("TV", tr("Tuvalu")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("UG", tr("Uganda")));
|
countryStringMap.insert(CountryStringMap::value_type("UG", tr("Uganda")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("UA", tr("Ukraine")));
|
countryStringMap.insert(CountryStringMap::value_type("UA", tr("Ukraine")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("AE", tr("United Arab Emirates")));
|
countryStringMap.insert(CountryStringMap::value_type("AE", tr("United Arab Emirates")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("GB", tr("United Kingdom")));
|
countryStringMap.insert(CountryStringMap::value_type("GB", tr("United Kingdom")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("US", tr("United States")));
|
countryStringMap.insert(CountryStringMap::value_type("US", tr("United States")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("UM", tr("United States Minor Outlying Islands")));
|
countryStringMap.insert(CountryStringMap::value_type("UM", tr("United States Minor Outlying Islands")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("UY", tr("Uruguay")));
|
countryStringMap.insert(CountryStringMap::value_type("UY", tr("Uruguay")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("UZ", tr("Uzbekistan")));
|
countryStringMap.insert(CountryStringMap::value_type("UZ", tr("Uzbekistan")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VU", tr("Vanuatu")));
|
countryStringMap.insert(CountryStringMap::value_type("VU", tr("Vanuatu")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VE", tr("Venezuela")));
|
countryStringMap.insert(CountryStringMap::value_type("VE", tr("Venezuela")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VN", tr("Viet Nam")));
|
countryStringMap.insert(CountryStringMap::value_type("VN", tr("Viet Nam")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VG", tr("Virgin Islands, British")));
|
countryStringMap.insert(CountryStringMap::value_type("VG", tr("Virgin Islands, British")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("VI", tr("Virgin Islands, U.S.")));
|
countryStringMap.insert(CountryStringMap::value_type("VI", tr("Virgin Islands, U.S.")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("WF", tr("Wallis And Futuna")));
|
countryStringMap.insert(CountryStringMap::value_type("WF", tr("Wallis And Futuna")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("EH", tr("Western Sahara")));
|
countryStringMap.insert(CountryStringMap::value_type("EH", tr("Western Sahara")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("YE", tr("Yemen")));
|
countryStringMap.insert(CountryStringMap::value_type("YE", tr("Yemen")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ZM", tr("Zambia")));
|
countryStringMap.insert(CountryStringMap::value_type("ZM", tr("Zambia")));
|
||||||
countryStringMap.insert(CountryStringMap::value_type("ZW", tr("Zimbabwe")));
|
countryStringMap.insert(CountryStringMap::value_type("ZW", tr("Zimbabwe")));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString fullString("");
|
QString fullString("");
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ private:
|
|||||||
std::string m_clientSecret;
|
std::string m_clientSecret;
|
||||||
std::string m_serverSecret;
|
std::string m_serverSecret;
|
||||||
unsigned char m_recvBuf[2*MAX_CLEANER_PACKET_SIZE];
|
unsigned char m_recvBuf[2*MAX_CLEANER_PACKET_SIZE];
|
||||||
unsigned m_recvBufUsed;
|
size_t m_recvBufUsed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ ChatCleanerManager::HandleGameChatText(unsigned gameId, unsigned playerId, const
|
|||||||
netRequest->playerId = playerId;
|
netRequest->playerId = playerId;
|
||||||
OCTET_STRING_fromBuf(&netRequest->playerName,
|
OCTET_STRING_fromBuf(&netRequest->playerName,
|
||||||
name.c_str(),
|
name.c_str(),
|
||||||
name.length());
|
(int)name.length());
|
||||||
OCTET_STRING_fromBuf(&netRequest->chatMessage,
|
OCTET_STRING_fromBuf(&netRequest->chatMessage,
|
||||||
text.c_str(),
|
text.c_str(),
|
||||||
text.length());
|
(int)text.length());
|
||||||
SendMessageToServer(tmpChat);
|
SendMessageToServer(tmpChat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ ChatCleanerManager::HandleConnect(const boost::system::error_code& ec,
|
|||||||
netInit->requestedVersion = CLEANER_PROTOCOL_VERSION;
|
netInit->requestedVersion = CLEANER_PROTOCOL_VERSION;
|
||||||
OCTET_STRING_fromBuf(&netInit->clientSecret,
|
OCTET_STRING_fromBuf(&netInit->clientSecret,
|
||||||
m_clientSecret.c_str(),
|
m_clientSecret.c_str(),
|
||||||
m_clientSecret.length());
|
(int)m_clientSecret.length());
|
||||||
SendMessageToServer(tmpInit);
|
SendMessageToServer(tmpInit);
|
||||||
m_socket->async_read_some(
|
m_socket->async_read_some(
|
||||||
boost::asio::buffer(m_recvBuf, sizeof(m_recvBuf)),
|
boost::asio::buffer(m_recvBuf, sizeof(m_recvBuf)),
|
||||||
|
|||||||
@@ -920,7 +920,7 @@ ClientStateStartSession::InternalHandlePacket(boost::shared_ptr<ClientThread> cl
|
|||||||
UnauthenticatedLogin_t *noauthLogin = &netInit->login.choice.unauthenticatedLogin;
|
UnauthenticatedLogin_t *noauthLogin = &netInit->login.choice.unauthenticatedLogin;
|
||||||
OCTET_STRING_fromBuf(&noauthLogin->nickName,
|
OCTET_STRING_fromBuf(&noauthLogin->nickName,
|
||||||
context.GetPlayerName().c_str(),
|
context.GetPlayerName().c_str(),
|
||||||
context.GetPlayerName().length());
|
(int)context.GetPlayerName().length());
|
||||||
string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile());
|
string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile());
|
||||||
if (!avatarFile.empty()) {
|
if (!avatarFile.empty()) {
|
||||||
MD5Buf tmpMD5;
|
MD5Buf tmpMD5;
|
||||||
@@ -995,7 +995,7 @@ ClientStateWaitEnterLogin::TimerLoop(const boost::system::error_code& ec, boost:
|
|||||||
GuestLogin_t *guestLogin = &netInit->login.choice.guestLogin;
|
GuestLogin_t *guestLogin = &netInit->login.choice.guestLogin;
|
||||||
OCTET_STRING_fromBuf(&guestLogin->nickName,
|
OCTET_STRING_fromBuf(&guestLogin->nickName,
|
||||||
context.GetPlayerName().c_str(),
|
context.GetPlayerName().c_str(),
|
||||||
context.GetPlayerName().length());
|
(int)context.GetPlayerName().length());
|
||||||
|
|
||||||
client->GetSender().Send(context.GetSessionData(), init);
|
client->GetSender().Send(context.GetSessionData(), init);
|
||||||
client->SetState(ClientStateWaitSession::Instance());
|
client->SetState(ClientStateWaitSession::Instance());
|
||||||
@@ -1013,7 +1013,7 @@ ClientStateWaitEnterLogin::TimerLoop(const boost::system::error_code& ec, boost:
|
|||||||
string outUserData(tmpSession->AuthGetNextOutMsg());
|
string outUserData(tmpSession->AuthGetNextOutMsg());
|
||||||
OCTET_STRING_fromBuf(&authLogin->clientUserData,
|
OCTET_STRING_fromBuf(&authLogin->clientUserData,
|
||||||
outUserData.c_str(),
|
outUserData.c_str(),
|
||||||
outUserData.length());
|
(int)outUserData.length());
|
||||||
string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile());
|
string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile());
|
||||||
if (!avatarFile.empty()) {
|
if (!avatarFile.empty()) {
|
||||||
MD5Buf tmpMD5;
|
MD5Buf tmpMD5;
|
||||||
@@ -1089,7 +1089,7 @@ ClientStateWaitAuthChallenge::InternalHandlePacket(boost::shared_ptr<ClientThrea
|
|||||||
|
|
||||||
OCTET_STRING_fromBuf(&outResponse->clientResponse,
|
OCTET_STRING_fromBuf(&outResponse->clientResponse,
|
||||||
outUserData.c_str(),
|
outUserData.c_str(),
|
||||||
outUserData.length());
|
(int)outUserData.length());
|
||||||
client->GetSender().Send(tmpSession, packet);
|
client->GetSender().Send(tmpSession, packet);
|
||||||
client->SetState(ClientStateWaitAuthVerify::Instance());
|
client->SetState(ClientStateWaitAuthVerify::Instance());
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ ClientThread::SendGameChatMessage(const std::string &msg)
|
|||||||
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
||||||
OCTET_STRING_fromBuf(&netChat->chatText,
|
OCTET_STRING_fromBuf(&netChat->chatText,
|
||||||
msg.c_str(),
|
msg.c_str(),
|
||||||
msg.length());
|
(int)msg.length());
|
||||||
|
|
||||||
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeGame;
|
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeGame;
|
||||||
netChat->chatRequestType.choice.chatRequestTypeGame.gameId = GetGameId();
|
netChat->chatRequestType.choice.chatRequestTypeGame.gameId = GetGameId();
|
||||||
@@ -181,7 +181,7 @@ ClientThread::SendLobbyChatMessage(const std::string &msg)
|
|||||||
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
||||||
OCTET_STRING_fromBuf(&netChat->chatText,
|
OCTET_STRING_fromBuf(&netChat->chatText,
|
||||||
msg.c_str(),
|
msg.c_str(),
|
||||||
msg.length());
|
(int)msg.length());
|
||||||
|
|
||||||
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeLobby;
|
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeLobby;
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ ClientThread::SendPrivateChatMessage(unsigned targetPlayerId, const std::string
|
|||||||
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
||||||
OCTET_STRING_fromBuf(&netChat->chatText,
|
OCTET_STRING_fromBuf(&netChat->chatText,
|
||||||
msg.c_str(),
|
msg.c_str(),
|
||||||
msg.length());
|
(int)msg.length());
|
||||||
|
|
||||||
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypePrivate;
|
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypePrivate;
|
||||||
netChat->chatRequestType.choice.chatRequestTypePrivate.targetPlayerId = targetPlayerId;
|
netChat->chatRequestType.choice.chatRequestTypePrivate.targetPlayerId = targetPlayerId;
|
||||||
@@ -221,7 +221,7 @@ ClientThread::SendJoinFirstGame(const std::string &password, bool autoLeave)
|
|||||||
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
||||||
&asn_DEF_UTF8String,
|
&asn_DEF_UTF8String,
|
||||||
password.c_str(),
|
password.c_str(),
|
||||||
password.length());
|
(int)password.length());
|
||||||
}
|
}
|
||||||
netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame;
|
netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame;
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ ClientThread::SendJoinGame(unsigned gameId, const std::string &password, bool au
|
|||||||
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
||||||
&asn_DEF_UTF8String,
|
&asn_DEF_UTF8String,
|
||||||
password.c_str(),
|
password.c_str(),
|
||||||
password.length());
|
(int)password.length());
|
||||||
}
|
}
|
||||||
netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame;
|
netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame;
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ ClientThread::SendCreateGame(const GameData &gameData, const std::string &name,
|
|||||||
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
netJoinGame->password = OCTET_STRING_new_fromBuf(
|
||||||
&asn_DEF_UTF8String,
|
&asn_DEF_UTF8String,
|
||||||
password.c_str(),
|
password.c_str(),
|
||||||
password.length());
|
(int)password.length());
|
||||||
}
|
}
|
||||||
netJoinGame->joinGameAction.present = joinGameAction_PR_joinNewGame;
|
netJoinGame->joinGameAction.present = joinGameAction_PR_joinNewGame;
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ ClientThread::SendCreateGame(const GameData &gameData, const std::string &name,
|
|||||||
NetPacket::SetGameData(gameData, &joinNew->gameInfo);
|
NetPacket::SetGameData(gameData, &joinNew->gameInfo);
|
||||||
OCTET_STRING_fromBuf(&joinNew->gameInfo.gameName,
|
OCTET_STRING_fromBuf(&joinNew->gameInfo.gameName,
|
||||||
name.c_str(),
|
name.c_str(),
|
||||||
name.length());
|
(int)name.length());
|
||||||
m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet));
|
m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ DownloadHelper::~DownloadHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DownloadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &/*user*/, const string &/*password*/, int /*filesize*/)
|
DownloadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &/*user*/, const string &/*password*/, size_t /*filesize*/)
|
||||||
{
|
{
|
||||||
// Open target file for writing.
|
// Open target file for writing.
|
||||||
GetData()->targetFile = fopen(targetFileName.c_str(), "wb");
|
GetData()->targetFile = fopen(targetFileName.c_str(), "wb");
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ struct IrcContext {
|
|||||||
string channelPassword;
|
string channelPassword;
|
||||||
unsigned renameTries;
|
unsigned renameTries;
|
||||||
bool sendingBlocked;
|
bool sendingBlocked;
|
||||||
unsigned sendCounter;
|
size_t sendCounter;
|
||||||
queue<string> sendQueue;
|
queue<string> sendQueue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ NetPacket::~NetPacket()
|
|||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<NetPacket>
|
boost::shared_ptr<NetPacket>
|
||||||
NetPacket::Create(char *data, unsigned &dataSize)
|
NetPacket::Create(char *data, size_t &dataSize)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<NetPacket> tmpPacket;
|
boost::shared_ptr<NetPacket> tmpPacket;
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ ServerGame::InternalStartGame()
|
|||||||
|
|
||||||
// Set start data.
|
// Set start data.
|
||||||
StartData startData;
|
StartData startData;
|
||||||
startData.numberOfPlayers = playerData.size();
|
startData.numberOfPlayers = (int)playerData.size();
|
||||||
|
|
||||||
int tmpDealerPos = 0;
|
int tmpDealerPos = 0;
|
||||||
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
||||||
@@ -793,10 +793,10 @@ ServerGame::RemoveDisconnectedPlayers()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
int
|
||||||
ServerGame::GetCurNumberOfPlayers() const
|
ServerGame::GetCurNumberOfPlayers() const
|
||||||
{
|
{
|
||||||
return GetFullPlayerDataList().size();
|
return (int)GetFullPlayerDataList().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr<ServerGame> server, boos
|
|||||||
if (session && session->GetPlayerData()) {
|
if (session && session->GetPlayerData()) {
|
||||||
const GameData &tmpGameData = server->GetGameData();
|
const GameData &tmpGameData = server->GetGameData();
|
||||||
// Check the number of players.
|
// Check the number of players.
|
||||||
if (server->GetCurNumberOfPlayers() >= (size_t)tmpGameData.maxNumberOfPlayers) {
|
if (server->GetCurNumberOfPlayers() >= tmpGameData.maxNumberOfPlayers) {
|
||||||
server->MoveSessionToLobby(session, NTF_NET_REMOVED_GAME_FULL);
|
server->MoveSessionToLobby(session, NTF_NET_REMOVED_GAME_FULL);
|
||||||
} else {
|
} else {
|
||||||
session->GetPlayerData()->SetGameAdmin(session->GetPlayerData()->GetUniqueId() == server->GetAdminPlayerId());
|
session->GetPlayerData()->SetGameAdmin(session->GetPlayerData()->GetUniqueId() == server->GetAdminPlayerId());
|
||||||
@@ -426,7 +426,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr<ServerGame> server, boos
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&joinAck->gameInfo.gameName,
|
&joinAck->gameInfo.gameName,
|
||||||
server->GetName().c_str(),
|
server->GetName().c_str(),
|
||||||
server->GetName().length());
|
(int)server->GetName().length());
|
||||||
server->GetLobbyThread().GetSender().Send(session, packet);
|
server->GetLobbyThread().GetSender().Send(session, packet);
|
||||||
|
|
||||||
// Send notifications for connected players to client.
|
// Send notifications for connected players to client.
|
||||||
@@ -447,7 +447,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr<ServerGame> server, boos
|
|||||||
// Notify lobby.
|
// Notify lobby.
|
||||||
server->GetLobbyThread().NotifyPlayerJoinedGame(server->GetId(), session->GetPlayerData()->GetUniqueId());
|
server->GetLobbyThread().NotifyPlayerJoinedGame(server->GetId(), session->GetPlayerData()->GetUniqueId());
|
||||||
|
|
||||||
if (server->GetCurNumberOfPlayers() == (size_t)tmpGameData.maxNumberOfPlayers) {
|
if (server->GetCurNumberOfPlayers() == tmpGameData.maxNumberOfPlayers) {
|
||||||
// Automatically start the game if it is full.
|
// Automatically start the game if it is full.
|
||||||
RegisterAutoStartTimer(server);
|
RegisterAutoStartTimer(server);
|
||||||
}
|
}
|
||||||
@@ -582,7 +582,7 @@ ServerGameStateInit::InternalProcessPacket(boost::shared_ptr<ServerGame> server,
|
|||||||
if (session->GetPlayerData()->IsGameAdmin()
|
if (session->GetPlayerData()->IsGameAdmin()
|
||||||
&& netStartEvent->gameId == server->GetId()
|
&& netStartEvent->gameId == server->GetId()
|
||||||
&& (server->GetGameData().gameType != GAME_TYPE_RANKING // ranking games need to be full
|
&& (server->GetGameData().gameType != GAME_TYPE_RANKING // ranking games need to be full
|
||||||
|| server->GetGameData().maxNumberOfPlayers == (int)server->GetCurNumberOfPlayers())) {
|
|| server->GetGameData().maxNumberOfPlayers == server->GetCurNumberOfPlayers())) {
|
||||||
SendStartEvent(*server, netStartEvent->fillWithComputerPlayers);
|
SendStartEvent(*server, netStartEvent->fillWithComputerPlayers);
|
||||||
} else { // kick players who try to start but are not allowed to
|
} else { // kick players who try to start but are not allowed to
|
||||||
server->MoveSessionToLobby(session, NTF_NET_REMOVED_START_FAILED);
|
server->MoveSessionToLobby(session, NTF_NET_REMOVED_START_FAILED);
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ ServerLobbyThread::SendGlobalChat(const string &message)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&netChat->chatText,
|
&netChat->chatText,
|
||||||
message.c_str(),
|
message.c_str(),
|
||||||
message.length());
|
(int)message.length());
|
||||||
|
|
||||||
m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established);
|
m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established);
|
||||||
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
||||||
@@ -577,7 +577,7 @@ ServerLobbyThread::SendGlobalMsgBox(const string &message)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&netDialog->notificationText,
|
&netDialog->notificationText,
|
||||||
message.c_str(),
|
message.c_str(),
|
||||||
message.length());
|
(int)message.length());
|
||||||
m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established);
|
m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established);
|
||||||
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
||||||
}
|
}
|
||||||
@@ -592,7 +592,7 @@ ServerLobbyThread::SendChatBotMsg(const std::string &message)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&netChat->chatText,
|
&netChat->chatText,
|
||||||
message.c_str(),
|
message.c_str(),
|
||||||
message.length());
|
(int)message.length());
|
||||||
|
|
||||||
m_sessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Established);
|
m_sessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Established);
|
||||||
m_gameSessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Game);
|
m_gameSessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Game);
|
||||||
@@ -613,7 +613,7 @@ ServerLobbyThread::SendChatBotMsg(unsigned gameId, const std::string &message)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&netChat->chatText,
|
&netChat->chatText,
|
||||||
message.c_str(),
|
message.c_str(),
|
||||||
message.length());
|
(int)message.length());
|
||||||
|
|
||||||
GameMap::const_iterator pos = m_gameMap.find(gameId);
|
GameMap::const_iterator pos = m_gameMap.find(gameId);
|
||||||
if (pos != m_gameMap.end()) {
|
if (pos != m_gameMap.end()) {
|
||||||
@@ -1075,7 +1075,7 @@ ServerLobbyThread::HandleNetPacketAuthClientResponse(boost::shared_ptr<SessionDa
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&verification->serverVerification,
|
&verification->serverVerification,
|
||||||
(char *)outVerification.c_str(),
|
(char *)outVerification.c_str(),
|
||||||
outVerification.size());
|
(int)outVerification.size());
|
||||||
GetSender().Send(session, packet);
|
GetSender().Send(session, packet);
|
||||||
// The last message is only for server verification.
|
// The last message is only for server verification.
|
||||||
// We are done now, the user has logged in.
|
// We are done now, the user has logged in.
|
||||||
@@ -1193,12 +1193,12 @@ ServerLobbyThread::HandleNetPacketRetrievePlayerInfo(boost::shared_ptr<SessionDa
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&data->playerName,
|
&data->playerName,
|
||||||
tmpPlayer->GetName().c_str(),
|
tmpPlayer->GetName().c_str(),
|
||||||
tmpPlayer->GetName().length());
|
(int)tmpPlayer->GetName().length());
|
||||||
if (!tmpPlayer->GetCountry().empty()) {
|
if (!tmpPlayer->GetCountry().empty()) {
|
||||||
data->countryCode = OCTET_STRING_new_fromBuf(
|
data->countryCode = OCTET_STRING_new_fromBuf(
|
||||||
&asn_DEF_UTF8String,
|
&asn_DEF_UTF8String,
|
||||||
tmpPlayer->GetCountry().c_str(),
|
tmpPlayer->GetCountry().c_str(),
|
||||||
tmpPlayer->GetCountry().length());
|
(int)tmpPlayer->GetCountry().length());
|
||||||
}
|
}
|
||||||
if (!tmpPlayer->GetAvatarMD5().IsZero()) {
|
if (!tmpPlayer->GetAvatarMD5().IsZero()) {
|
||||||
data->avatarData = (struct PlayerInfoData::avatarData *)calloc(1, sizeof(struct PlayerInfoData::avatarData));
|
data->avatarData = (struct PlayerInfoData::avatarData *)calloc(1, sizeof(struct PlayerInfoData::avatarData));
|
||||||
@@ -1503,7 +1503,7 @@ ServerLobbyThread::EstablishSession(boost::shared_ptr<SessionData> session)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&netInitAck->yourSessionId,
|
&netInitAck->yourSessionId,
|
||||||
(char *)&sessionId,
|
(char *)&sessionId,
|
||||||
boost::uuids::uuid::static_size());
|
(int)boost::uuids::uuid::static_size());
|
||||||
netInitAck->yourPlayerId = session->GetPlayerData()->GetUniqueId();
|
netInitAck->yourPlayerId = session->GetPlayerData()->GetUniqueId();
|
||||||
GetSender().Send(session, ack);
|
GetSender().Send(session, ack);
|
||||||
|
|
||||||
@@ -2124,7 +2124,7 @@ ServerLobbyThread::CreateNetPacketGameListNew(const ServerGame &game)
|
|||||||
OCTET_STRING_fromBuf(
|
OCTET_STRING_fromBuf(
|
||||||
&gameNew->gameInfo.gameName,
|
&gameNew->gameInfo.gameName,
|
||||||
game.GetName().c_str(),
|
game.GetName().c_str(),
|
||||||
game.GetName().length());
|
(int)game.GetName().length());
|
||||||
gameNew->isPrivate = game.IsPasswordProtected();
|
gameNew->isPrivate = game.IsPasswordProtected();
|
||||||
|
|
||||||
PlayerIdList tmpList = game.GetPlayerIdList();
|
PlayerIdList tmpList = game.GetPlayerIdList();
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ unsigned
|
|||||||
SessionManager::GetRawSessionCount()
|
SessionManager::GetRawSessionCount()
|
||||||
{
|
{
|
||||||
boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex);
|
boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex);
|
||||||
return m_sessionMap.size();
|
return (unsigned)m_sessionMap.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ TransferHelper::~TransferHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password, int filesize)
|
TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password, size_t filesize)
|
||||||
{
|
{
|
||||||
// Initialise curl.
|
// Initialise curl.
|
||||||
m_data->curlHandle = curl_easy_init();
|
m_data->curlHandle = curl_easy_init();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ UploaderThread::~UploaderThread()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
UploaderThread::QueueUpload(const string &url, const string &user, const string &pwd, const string &filename, int filesize)
|
UploaderThread::QueueUpload(const string &url, const string &user, const string &pwd, const string &filename, size_t filesize)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_uploadQueueMutex);
|
boost::mutex::scoped_lock lock(m_uploadQueueMutex);
|
||||||
m_uploadQueue.push(UploadData(url, user, pwd, filename, filesize));
|
m_uploadQueue.push(UploadData(url, user, pwd, filename, filesize));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ UploadHelper::~UploadHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
UploadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &user, const string &password, int filesize)
|
UploadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &user, const string &password, size_t filesize)
|
||||||
{
|
{
|
||||||
// Open target file for reading.
|
// Open target file for reading.
|
||||||
GetData()->targetFile = fopen(targetFileName.c_str(), "rb");
|
GetData()->targetFile = fopen(targetFileName.c_str(), "rb");
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
||||||
const std::string &user, const std::string &password, int filesize);
|
const std::string &user, const std::string &password, size_t filesize);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ public:
|
|||||||
NetPacket(MemAllocType alloc = NoAlloc);
|
NetPacket(MemAllocType alloc = NoAlloc);
|
||||||
~NetPacket();
|
~NetPacket();
|
||||||
|
|
||||||
static boost::shared_ptr<NetPacket> Create(char *data, unsigned &dataSize);
|
static boost::shared_ptr<NetPacket> Create(char *data, size_t &dataSize);
|
||||||
|
|
||||||
const PokerTHMessage_t *GetMsg() const {
|
const PokerTHMessage_t *GetMsg() const {
|
||||||
return m_msg;
|
return m_msg;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
NetPacketList receivedPackets;
|
NetPacketList receivedPackets;
|
||||||
char recvBuf[RECV_BUF_SIZE];
|
char recvBuf[RECV_BUF_SIZE];
|
||||||
unsigned recvBufUsed;
|
size_t recvBufUsed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
~SendBuffer();
|
~SendBuffer();
|
||||||
|
|
||||||
inline size_t GetSendBufLeft() const {
|
inline size_t GetSendBufLeft() const {
|
||||||
int bytesLeft = sendBufAllocated - sendBufUsed;
|
int bytesLeft = (int)(sendBufAllocated - sendBufUsed);
|
||||||
return bytesLeft < 0 ? (size_t)0 : (size_t)bytesLeft;
|
return bytesLeft < 0 ? (size_t)0 : (size_t)bytesLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ protected:
|
|||||||
void MoveSessionToLobby(boost::shared_ptr<SessionData> session, int reason);
|
void MoveSessionToLobby(boost::shared_ptr<SessionData> session, int reason);
|
||||||
|
|
||||||
void RemoveDisconnectedPlayers();
|
void RemoveDisconnectedPlayers();
|
||||||
size_t GetCurNumberOfPlayers() const;
|
int GetCurNumberOfPlayers() const;
|
||||||
void AssignPlayerNumbers(PlayerDataList &playerList);
|
void AssignPlayerNumbers(PlayerDataList &playerList);
|
||||||
bool IsValidPlayer(unsigned playerId) const;
|
bool IsValidPlayer(unsigned playerId) const;
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
// Set the parameters. Does not do any error checking.
|
// Set the parameters. Does not do any error checking.
|
||||||
// Throws an exception on failure.
|
// Throws an exception on failure.
|
||||||
void Init(const std::string &url, const std::string &targetFileName,
|
void Init(const std::string &url, const std::string &targetFileName,
|
||||||
const std::string &user = "", const std::string &password = "", int filesize = 0);
|
const std::string &user = "", const std::string &password = "", size_t filesize = 0);
|
||||||
|
|
||||||
// Returns true when done, false should call again.
|
// Returns true when done, false should call again.
|
||||||
// Throws an exception on error.
|
// Throws an exception on error.
|
||||||
@@ -49,7 +49,7 @@ protected:
|
|||||||
boost::shared_ptr<TransferData> GetData();
|
boost::shared_ptr<TransferData> GetData();
|
||||||
|
|
||||||
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
||||||
const std::string &user, const std::string &password, int filesize) = 0;
|
const std::string &user, const std::string &password, size_t filesize) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -36,19 +36,19 @@ public:
|
|||||||
UploaderThread();
|
UploaderThread();
|
||||||
virtual ~UploaderThread();
|
virtual ~UploaderThread();
|
||||||
|
|
||||||
void QueueUpload(const std::string &url, const std::string &user, const std::string &pwd, const std::string &filename, int filesize);
|
void QueueUpload(const std::string &url, const std::string &user, const std::string &pwd, const std::string &filename, size_t filesize);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct UploadData {
|
struct UploadData {
|
||||||
UploadData() : filesize(0) {}
|
UploadData() : filesize(0) {}
|
||||||
UploadData(const std::string &a, const std::string &u, const std::string &p, const std::string &f, int s)
|
UploadData(const std::string &a, const std::string &u, const std::string &p, const std::string &f, size_t s)
|
||||||
: address(a), user(u), pwd(p), filename(f), filesize(s) {}
|
: address(a), user(u), pwd(p), filename(f), filesize(s) {}
|
||||||
|
|
||||||
std::string address;
|
std::string address;
|
||||||
std::string user;
|
std::string user;
|
||||||
std::string pwd;
|
std::string pwd;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
int filesize;
|
size_t filesize;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::queue<UploadData> UploadDataQueue;
|
typedef std::queue<UploadData> UploadDataQueue;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
virtual void InternalInit(const std::string &url, const std::string &targetFileName,
|
||||||
const std::string &user, const std::string &password, int filesize);
|
const std::string &user, const std::string &password, size_t filesize);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ struct AvatarFile {
|
|||||||
AvatarFile() : fileType(AVATAR_FILE_TYPE_UNKNOWN), reportedSize(0) {}
|
AvatarFile() : fileType(AVATAR_FILE_TYPE_UNKNOWN), reportedSize(0) {}
|
||||||
std::vector<unsigned char> fileData;
|
std::vector<unsigned char> fileData;
|
||||||
AvatarFileType fileType;
|
AvatarFileType fileType;
|
||||||
unsigned reportedSize;
|
size_t reportedSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerInfo {
|
struct PlayerInfo {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
|
ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
|
||||||
if (!pidStream.fail())
|
if (!pidStream.fail())
|
||||||
pidStream << getpid();
|
pidStream << _getpid();
|
||||||
else
|
else
|
||||||
LOG_ERROR("Could not create process id file \"" << pidFile << "\"!");
|
LOG_ERROR("Could not create process id file \"" << pidFile << "\"!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user