Add some CFNSURLConnection stuff

This is a stub for a class and a declaration for some private NSURL stuff

I gotta say, Apple really has a jumble of CF and NS stuff
This commit is contained in:
Ariel Abreu 2020-08-27 22:26:18 -04:00
parent f001282547
commit 032a32e5b4
No known key found for this signature in database
GPG Key ID: ECF8C2B9E8AD3E6B
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#ifndef _CFNSURLCONNECTION_H_
#define _CFNSURLCONNECTION_H_
// not sure what's going on here
// `SecCAIssuerRequest.m` imports this file
// let's just include the main header for now
#include <CFNetwork/CFNetwork.h>
#import <Foundation/Foundation.h>
@interface NSURLSessionTaskMetrics : NSObject
@property (readonly, copy) NSDateInterval* taskInterval;
@end
@interface NSURLSessionConfiguration (CFNSPrivateStuff)
@property (readwrite) NSData* _sourceApplicationAuditTokenData;
@property (readwrite) BOOL _requiresPowerPluggedIn;
@end
#endif // _CFNSURLCONNECTION_H_

View File

@ -43,6 +43,7 @@ set(cfnetwork_sources
URL/_CFURLAccess.c
URL/CFURLAuthChallenge.c
URL/CFURLRequest.c
URL/CFNSURLConnection.m
HTTP/CFHTTPServer.c
HTTP/CFHTTPMessage.c
HTTP/CFHTTPStream.c

View File

@ -0,0 +1,14 @@
#import <CFNetwork/CFNSURLConnection.h>
@implementation NSURLSessionTaskMetrics
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector {
return [NSMethodSignature signatureWithObjCTypes: "v@:"];
}
- (void)forwardInvocation:(NSInvocation *)anInvocation {
// would require Foundation
//NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
}
@end