XMPPGoogleSharedStatus.h
1.59 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
39
40
41
42
43
44
45
46
47
48
49
50
51
#import <Foundation/Foundation.h>
#import "XMPPModule.h"
extern NSString *const XMPPGoogleSharedStatusShow;
extern NSString *const XMPPGoogleSharedStatusInvisible;
extern NSString *const XMPPGoogleSharedStatusStatus;
extern NSString *const XMPPGoogleSharedStatusShowAvailable;
extern NSString *const XMPPGoogleSharedStatusShowBusy;
extern NSString *const XMPPGoogleSharedStatusShowIdle;
@protocol XMPPGoogleSharedStatusDelegate;
#define _XMPP_GOOGLE_SHARED_STATUS_H
@interface XMPPGoogleSharedStatus : XMPPModule
@property (nonatomic, assign) BOOL sharedStatusSupported;
@property (nonatomic, strong) NSDictionary *sharedStatus;
// Determines if the user is idle based on last received HID
// event, and sends the presence as away, if the user is idle.
@property (nonatomic, assign) BOOL assumeIdleUpdateResponsibility;
@property (nonatomic, strong) NSString *status;
@property (nonatomic, strong) NSString *show;
@property (nonatomic, assign) BOOL invisible;
// Convenience auto-updater for presence status.
// Does not use XMPPGoogleSharedStatus.
@property (nonatomic, copy) NSString *statusMessage;
@property (nonatomic, copy) NSString *statusAvailability;
- (void)updateSharedStatus:(NSString *)status
show:(NSString *)show
invisible:(BOOL)invisible;
- (void)refreshSharedStatus;
@end
@protocol XMPPGoogleSharedStatusDelegate
@optional
// This delegate method is called when the server updates the shared
// status module with new status information, or upon manual refresh.
- (void)xmppGoogleSharedStatus:(XMPPGoogleSharedStatus *)sender didReceiveUpdatedStatus:(NSDictionary *)sharedStatus;
@end