-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServerCommunicator.h
43 lines (30 loc) · 1.01 KB
/
ServerCommunicator.h
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
//
// ServerCommunicator.h
// HRM
//
// Created by huang on 2016/11/26.
// Copyright © 2016年 JimSu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define GROUP_NAME @"HRManager"
//#define USER_NAME @"HuangLiangJun"
#define USER_NAME_KEY @"UserName"
#define BULLETIN_TITLE_KEY @"Title"
#define DEVICETOKEN_KEY @"DeviceToken"
#define GROUP_NAME_KEY @"GroupName"
#define DATA_KEY @"data"
#define RELOAD_DATA @"reloadData"
@import Firebase;
@import FirebaseDatabase;
typedef void(^DoneHandler)(NSError *error,id result);
@interface ServerCommunicator : NSObject
@property (nonatomic, strong) NSMutableDictionary *bulletinsDict;
+ (instancetype) shareInstance;
- (void) updateDeviceToken:(DoneHandler)done;
- (void) sendBulletinMessage:(NSString*)title
completion:(DoneHandler) done;
- (void) sendNewBulletinToFBDB:(NSDictionary *)bulletin
completion:(DoneHandler)done;
- (void) downLoadBulletinsFromFBDB;
@end