Statistics
| Branch: | Tag: | Revision:

chatsecureios / ChatSecure / Classes / Controllers / XMPP / OTRXMPPRoomManager.h @ a4bb25f6

History | View | Annotate | Download (2.09 KB)

1
//
2
//  OTRXMPPRoomManager.h
3
//  ChatSecure
4
//
5
//  Created by David Chiles on 10/9/15.
6
//  Copyright © 2015 Chris Ballinger. All rights reserved.
7
//
8

    
9
@import Foundation;
10
@import XMPPFramework;
11
@import YapDatabase;
12

    
13
@class OTRXMPPRoomMessage;
14
@class OTRXMPPRoomOccupant;
15

    
16
NS_ASSUME_NONNULL_BEGIN
17
@interface OTRXMPPRoomManager : XMPPModule
18

    
19
@property (nonatomic, strong, readonly) XMPPCapabilities *capabilities;
20
@property (nonatomic, strong, readonly) XMPPBookmarksModule *bookmarksModule;
21
@property (nonatomic, strong, readonly, nullable)  NSArray<NSString*> *conferenceServicesJID;
22
@property (nonatomic, strong, readonly) YapDatabaseConnection * databaseConnection;
23

    
24
- (instancetype) init NS_UNAVAILABLE;
25
- (instancetype) initWithDatabaseConnection:(YapDatabaseConnection*)databaseConnection
26
                               capabilities:(XMPPCapabilities*)capabilities
27
                              dispatchQueue:(nullable dispatch_queue_t)dispatchQueue;
28

    
29
/** All room joining should go through this method. This ensures the delegates are setup properly and database is in sync. Returns OTRThreadOwner.threadIdentifier */
30
- (nullable NSString *)joinRoom:(XMPPJID *)jid
31
                   withNickname:(nullable NSString *)name
32
                        subject:(nullable NSString *)subject
33
                       password:(nullable NSString*)password;
34

    
35
- (void)leaveRoom:(XMPPJID *)jid;
36
- (nullable XMPPRoom*) roomForJID:(XMPPJID*)jid;
37

    
38
/** Returns OTRThreadOwner.threadIdentifier. buddiesArray is array of OTRBuddy.uniqueId */
39
- (nullable NSString *)startGroupChatWithBuddies:(nullable NSArray <NSString *>*)buddiesArray
40
                                         roomJID:(XMPPJID *)roomName
41
                                        nickname:(nullable NSString *)name
42
                                         subject:(nullable NSString *)subject;
43

    
44
- (void)inviteBuddies:(nullable NSArray<NSString *>*)buddyUniqueIds
45
               toRoom:(XMPPRoom*)room;
46

    
47
@end
48

    
49
@interface XMPPRoom(RoomManager)
50
/** Creates and sends XMPPMessage stanza from roomMessage */
51
- (void) sendRoomMessage:( OTRXMPPRoomMessage *)roomMessage;
52
@end
53
NS_ASSUME_NONNULL_END