void Tile::urlResponse(ofHttpResponse & response) { cout << response.request.name << "\n"; if(response.status == 200 ) { if (response.request.name == ofToString(id)+":"+name) { ofUnregisterURLNotification(this); cache[key] = response.data; img.loadImage(response.data); // lock(); // // // Get the loaded url from the async queue and move it into the update queue. // entry_iterator it = getEntryFromAsyncQueue(response.request.name); // if(it != images_async_loading.end()) { // (*it).image->loadImage(response.data); // images_to_update.push_back((*it)); // images_async_loading.erase(it); // } // // unlock(); } } else { // log error. stringstream ss; ss << "Could not load from url, response status: " << response.status; ofLog(OF_LOG_ERROR, ss.str()); } }
//-------------------------------------------------------------- void ofxTwitter::appExits(ofEventArgs& args) { ofLogNotice("ofxTwitter::appExits") << "Clearing Twitter client..."; ofUnregisterURLNotification(this); ofRemoveAllURLRequests(); }
Map::~Map() { ofUnregisterMouseEvents(this); ofUnregisterKeyEvents(this); ofRemoveListener(ofEvents().update, this, &Map::update); ofUnregisterURLNotification(this); }
void ofxQRcode::urlResponse(ofHttpResponse& response) { if(response.request.name == "qrcode") { if (response.status == 200) loadImage(response.data); ofUnregisterURLNotification(this); } }
void InstagramView::urlResponse(ofHttpResponse & response){ ofUnregisterURLNotification(this); if(response.status != 200){ return; } if(response.request.url == _args.imageUrl){ initImage(response.request.name); } if(response.request.url == _args.videoUrl){ initVideo(response.request.name); } if(response.request.url == _args.profilePictureUrl){ initProfileImage(response.request.name); } }
void InstagramView::unload(){ ofUnregisterURLNotification(this); #ifdef TARGET_RASPBERRY_PI _video.close(); #else if(_video.isLoaded() && _video.isInitialized()){ _video.stop(); _video.close(); } #endif if(_image.isAllocated()){ _image.clear(); } if(_profileImage.isAllocated()){ _profileImage.clear(); } _isLoaded = false; }
UIRpiCam::~UIRpiCam(){ ofUnregisterURLNotification(this); }
//-------------------------------------------------------------- void ofApp::exit() { ofUnregisterURLNotification(this); }
void ofApp::exit() { ofUnregisterURLNotification(this); delete imgTopx; }
InstagramView::~InstagramView(){ ofUnregisterURLNotification(this); }
ofxStreetView::~ofxStreetView(){ if(bRegister){ ofUnregisterURLNotification(this); bRegister = false; } }