All pastes #1069537 Raw Edit

Mine

public cpp v1 · immutable
#1069537 ·published 2008-07-11 22:02 UTC
rendered paste body
#include <cstdio>#include "ConnectionManager.h"#include "ClientConnection.h"#include "Project.h"#include "ProjectList.h"#include <stdc++/stdc++.h>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: */