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