#import "JubGtkUI.h"
@interface AppDelegate: OFObject
- <OFApplicationDelegate, XMPPConnectionDelegate>
+ <OFApplicationDelegate, XMPPConnectionDelegate, XMPPRosterDelegate>
{
XMPPConnection *connection;
XMPPRoster *roster;
[connection connect];
[connection handleConnection];
+ [connection addDelegate: [ui rosterDelegate]];
+
roster = [[XMPPRoster alloc] initWithConnection: connection];
[roster addDelegate: [ui rosterDelegate]];
+ [roster addDelegate: self];
[ui startUIThread];
}
[roster requestRoster];
}
+- (void)rosterWasReceived: (XMPPRoster*)roster
+{
+ [connection sendStanza: [XMPPPresence presence]];
+}
+
- (void)connection: (XMPPConnection*)conn
didReceiveElement: (OFXMLElement*)element
{