#import "JubChatClient.h"
#import "ObjXMPP/namespaces.h"
+#import "JubAvatarManager.h"
+
#define JUB_CLIENT_URI @"http://babelmonkeys.de/jubjub"
@implementation JubChatClient
@synthesize connection = _connection;
@synthesize roster = _roster;
+@synthesize avatarManager = _avatarManager;
@synthesize contactManager = _contactManager;
@synthesize discoEntity = _discoEntity;
@synthesize presence = _presence;
_roster = [[XMPPRoster alloc] initWithConnection: _connection];
[_roster addDelegate: self];
+ _discoEntity =
+ [[XMPPDiscoEntity alloc] initWithConnection: _connection
+ capsNode: JUB_CLIENT_URI];
+
+ XMPPDiscoIdentity *identity =
+ [XMPPDiscoIdentity identityWithCategory: @"client"
+ type: @"pc"
+ name: @"JubJub"];
+ [_discoEntity addIdentity: identity];
+ [_discoEntity addFeature: XMPP_NS_CAPS];
+
+ _avatarManager =
+ [[JubAvatarManager alloc] initWithClient: self];
+
_contactManager = [[XMPPContactManager alloc]
initWithConnection: _connection
roster: _roster];
[_contactManager release];
[_discoEntity release];
[_streamManagement release];
+ [_avatarManager release];
[_connection release];
[_presence release];
[_chatMap release];
- (void)connection: (XMPPConnection*)connection
wasBoundToJID: (XMPPJID*)jid
{
- of_log(@"Bound to JID: %@", [jid fullJID]);
-
- _discoEntity =
- [[XMPPDiscoEntity alloc] initWithConnection: connection
- capsNode: JUB_CLIENT_URI];
-
- XMPPDiscoIdentity *identity =
- [XMPPDiscoIdentity identityWithCategory: @"client"
- type: @"pc"
- name: @"JubJub"];
- [_discoEntity addIdentity: identity];
- [_discoEntity addFeature: XMPP_NS_CAPS];
-
[_roster requestRoster];
}