forked from alexwinston/ExternalAccessory
/
EAOutputStream.h
38 lines (32 loc) · 943 Bytes
/
EAOutputStream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// EAOutputStream.h
// ExternalAccessory
//
// Created by Alex Winston on 8/16/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
@class EAAccessory;
@class EASession;
@interface EAOutputStream : NSOutputStream
{
id _delegate;
BOOL _delegateRespondsToStreamHandleEvent;
int _outfd;
EAAccessory *_accessory;
EASession *_session;
BOOL _isOpenCompletedEventSent;
BOOL _hasSpaceAvailableEventSent;
BOOL _hasSpaceAvailable;
BOOL _isAtEndEventSent;
unsigned int _streamStatus;
struct __CFRunLoop *_runLoop;
struct __CFRunLoopSource *_runLoopSource;
NSThread *_writeAvailableThread;
BOOL _isWriteAvailableThreadCancelled;
NSCondition *_writeAvailableThreadRunCondition;
}
- (id)initWithAccessory:(id)accessory forSession:(id)session;
- (void)setDelegate:(id)delegate;
- (BOOL)hasSpaceAvailable;
- (int)write:(const char *)chars maxLength:(unsigned int)length;
@end