// we got a reply void gotTermListWrapper ( void *state ) { Images *THIS = (Images *)state; // process/store the reply THIS->gotTermList(); // try to launch more, returns false if it blocks if ( ! THIS->launchRequests() ) return; // all done THIS->m_callback ( THIS->m_state ); }