#include "pn_core.h" #include "pn_session.h" #include static GMainLoop *loop; static void signal_handler(int signal) { g_main_loop_quit(loop); } int main(int argc, char *argv[]) { struct pn_session *session; g_type_init(); pn_core_init(); signal(SIGINT, signal_handler); loop = g_main_loop_new(NULL, FALSE); session = pn_session_new(argv[1], argv[2]); pn_session_connect(session, "messenger.hotmail.com", 1863); g_message("connecting"); g_main_loop_run(loop); pn_session_free(session); g_main_loop_unref(loop); pn_core_deinit(); return 0; }