Private
Public Access
1
0
Files
Kordophone/kordophone/Bridge/Operations/MBIMBridgeOperation.h

32 lines
961 B
C
Raw Normal View History

2018-11-13 12:29:15 -08:00
//
// MBIMBridgeOperation.h
// kordophoned
//
// Created by James Magahern on 11/13/18.
// Copyright © 2018 James Magahern. All rights reserved.
//
#import <Foundation/Foundation.h>
2018-11-16 01:40:02 -08:00
#import <CocoaHTTPServer/HTTPResponse.h>
#import <CocoaHTTPServer/HTTPErrorResponse.h>
#import "MBIMJSONDataResponse.h"
2018-11-13 12:29:15 -08:00
NS_ASSUME_NONNULL_BEGIN
2018-11-16 01:40:02 -08:00
typedef void (^MBIMBridgeOperationCompletionBlock)(NSObject<HTTPResponse> * _Nullable response);
2018-11-13 12:29:15 -08:00
@interface MBIMBridgeOperation : NSOperation
@property (class, nonatomic, readonly) NSString *endpointName;
@property (nonatomic, strong) NSData *requestBodyData;
@property (nonatomic, readonly) NSURL *requestURL;
@property (nonatomic, readonly) MBIMBridgeOperationCompletionBlock serverCompletionBlock;
2018-11-13 12:29:15 -08:00
+ (nullable Class)operationClassForEndpointName:(NSString *)endpointName;
- (instancetype)initWithRequestURL:(NSURL *)requestURL completion:(MBIMBridgeOperationCompletionBlock)completionBlock;
2018-11-13 12:29:15 -08:00
@end
NS_ASSUME_NONNULL_END