SecEscrowPendingRecord.h   [plain text]


// This file was automatically generated by protocompiler
// DO NOT EDIT!
// Compiled from SecEscrowPendingRecord.proto

#import <Foundation/Foundation.h>
#import <ProtocolBuffer/PBCodable.h>

#ifdef __cplusplus
#define SECESCROWPENDINGRECORD_FUNCTION extern "C" __attribute__((visibility("hidden")))
#else
#define SECESCROWPENDINGRECORD_FUNCTION extern __attribute__((visibility("hidden")))
#endif

__attribute__((visibility("hidden")))
@interface SecEscrowPendingRecord : PBCodable <NSCopying>
{
    uint64_t _lastCloudServicesTriggerTime;
    uint64_t _lastEscrowAttemptTime;
    uint64_t _triggerRequestTime;
    uint64_t _uploadRetries;
    NSString *_altDSID;
    NSData *_serializedPrerecord;
    NSString *_uuid;
    BOOL _certCached;
    BOOL _uploadCompleted;
    struct {
        int lastCloudServicesTriggerTime:1;
        int lastEscrowAttemptTime:1;
        int triggerRequestTime:1;
        int uploadRetries:1;
        int certCached:1;
        int uploadCompleted:1;
    } _has;
}


@property (nonatomic, readonly) BOOL hasUuid;
@property (nonatomic, retain) NSString *uuid;

@property (nonatomic) BOOL hasCertCached;
/** True if CloudServices has informed us that it's successfully cached a certificate for this request */
@property (nonatomic) BOOL certCached;

@property (nonatomic, readonly) BOOL hasSerializedPrerecord;
/**
 * CloudServices is responsible for serialization and understanding what it has stored here.
 * This is a shame, but allows knowledge of what's in a escrow record to live in CloudServices, not securityd.
 */
@property (nonatomic, retain) NSData *serializedPrerecord;

@property (nonatomic) BOOL hasLastCloudServicesTriggerTime;
/** Holds the time, in milliseconds since 1970, that the last SBD trigger was attempted */
@property (nonatomic) uint64_t lastCloudServicesTriggerTime;

@property (nonatomic) BOOL hasLastEscrowAttemptTime;
/** Holds the time, in milliseconds since 1970, that the last escrow upload was attempted */
@property (nonatomic) uint64_t lastEscrowAttemptTime;

@property (nonatomic) BOOL hasUploadCompleted;
/** If set to true, then this pending record is complete, and can be garbage collected */
@property (nonatomic) BOOL uploadCompleted;

@property (nonatomic) BOOL hasUploadRetries;
/** Number of upload retries */
@property (nonatomic) uint64_t uploadRetries;

@property (nonatomic, readonly) BOOL hasAltDSID;
/** altDSID for requesting user (will be used for cleanup) */
@property (nonatomic, retain) NSString *altDSID;

@property (nonatomic) BOOL hasTriggerRequestTime;
/** Request was generated at the time, ms since 1970 */
@property (nonatomic) uint64_t triggerRequestTime;

// Performs a shallow copy into other
- (void)copyTo:(SecEscrowPendingRecord *)other;

// Performs a deep merge from other into self
// If set in other, singular values in self are replaced in self
// Singular composite values are recursively merged
// Repeated values from other are appended to repeated values in self
- (void)mergeFrom:(SecEscrowPendingRecord *)other;

SECESCROWPENDINGRECORD_FUNCTION BOOL SecEscrowPendingRecordReadFrom(__unsafe_unretained SecEscrowPendingRecord *self, __unsafe_unretained PBDataReader *reader);

@end