|
| 1 | +// |
| 2 | +// JMessageHelper.h |
| 3 | +// RCTJMessageModule |
| 4 | +// |
| 5 | +// Created by oshumini on 2017/8/16. |
| 6 | +// Copyright © 2017年 HXHG. All rights reserved. |
| 7 | +// |
| 8 | + |
| 9 | +#import <Foundation/Foundation.h> |
| 10 | +#import <JMessage/JMessage.h> |
| 11 | + |
| 12 | +#define kJJMessageReceiveMessage @"kJJMessageReceiveMessage" |
| 13 | +#define kJJMessageSendMessageRespone @"kJJMessageSendMessageRespone" |
| 14 | + |
| 15 | +//Conversation 回调 |
| 16 | +#define kJJMessageConversationChanged @"kJJMessageConversationChanged" |
| 17 | +#define kJJMessageUnreadChanged @"kJJMessageUnreadChanged" |
| 18 | + |
| 19 | +//离线消息 |
| 20 | +#define kJJMessageSyncOfflineMessage @"kJJMessageSyncOfflineMessage" |
| 21 | + |
| 22 | +// 漫游消息同步 |
| 23 | + |
| 24 | +#define kJJMessageSyncRoamingMessage @"kJJMessageSyncRoamingMessage" |
| 25 | + |
| 26 | +//Group 回调 |
| 27 | +#define kJJMessageGroupInfoChanged @"kJJMessageGroupInfoChanged" |
| 28 | + |
| 29 | +//User 回调 |
| 30 | +#define kJJMessageLoginUserKicked @"kJJMessageLoginUserKicked" |
| 31 | +#define kJJMessageLoginStateChanged @"kJJMessageLoginStateChanged" |
| 32 | +#define kJJMessageContactNotify @"kJJMessageContactNotify" |
| 33 | +#define kJJMessageRetractMessage @"kJJMessageretractMessage" |
| 34 | + |
| 35 | +@interface JMessageHelper : NSObject<JMessageDelegate> |
| 36 | +@property(nonatomic, strong)NSString *JMessageAppKey; |
| 37 | +@property(strong,nonatomic)NSDictionary *launchOptions; |
| 38 | ++ (JMessageHelper *)shareInstance; |
| 39 | + |
| 40 | +-(void)initJMessage:(NSDictionary*)launchOptions; |
| 41 | + |
| 42 | +@end |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +@interface NSDictionary (JMessage) |
| 47 | +-(NSString*)toJsonString; |
| 48 | +@end |
| 49 | + |
| 50 | +@interface NSString (JMessage) |
| 51 | +-(NSDictionary*)toDictionary; |
| 52 | +@end |
| 53 | + |
| 54 | +@interface JMSGConversation (JMessage) |
| 55 | +-(NSMutableDictionary*)conversationToDictionary; |
| 56 | +@end |
| 57 | + |
| 58 | +@interface JMSGUser (JMessage) |
| 59 | +-(NSMutableDictionary*)userToDictionary; |
| 60 | +@end |
| 61 | + |
| 62 | +@interface JMSGGroup (JMessage) |
| 63 | +-(NSMutableDictionary*)groupToDictionary; |
| 64 | +@end |
| 65 | + |
| 66 | +@interface JMSGMessage (JMessage) |
| 67 | +- (NSMutableDictionary *)messageToDictionary; |
| 68 | +@end |
| 69 | + |
| 70 | +@interface NSError (JMessage) |
| 71 | +- (NSDictionary *)errorToDictionary; |
| 72 | +@end |
0 commit comments