2014-11-19 21:17:53 +01:00
|
|
|
//
|
|
|
|
// Constants.h
|
|
|
|
// TextSecureKit
|
|
|
|
//
|
|
|
|
// Created by Frederic Jacobs on 28/10/14.
|
|
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@class TSNumberVerifier;
|
|
|
|
|
|
|
|
#ifndef TextSecureKit_Constants_h
|
|
|
|
#define TextSecureKit_Constants_h
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, TSWhisperMessageType) {
|
|
|
|
TSUnknownMessageType =0,
|
|
|
|
TSEncryptedWhisperMessageType = 1,
|
|
|
|
TSIgnoreOnIOSWhisperMessageType=2, // on droid this is the prekey bundle message irrelevant for us
|
|
|
|
TSPreKeyWhisperMessageType = 3,
|
|
|
|
TSUnencryptedWhisperMessageType = 4,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
kSMSVerification,
|
|
|
|
kPhoneNumberVerification
|
|
|
|
} VerificationTransportType;
|
|
|
|
|
|
|
|
#pragma mark Server Address
|
|
|
|
|
|
|
|
#define textSecureHTTPTimeOut 10
|
|
|
|
|
2015-05-23 15:54:50 +02:00
|
|
|
#define textSecureWebSocketAPI @"wss://textsecure-service.whispersystems.org/v1/websocket/"
|
|
|
|
#define textSecureServerURL @"https://textsecure-service.whispersystems.org/"
|
2014-12-03 22:17:57 +01:00
|
|
|
|
2015-05-23 15:54:50 +02:00
|
|
|
//#define textSecureWebSocketAPI @"wss://textsecure-service-staging.whispersystems.org/v1/websocket/"
|
|
|
|
//#define textSecureServerURL @"https://textsecure-service-staging.whispersystems.org/"
|
2014-11-19 21:17:53 +01:00
|
|
|
|
2015-01-28 02:13:13 +01:00
|
|
|
#define textSecureGeneralAPI @"v1"
|
|
|
|
#define textSecureAccountsAPI @"v1/accounts"
|
2015-08-23 00:00:39 +02:00
|
|
|
#define textSecureAttributesAPI @"/attributes/"
|
|
|
|
|
2015-01-28 02:13:13 +01:00
|
|
|
#define textSecureMessagesAPI @"v1/messages/"
|
|
|
|
#define textSecureKeysAPI @"v2/keys"
|
|
|
|
#define textSecureSignedKeysAPI @"v2/keys/signed"
|
|
|
|
#define textSecureDirectoryAPI @"v1/directory"
|
|
|
|
#define textSecureAttachmentsAPI @"v1/attachments"
|
|
|
|
|
2014-11-19 21:17:53 +01:00
|
|
|
|
|
|
|
typedef void(^successCompletionBlock)(void);
|
|
|
|
typedef void(^failedRegistrationRequestBlock)(void);
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark Push RegistrationSpecific Constants
|
|
|
|
typedef NS_ENUM(NSInteger, TSPushRegistrationError){
|
|
|
|
TSPushRegistrationErrorNetwork,
|
|
|
|
TSPushRegistrationErrorAuthentication,
|
|
|
|
TSPushRegistrationErrorRequest
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void(^failedPushRegistrationRequestBlock)(TSPushRegistrationError error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|