- (void)applicationDidFinishLaunching
{
ui = [[JubGtkUI alloc] init];
+ id<XMPPRosterDelegate, XMPPConnectionDelegate> rosterDelegate =
+ [ui rosterDelegate];
connection = [[XMPPConnection alloc] init];
[connection addDelegate: self];
connection.username = @"alice";
connection.password = @"test";
- [connection connect];
- [connection handleConnection];
+ [connection asyncConnectAndHandle];
- [connection addDelegate: [ui rosterDelegate]];
+ [connection addDelegate: rosterDelegate];
roster = [[XMPPRoster alloc] initWithConnection: connection];
- [roster addDelegate: [ui rosterDelegate]];
+ [roster addDelegate: rosterDelegate];
[roster addDelegate: self];
[ui startUIThread];