UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
ImpChannel.h
1//
2// ImpChannel.h
3// TSCPrinters SDK
4//
5// Created by Realbuber on 2024/4/2.
6//
7
8#ifndef ImpChannel_h
9#define ImpChannel_h
10
11
12#endif /* ImpChannel_h */
13
14#import <Foundation/Foundation.h>
15
23@interface ImpChannel : NSObject {
24 NSMutableArray *dataQueue;
25 NSCondition *condition;
26 BOOL completed;
27 NSUInteger capacity;
28 NSString *channelId;
29}
30
36- (void)send:(id)msg;
37
43- (id)receive;
44
48- (void)complete;
49
53- (void)reset;
54
60- (BOOL)isEmpty;
61
67- (id)front;
68
72- (void)pop;
73
79- (BOOL)waitToRead;
80
87- (BOOL)waitToReadWithTimeout:(NSTimeInterval)timeout;
88
95- (BOOL)tryRead:(id *)msg;
96
102- (void)setCapacity:(NSUInteger)newCapacity;
103
110- (id)getAt:(NSUInteger)index;
111
117- (NSUInteger)size;
118
124- (NSString *)getId;
125
129- (void)setEmpty;
130
131@end
132