Browse Source

adding source files

async_key_management
Volker Birk 7 years ago
parent
commit
2d56893e76
4 changed files with 47 additions and 2 deletions
  1. BIN
      pEpiOSAdapter.xcodeproj/project.xcworkspace/xcuserdata/vb.xcuserdatad/UserInterfaceState.xcuserstate
  2. +16
    -0
      pEpiOSAdapter/PEPQueue.h
  3. +29
    -0
      pEpiOSAdapter/PEPQueue.m
  4. +2
    -2
      pEpiOSAdapter/PEPiOSAdapter.m

BIN
pEpiOSAdapter.xcodeproj/project.xcworkspace/xcuserdata/vb.xcuserdatad/UserInterfaceState.xcuserstate View File


+ 16
- 0
pEpiOSAdapter/PEPQueue.h View File

@ -0,0 +1,16 @@
//
// PEPQueue.h
// pEpiOSAdapter
//
// Created by Volker Birk on 15.07.15.
// Copyright (c) 2015 pp. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PEPQueue : NSMutableArray
- (void)queue:(id)object;
- (id)dequeue;
@end

+ 29
- 0
pEpiOSAdapter/PEPQueue.m View File

@ -0,0 +1,29 @@
//
// PEPQueue.m
// pEpiOSAdapter
//
// Created by Volker Birk on 15.07.15.
// Copyright (c) 2015 pp. All rights reserved.
//
#import "PEPQueue.h"
@implementation PEPQueue
- (void)queue:(id)object
{
@synchronized(self) {
[self insertObject:object atIndex:0];
}
}
- (id)dequeue
{
@synchronized(self) {
id object = [[self lastObject] copy];
[self removeLastObject];
return object;
}
}
@end

+ 2
- 2
pEpiOSAdapter/PEPiOSAdapter.m View File

@ -26,7 +26,7 @@ static pEp_identity *retrieve_next_identity(void *management)
@implementation PEPiOSAdapter
static NSMutableArray *queue = nil;
static PEPQueue *queue = nil;
static NSThread *keyserver_thread = nil;
+ (void)keyserverThread:(id)object
@ -49,7 +49,7 @@ static NSThread *keyserver_thread = nil;
+ (void)stopKeyserverLookup
{
if (queue) {
queue = nil;
[queue queue: ]
}
}


Loading…
Cancel
Save