int Container::url_write(void*h, unsigned char* buf, int size) { int retval = -1; try { URLProtocolHandler* handler = (URLProtocolHandler*) h; if (handler) retval = handler->url_write(buf, size); } catch (...) { retval = -1; } VS_LOG_TRACE("URLProtocolHandler[%p]->url_write(%p, %d) ==> %d", h, buf, size, retval); return retval; }
int URLProtocolManager :: url_write(void *h, const unsigned char* buf, int size) { int retval = -1; try { URLProtocolHandler* handler = URLProtocolManager::getHandler(h); retval = handler->url_write(buf, size); } catch(...) { retval = -1; } return retval; }