Game Development Reference
In-Depth Information
virtual void Invoke()
{
FGallery->ListDownloaded( FResult );
}
clPtr<clGallery> FGallery;
};
void clGallery::ListDownloaded( clPtr<clBlob> B )
{
if ( !B )
{
FNoImagesList = true;
return;
}
12. Parse the data blob corresponding to the XML image list that has been loaded
from Picasa:
FURLs.clear();
void* Data = B->GetData();
size_t DataSize = B->GetSize();
Picasa_ParseXMLResponse(
std::string( ( char* )Data, DataSize ), FURLs );
13. Update the descriptors and start downloading the images:
FImages.clear();
for ( size_t j = 0 ; j != FURLs.size() ; j++ )
{
LPhotoSize Size = L_PHOTO_SIZE_256;
std::string ImgUrl = Picasa_GetDirectImageURL(
FURLs[j], Size);
clPtr<sImageDescriptor> Desc = new sImageDescriptor();
Desc->FSize = Size;
Desc->FURL = ImgUrl;
Desc->FID = j;
FImages.push_back(Desc);
Desc->StartDownload( true );
}
FNoImagesList = false;
}
 
Search WWH ::




Custom Search