-
Notifications
You must be signed in to change notification settings - Fork 2
/
XMPPInfoQueryStanzaFactory.m
58 lines (52 loc) · 1.59 KB
/
XMPPInfoQueryStanzaFactory.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
49
50
51
52
53
54
55
56
57
//
// XMPPInfoQueryStanzaFactory.m
// Jabber
//
// Created by David Chisnall on 25/05/2006.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import "XMPPInfoQueryStanzaFactory.h"
#import "XMPPInfoQueryStanza.h"
static XMPPInfoQueryStanzaFactory * sharedInstance;
@implementation XMPPInfoQueryStanzaFactory
+ (void) initialize
{
sharedInstance = [[XMPPInfoQueryStanzaFactory alloc] init];
//Insert default handlers here:
//Roster updates:
[sharedInstance addHandler:NSClassFromString(@"XMPPQueryRosterHandler")
forTag:@"query"
inNamespace:@"jabber:iq:roster"];
[sharedInstance addValue:@"RosterItems"
forTag:@"query"
inNamespace:@"jabber:iq:roster"];
//vCards:
[sharedInstance addHandler:NSClassFromString(@"XMPPvCard")
forTag:@"vCard"
inNamespace:@"vcard-temp"];
[sharedInstance addValue:@"vCard"
forTag:@"vCard"
inNamespace:@"vcard-temp"];
//Service Discovery:
[sharedInstance addHandler:NSClassFromString(@"XMPPDiscoItems")
forTag:@"query"
inNamespace:@"http://jabber.org/protocol/disco#items"];
[sharedInstance addValue:@"XMPPDiscoItems"
forTag:@"query"
inNamespace:@"http://jabber.org/protocol/disco#items"];
[sharedInstance addHandler:NSClassFromString(@"XMPPDiscoInfo")
forTag:@"query"
inNamespace:@"http://jabber.org/protocol/disco#info"];
[sharedInstance addValue:@"XMPPDiscoInfo"
forTag:@"query"
inNamespace:@"http://jabber.org/protocol/disco#info"];
}
+ (id) sharedStazaFactory
{
return sharedInstance;
}
- (id) parser
{
return [[XMPPInfoQueryStanza alloc] init];
}
@end