Private
Public Access
1
0

Adds "version" operation

This commit is contained in:
James Magahern
2022-08-03 17:27:15 -07:00
parent cad3425327
commit 3ca9abcccd
3 changed files with 81 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
//
// MBIMVersionOperation.h
// kordophoned
//
// Created by James Magahern on 8/3/22.
// Copyright © 2022 James Magahern. All rights reserved.
//
#import "MBIMBridgeOperation.h"
NS_ASSUME_NONNULL_BEGIN
@interface MBIMVersionOperation : MBIMBridgeOperation
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,35 @@
//
// MBIMVersionOperation.m
// kordophoned
//
// Created by James Magahern on 8/3/22.
// Copyright © 2022 James Magahern. All rights reserved.
//
#import "MBIMVersionOperation.h"
#import "MBIMErrorResponse.h"
#ifdef __clang_analyzer__
const char* MBIMVersion() {
return "UNKNOWN";
}
#else
#import "MBIMVersion.c"
#endif
@implementation MBIMVersionOperation
+ (void)load { [super load]; }
+ (NSString *)endpointName
{
return @"version";
}
- (void)main
{
NSString *versionString = [NSString stringWithUTF8String:MBIMVersion()];
self.serverCompletionBlock([[MBIMDataResponse alloc] initWithData:[versionString dataUsingEncoding:NSUTF8StringEncoding]]);
}
@end