-
Notifications
You must be signed in to change notification settings - Fork 1
/
XMPPParser.h
executable file
·47 lines (31 loc) · 1.05 KB
/
XMPPParser.h
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
#import <Foundation/Foundation.h>
#import <libxml2/libxml/parser.h>
#if TARGET_OS_IPHONE
#import "DDXML.h"
#endif
@interface XMPPParser : NSObject
{
id delegate;
BOOL hasReportedRoot;
unsigned depth;
xmlParserCtxt *parserCtxt;
}
- (id)initWithDelegate:(id)delegate;
- (id)delegate;
- (void)setDelegate:(id)delegate;
/**
* Synchronously parses the given data.
* This means the delegate methods will get called before this method returns.
**/
- (void)parseData:(NSData *)data;
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@protocol XMPPParserDelegate
@optional
- (void)xmppParser:(XMPPParser *)sender didReadRoot:(NSXMLElement *)root;
- (void)xmppParser:(XMPPParser *)sender didReadElement:(NSXMLElement *)element;
- (void)xmppParserDidEnd:(XMPPParser *)sender;
- (void)xmppParser:(XMPPParser *)sender didFail:(NSError *)error;
@end