Exemplo 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;
}
Exemplo n.º 2
0
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;
}