int report_work() { ClientConnection client("localhost"); if (!client.authenticate("password")) { cerr << "Authentication error\n"; return 1; } Project& p = client.lookupProject("http://www.primegrid.com/"); TaskList tasks = p.getTasks(); for (TaskList::iterator i = tasks.begin(); i != tasks.end(); ++i) { if (i->readyToReport()) { p.contactScheduler(); break; } } }