pEpObjCAdapter/PEPPassphraseCache.m
author Dirk Zimmermann <dz@pep.security>
Thu, 25 Jun 2020 17:08:21 +0200
branchIOSAD-172
changeset 1456 752e8d0380a1
parent 1454 45299c4176f1
child 1457 98e4f0837759
permissions -rw-r--r--
IOSAD-172 Have an internal queue
dz@1449
     1
//
dz@1449
     2
//  PEPPassphraseCache.m
dz@1449
     3
//  pEpObjCAdapter
dz@1449
     4
//
dz@1449
     5
//  Created by Dirk Zimmermann on 25.06.20.
dz@1449
     6
//  Copyright © 2020 p≡p. All rights reserved.
dz@1449
     7
//
dz@1449
     8
dz@1449
     9
#import "PEPPassphraseCache.h"
dz@1449
    10
dz@1454
    11
@interface PEPPassphraseCache ()
dz@1454
    12
dz@1456
    13
@property (nonatomic) dispatch_queue_t queue;
dz@1456
    14
dz@1454
    15
@end
dz@1454
    16
dz@1449
    17
@implementation PEPPassphraseCache
dz@1449
    18
dz@1449
    19
/// Internal constructor (for now).
dz@1449
    20
- (instancetype)initTimeout:(NSUInteger)timeout
dz@1449
    21
{
dz@1449
    22
    self = [super init];
dz@1449
    23
    if (self) {
dz@1449
    24
        _timeout = timeout;
dz@1456
    25
        _queue = dispatch_queue_create("PEPPassphraseCache Queue", DISPATCH_QUEUE_SERIAL);
dz@1449
    26
    }
dz@1449
    27
    return self;
dz@1449
    28
}
dz@1449
    29
dz@1449
    30
/// Public constructor with default values.
dz@1449
    31
- (instancetype)init
dz@1449
    32
{
dz@1449
    33
    return [self initTimeout:10 * 60];
dz@1449
    34
}
dz@1449
    35
dz@1449
    36
- (void)addPassphrase:(NSString *)passphrase
dz@1449
    37
{
dz@1449
    38
}
dz@1449
    39
dz@1449
    40
- (NSArray *)passphrases
dz@1449
    41
{
dz@1449
    42
    return @[];
dz@1449
    43
}
dz@1449
    44
dz@1449
    45
@end