#include #include "ConnectionManager.h" #include "ClientConnection.h" #include "Project.h" #include "ProjectList.h" #include void connection_done(ClientConnection& connection); void project_list_retrieved(const ProjectList& projects); int main() { ConnectionManager mgr; ClientConnection connection(mgr); connection.connect_async("127.0.0.1", sigc::ptr_fun(&connection_done)); mgr.wait(); return 0; } void connection_done(ClientConnection& connection) { connection.get_projects_async(sigc::ptr_fun(&project_list_retrieved)); } void project_list_retrieved(const ProjectList& projects) { for (ProjectList::const_iterator it = projects.begin(); it != projects.end(); ++it) { Project* p = *it; printf("Project %s (%s)\n", p->name(), p->master_url()); } } /* vim: set ts=4 sw=4 et: */