//
//  SessionController.h
//  btprint
//
//  Created by woosimsystems on 2021/05/13.
//  Copyright © 2021 Woosim Systems. All rights reserved.
//

@import Foundation;
@import ExternalAccessory;

@interface SessionController : NSObject <EAAccessoryDelegate, NSStreamDelegate>

@property (nonatomic, readonly) EAAccessory *accessory;

+ (SessionController *)sharedController;
- (BOOL)openSessionForAccessory:(EAAccessory *)accessory withProtocolString:(NSString *)protocolString;
- (void)closeSession;
- (void)writeData:(NSData *)data;
- (NSData *)readData:(NSUInteger)bytesToRead;
- (NSUInteger)readBytesAvailable;

@end
