View Single Post
Old 04-21-2010, 11:59 AM   #5
reader42
Zealot
reader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it isreader42 knows what time it is
 
Posts: 117
Karma: 2097
Join Date: Feb 2010
Device: none
Kann leider hier gerade nichts testen, aber ungefähr so sollte es gehen:
Code:
#include <unistd.h>
#include <inkview.h>

int main(int argc, char **argv) {
  char filename[FILENAME_MAX] = "/mnt/ext1/test.html";
  char url[FILENAME_MAX] = "http://hostname.com/test.html";
  int net_session = NewSession();
  DownloadTo(net_session, url, 0, filename, -1);
  iv_sessioninfo * session_info = GetSessionInfo(net_session);
  while (session_info->progress < session_info->length)
  {
    sleep(1);
    session_info = GetSessionInfo(net_session);
  }
  return 0;
}

Last edited by reader42; 04-21-2010 at 03:47 PM.
reader42 is offline   Reply With Quote