X-Git-Url: http://git.babelmonkeys.de/?a=blobdiff_plain;f=src%2Fcore%2FJubChatClient.m;fp=src%2Fcore%2FJubChatClient.m;h=3184b8970dd08e5e914aaa61c7d5bfef29d72de4;hb=fa3c174db5c04176d891b91f68491e6ac8e22c22;hp=1d7874ad563d26c044f5b9d100651c0505deb94f;hpb=8752f8d229e67221a6178e0cc4cc888b6e8c292e;p=jubjub.git diff --git a/src/core/JubChatClient.m b/src/core/JubChatClient.m index 1d7874a..3184b89 100644 --- a/src/core/JubChatClient.m +++ b/src/core/JubChatClient.m @@ -1,11 +1,14 @@ #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; @@ -28,6 +31,20 @@ _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]; @@ -53,6 +70,7 @@ [_contactManager release]; [_discoEntity release]; [_streamManagement release]; + [_avatarManager release]; [_connection release]; [_presence release]; [_chatMap release]; @@ -133,19 +151,6 @@ - (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]; }