#if ENABLE(WEB_AUTHN) && HAVE(NEAR_FIELD)
#if USE(APPLE_INTERNAL_SDK)
#import <NearField/NearField.h>
#else
typedef NS_OPTIONS(NSUInteger, NFFeature) {
NFFeatureReaderMode = 1 << 0,
};
typedef NS_ENUM(uint32_t, NFTagType) {
NFTagTypeUnknown = 0,
NFTagTypeGeneric4A = 3,
};
typedef NS_OPTIONS(uint32_t, NFTechnology) {
NFTechnologyNone = 0,
};
typedef NS_ENUM(uint32_t, NFNdefAvailability) {
NFNdefAvailabilityUnknown = 0,
};
@protocol NFTagA
@end
@protocol NFTagB
@end
@protocol NFTagF
@end
@protocol NFTag <NSObject>
@property (nonatomic, readonly) NFTagType type;
@property (nonatomic, readonly) NFTechnology technology;
@property (nonatomic, readonly, copy) NSData *tagID;
@property (nonatomic, readonly, copy) NSData *UID;
@property (nonatomic, readonly, assign) NFNdefAvailability ndefAvailability;
@property (nonatomic, readonly, assign) size_t ndefMessageSize;
@property (nonatomic, readonly, assign) size_t ndefContainerSize;
@property (nonatomic, readonly, copy) NSData *AppData NS_DEPRECATED(10_12, 10_15, 10_0, 13_0);
@property (nonatomic, readonly) id<NFTagA> tagA;
@property (nonatomic, readonly) id<NFTagB> tagB;
@property (nonatomic, readonly) id<NFTagF> tagF;
- (instancetype)initWithNFTag:(id<NFTag>)tag;
- (NSString *)description;
- (BOOL)isEqualToNFTag:(id<NFTag>)tag;
@end
@interface NFTag : NSObject <NSSecureCoding, NFTag, NFTagA, NFTagB, NFTagF>
@end
@protocol NFSession <NSObject>
- (void)endSession;
@end
@interface NFSession : NSObject <NFSession>
@end
@protocol NFReaderSessionDelegate;
@interface NFReaderSession : NFSession
@property (assign) id<NFReaderSessionDelegate> delegate;
- (BOOL)startPollingWithError:(NSError **)outError;
- (BOOL)stopPolling;
- (BOOL)connectTag:(NFTag*)tag;
- (BOOL)disconnectTag;
- (NSData*)transceive:(NSData*)capdu;
@end
@protocol NFReaderSessionDelegate <NSObject>
@optional
- (void)readerSession:(NFReaderSession*)theSession didDetectTags:(NSArray<NFTag *> *)tags;
@end
@interface NFHardwareManager : NSObject
+ (instancetype)sharedHardwareManager;
- (NSObject<NFSession> *)startReaderSession:(void(^)(NFReaderSession *session, NSError *error))theStartCallback;
- (BOOL)areFeaturesSupported:(NFFeature)featureMask outError:(NSError**)outError;
@end
#endif // USE(APPLE_INTERNAL_SDK)
#endif // ENABLE(WEB_AUTHN) && HAVE(NEAR_FIELD)