bool CIwGameAds::Init() { Mediator = NULL; AdAvailableCallback = NULL; Error = ErrorNone; ErrorString = ""; ErrorString.setAutoHash(true); ClientID = "-1"; HtmlAds = false; TextAds = false; UserAge = 0; UserGender = GenderInvalid; AdAvailable = false; UserAgent = IW_GAME_HTTP_MANAGER->getUserAgent(); SlotSize = sDefault; Version = "Sm2m-1.5.3"; // Get device UDID UDID = s3eDeviceGetInt(S3E_DEVICE_UNIQUE_ID); // Get device surface dimensions Width = IwGxGetScreenWidth(); Height = IwGxGetScreenHeight(); // Find our which portal ID we should be using PortalType = FindPortalType(TextAds); // Allocate string large enough to hold our largest request RequestURI.allocString(2048); // Get previous session client ID /* CIwGameFile file; if (file.Open("\\iwgameads.dat", "rb")) { int len = file.getFileSize(); ClientID.allocString(len); ClientID.setLength(len); file.Read((void*)ClientID.c_str(), len); }*/ // ClientID = CIwGameString(UDID); return true; // Pointer support }
bool CzAds::Init() { Mediator = NULL; AdAvailableCallback = NULL; Error = ErrorNone; ErrorString = ""; ErrorString.setAutoHash(true); ClientID = "-1"; HtmlAds = false; TextAds = false; UserAge = 0; UserGender = GenderInvalid; AdAvailable = false; UserAgent = CZ_HTTP_MANAGER->getUserAgent(); Version = "Sm2m-1.5.3"; // Get device UDID UDID = PLATFORM_SYS->getDeviceUDID(); // Get device surface dimensions Width = PLATFORM_DISPLAY->getCurrentWidth(); Height = PLATFORM_DISPLAY->getCurrentHeight(); // Find our which portal ID we should be using PortalType = FindPortalType(TextAds); // Allocate string large enough to hold our largest request RequestURI.allocString(2048); // Get previous session client ID CzFile file; if (file.Open("\\appeasyads.dat", "rb")) { int len = file.getFileSize(); ClientID.allocString(len); ClientID.setLength(len); file.Read((void*)ClientID.c_str(), len); } // ClientID = CzString(UDID); return true; // Pointer support }