aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMMessage.h
blob: 97c748f72efe3878b769ad3c38f0ca812784cf25 (plain)
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
//
//  OLMMessage.h
//  olm
//
//  Created by Chris Ballinger on 4/8/16.
//
//

#import <Foundation/Foundation.h>

/*
 from olm.hh
 static const size_t OLM_MESSAGE_TYPE_PRE_KEY = 0;
 static const size_t OLM_MESSAGE_TYPE_MESSAGE = 1;
 */
typedef NS_ENUM(NSInteger, OLMMessageType) {
    OLMMessageTypePreKey = 0,
    OLMMessageTypeMessage = 1
};

@interface OLMMessage : NSObject

@property (nonatomic, copy, readonly, nonnull) NSString *ciphertext;
@property (readonly) OLMMessageType type;

- (nullable instancetype) initWithCiphertext:(nonnull NSString*)ciphertext type:(OLMMessageType)type;

@end