TSKNSURLConnectionDelegateProxy.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. TSKNSURLConnectionDelegateProxy.h
  3. TrustKit
  4. Copyright 2015 The TrustKit Project Authors
  5. Licensed under the MIT license, see associated LICENSE file for terms.
  6. See AUTHORS file for the list of project authors.
  7. */
  8. #if __has_feature(modules)
  9. @import Foundation;
  10. #else
  11. #import <Foundation/Foundation.h>
  12. #endif
  13. NS_ASSUME_NONNULL_BEGIN
  14. @class TrustKit;
  15. @interface TSKNSURLConnectionDelegateProxy : NSObject<NSURLConnectionDelegate>
  16. // Initalize our hooks
  17. + (void)swizzleNSURLConnectionConstructors:(TrustKit *)trustKit;
  18. - (instancetype)init NS_UNAVAILABLE;
  19. - (instancetype _Nullable)initWithTrustKit:(TrustKit *)trustKit connectionDelegate:(id<NSURLConnectionDelegate> _Nullable)delegate NS_DESIGNATED_INITIALIZER;
  20. - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
  21. // Forward messages to the original delegate if the proxy doesn't implement the method
  22. - (id)forwardingTargetForSelector:(SEL)sel;
  23. @end
  24. NS_ASSUME_NONNULL_END