Add storage to the connection and roster.

This commit is contained in:
Jonathan Schleifer 2012-02-06 14:32:20 +01:00
parent f777a11d7f
commit af04bf7088
4 changed files with 49 additions and 1 deletions

View file

@ -47,6 +47,7 @@
connection = connection_;
[connection addDelegate: self];
delegates = [[XMPPMulticastDelegate alloc] init];
dataStorage = [connection dataStorage];
} @catch (id e) {
[self release];
@throw e;
@ -185,6 +186,17 @@
[delegates removeDelegate: delegate];
}
- (void)setDataStorage: (id <XMPPStorage>)dataStorage_
{
/* TODO: Prevent changing it after it has been used */
dataStorage = dataStorage_;
}
- (id <XMPPStorage>)dataStorage
{
return dataStorage;
}
- (void)XMPP_addRosterItem: (XMPPRosterItem*)rosterItem
{
return [self XMPP_updateRosterItem: rosterItem];