1
2
3
4
5
6
7
8
9
10
11
|
/*
* Copyright (c) 2013, Florian Zeitz <florob@babelmonkeys.de>
*
* https://webkeks.org/git/?p=objxmpp.git
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
>
|
|
1
2
3
4
5
6
7
8
9
10
11
12
|
/*
* Copyright (c) 2013, Florian Zeitz <florob@babelmonkeys.de>
* Copyright (c) 2013, 2016, Jonathan Schleifer <js@heap.zone>
*
* https://heap.zone/git/?p=objxmpp.git
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#import "XMPPContactManager.h"
#import "XMPPJID.h"
#import "XMPPMulticastDelegate.h"
#import "XMPPPresence.h"
#import "XMPPRosterItem.h"
@implementation XMPPContactManager
- initWithConnection: (XMPPConnection*)connection
roster: (XMPPRoster*)roster
{
self = [super init];
@try {
_connection = connection;
|
>
>
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#import "XMPPContactManager.h"
#import "XMPPJID.h"
#import "XMPPMulticastDelegate.h"
#import "XMPPPresence.h"
#import "XMPPRosterItem.h"
@implementation XMPPContactManager
@synthesize contacts = _contacts;
- initWithConnection: (XMPPConnection*)connection
roster: (XMPPRoster*)roster
{
self = [super init];
@try {
_connection = connection;
|
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
}
- (void)removeDelegate: (id <XMPPContactManagerDelegate>)delegate
{
[_delegates removeDelegate: delegate];
}
- (OFDictionary*)contacts
{
OF_GETTER(_contacts, true)
}
- (void)rosterWasReceived: (XMPPRoster*)roster
{
OFEnumerator *contactEnumerator;
XMPPContact *contact;
OFDictionary *rosterItems;
OFEnumerator *rosterItemEnumerator;
OFString *bareJID;
|
<
<
<
<
<
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
}
- (void)removeDelegate: (id <XMPPContactManagerDelegate>)delegate
{
[_delegates removeDelegate: delegate];
}
- (void)rosterWasReceived: (XMPPRoster*)roster
{
OFEnumerator *contactEnumerator;
XMPPContact *contact;
OFDictionary *rosterItems;
OFEnumerator *rosterItemEnumerator;
OFString *bareJID;
|