XMPPPresence.h
1.07 KB
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
#import <Foundation/Foundation.h>
#import "XMPPElement.h"
/**
* The XMPPPresence class represents a <presence> element.
* It extends XMPPElement, which in turn extends NSXMLElement.
* All <presence> elements that go in and out of the
* xmpp stream will automatically be converted to XMPPPresence objects.
*
* This class exists to provide developers an easy way to add functionality to presence processing.
* Simply add your own category to XMPPPresence to extend it with your own custom methods.
**/
@interface XMPPPresence : XMPPElement
// Converts an NSXMLElement to an XMPPPresence element in place (no memory allocations or copying)
+ (XMPPPresence *)presenceFromElement:(NSXMLElement *)element;
+ (XMPPPresence *)presence;
+ (XMPPPresence *)presenceWithType:(NSString *)type;
+ (XMPPPresence *)presenceWithType:(NSString *)type to:(XMPPJID *)to;
- (id)init;
- (id)initWithType:(NSString *)type;
- (id)initWithType:(NSString *)type to:(XMPPJID *)to;
- (NSString *)type;
- (NSString *)show;
- (NSString *)status;
- (int)priority;
- (int)intShow;
- (BOOL)isErrorPresence;
@end