olm/xcode/OLMKit/OLMMessage.h

29 lines
600 B
C
Raw Normal View History

2016-04-09 02:24:41 +02:00
//
// OLMMessage.h
// olm
//
// Created by Chris Ballinger on 4/8/16.
//
//
#import <Foundation/Foundation.h>
2016-04-09 23:00:30 +02:00
/*
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
2016-04-09 02:24:41 +02:00
};
@interface OLMMessage : NSObject
2016-04-09 23:00:30 +02:00
@property (nonatomic, copy, readonly, nonnull) NSString *ciphertext;
2016-04-09 02:24:41 +02:00
@property (readonly) OLMMessageType type;
2016-04-09 23:00:30 +02:00
- (nullable instancetype) initWithCiphertext:(nonnull NSString*)ciphertext type:(OLMMessageType)type;
2016-04-09 02:24:41 +02:00
@end