1 #import <ObjFW/ObjFW.h>
2 #import <ObjXMPP/ObjXMPP.h>
6 #import "JubChatClient.h"
8 @interface AppDelegate: OFObject <OFApplicationDelegate, XMPPConnectionDelegate>
10 JubChatClient *client;
15 OF_APPLICATION_DELEGATE(AppDelegate)
17 @implementation AppDelegate
18 - (void)applicationDidFinishLaunching
20 JubConfig *config = [[[JubConfig alloc] initWithFile: @"config.xml"]
23 client = [[JubChatClient alloc] initWithConfig: config];
25 ui = [[JubGtkUI alloc] initWithClient: client];
28 [client.connection addDelegate: self];
33 - (void)connection: (XMPPConnection*)conn
34 didReceiveElement: (OFXMLElement*)element
36 of_log(@"In: %@", element);
39 - (void)connection: (XMPPConnection*)conn
40 didSendElement: (OFXMLElement*)element
42 of_log(@"Out: %@", element);