-
Notifications
You must be signed in to change notification settings - Fork 2
/
StreamLineReader.h
46 lines (34 loc) · 963 Bytes
/
StreamLineReader.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
39
40
41
42
43
44
45
46
/* -*-objc-*-
*
* Dictionary Reader - A Dict client for GNUstep
* Copyright (C) 2006 Guenther Noack
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING.
*/
#ifndef _STREAMLINEREADER_H_
#define _STREAMLINEREADER_H_
#import <Foundation/Foundation.h>
@interface StreamLineReader : NSObject
{
// Instance variables
NSInputStream* inputStream;
uint8_t* delim;
unsigned delimSize;
uint8_t* strBuf;
unsigned strBufPos;
unsigned strBufSize;
}
// Class methods
// Instance methods
- (id) initWithInputStream: (NSInputStream *) anInputStream;
- (id) initWithInputStream: (NSInputStream *) anInputStream
andDelimiter: (NSString *) aDelimiter;
- (NSString *) readLineAndRetry;
- (NSString *) readLine;
- (BOOL) getMoreCharacters;
- (NSString *) extractNextLine;
- (int) delimPosInBuffer;
- (BOOL) canExtractNextLine;
@end
#endif // _STREAMLINEREADER_H_