-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathXMPPQueryRosterHandler.m
48 lines (42 loc) · 1.3 KB
/
XMPPQueryRosterHandler.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// XMPPQueryRosterHandler.m
// Jabber
//
// Created by David Chisnall on 12/11/2006.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import "XMPPQueryRosterHandler.h"
#import "XMPPIdentity.h"
#import <EtoileFoundation/EtoileFoundation.h>
@implementation XMPPQueryRosterHandler
- (id) initWithXMLParser: (ETXMLParser*)aParser
key: (id) aKey
{
self = [super initWithXMLParser: aParser
key: aKey];
if (nil == self)
{
return nil;
}
identities = [NSMutableArray new];
value = identities;
return self;
}
- (void)startElement:(NSString *)aName
attributes:(NSDictionary*)attributes
{
if ([aName isEqualToString:@"item"])
{
[[[XMPPIdentity alloc] initWithXMLParser:parser key:@"identity"] startElement:aName
attributes:attributes];
}
else if ([aName isEqualToString:@"query"])
{
depth++;
}
}
- (void) addidentity:(id)anIdentity
{
[identities addObject:anIdentity];
}
@end