Skip to content

Commit 4e9d695

Browse files
committed
Merge pull request robbiehanson#583 from ChatSecure/XEP0352
Added Creation of elements for XEP-0352.
2 parents db543e1 + 8f2c946 commit 4e9d695

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
#import "NSXMLElement+XMPP.h"
3+
4+
@interface NSXMLElement (XEP0352)
5+
6+
+ (instancetype)indicateInactiveElement;
7+
+ (instancetype)indicateActiveElement;
8+
9+
@end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
#import "NSXMLElement+XEP_0352.h"
3+
4+
#define XMLNS_XMPP_CLIENT_STATE_INDICATION @"urn:xmpp:csi:0"
5+
6+
@implementation NSXMLElement (XEP0352)
7+
8+
+ (instancetype)indicateActiveElement
9+
{
10+
return [NSXMLElement elementWithName:@"active" xmlns:XMLNS_XMPP_CLIENT_STATE_INDICATION];
11+
}
12+
13+
+ (instancetype)indicateInactiveElement
14+
{
15+
return [NSXMLElement elementWithName:@"inactive" xmlns:XMLNS_XMPP_CLIENT_STATE_INDICATION];
16+
}
17+
18+
@end

0 commit comments

Comments
 (0)