* new protobufs from libsignal-service-java@a1c93edc40e3ce201fa4e70339a3e6f4e197e319 * Makefile to build ObjC classes from *.proto * refactored some touched code to minimize duplication * removed unused protos * deleted some dead code * renamed method for clarity // FREEBIE
34 lines
1.3 KiB
Objective-C
34 lines
1.3 KiB
Objective-C
// Created by Frederic Jacobs on 12/11/14.
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "OWSSignalServiceProtos.pb.h"
|
|
#import "TSMessage.h"
|
|
|
|
@interface TSErrorMessage : TSMessage
|
|
|
|
typedef NS_ENUM(int32_t, TSErrorMessageType) {
|
|
TSErrorMessageNoSession,
|
|
TSErrorMessageWrongTrustedIdentityKey,
|
|
TSErrorMessageInvalidKeyException,
|
|
TSErrorMessageMissingKeyId, // unused
|
|
TSErrorMessageInvalidMessage,
|
|
TSErrorMessageDuplicateMessage,
|
|
TSErrorMessageInvalidVersion,
|
|
};
|
|
|
|
+ (instancetype)corruptedMessageWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
withTransaction:(YapDatabaseReadWriteTransaction *)transaction;
|
|
|
|
+ (instancetype)invalidVersionWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
withTransaction:(YapDatabaseReadWriteTransaction *)transaction;
|
|
|
|
+ (instancetype)invalidKeyExceptionWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
withTransaction:(YapDatabaseReadWriteTransaction *)transaction;
|
|
|
|
+ (instancetype)missingSessionWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
withTransaction:(YapDatabaseReadWriteTransaction *)transaction;
|
|
|
|
@property (nonatomic, readonly) TSErrorMessageType errorType;
|
|
|
|
@end
|