Add 'server/' from commit '800090542d91beae40bc81fc41b67ba61c47da77'
git-subtree-dir: server git-subtree-mainline:6a4054c15agit-subtree-split:800090542d
This commit is contained in:
40
server/kordophone/Bridge/Operations/MBIMVersionOperation.m
Normal file
40
server/kordophone/Bridge/Operations/MBIMVersionOperation.m
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// 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]; }
|
||||
|
||||
+ (BOOL)requiresAuthentication
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (NSString *)endpointName
|
||||
{
|
||||
return @"version";
|
||||
}
|
||||
|
||||
- (void)main
|
||||
{
|
||||
NSString *versionString = [NSString stringWithUTF8String:MBIMVersion()];
|
||||
self.serverCompletionBlock([[MBIMDataResponse alloc] initWithData:[versionString dataUsingEncoding:NSUTF8StringEncoding]]);
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user