Blame view

LiveChat/SDK/include/gotye/GotyeNotify.h 1.06 KB
9f17d59e   陈明泉   no message
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
  //
  //  GotyeNotify.h
  //  GotyeAPI
  //
  //  Created by ouyang on 14/10/30.
  //  Copyright (c) 2014 Ailiao Technologies. All rights reserved.
  //
  
  #ifndef GotyeAPI_GotyeNotify_h
  #define GotyeAPI_GotyeNotify_h
  
  #include "GotyeChatTarget.h"
  
  NS_GOTYEAPI_BEGIN
  
  
  typedef enum {
      GotyeNotifyTypeGroupInvite,
      GotyeNotifyTypeJoinGroupRequest,
      GotyeNotifyTypeJoinGroupReply
  }GotyeNotifyType;
  
  struct GotyeNotify {
      long dbID;  ///< database ID
      long date; ///< seconds since 1970.1.1 00:00
      bool isRead;    ///< read or not.
      GotyeChatTarget sender;
      GotyeChatTarget receiver;
      GotyeChatTarget from; ///< source of notify. GotyeNotifyTypeGroupInvite is from some group, etc.
      bool agree;
      
      bool isSystemNotify;
      GotyeNotifyType type;
      std::string text;   ///< notify content.
      
      GotyeNotify(GotyeNotifyType type):dbID(0), date(0), isRead(false), isSystemNotify(false), type(type), text(""){};
      GotyeNotify():dbID(0), date(0), isRead(false), isSystemNotify(false), type(GotyeNotifyTypeGroupInvite), text(""){};
  };
  
  NS_GOTYEAPI_END
  
  #endif