-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDictConnection.h
42 lines (35 loc) · 981 Bytes
/
DictConnection.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
/* -*-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 _DICTCONNECTION_H_
#define _DICTCONNECTION_H_
#import "StreamLineReader.h"
#import "StreamLineWriter.h"
#import "NSString+Convenience.h"
#import "DictionaryHandle.h"
/**
* Instances of this class enable a connection to a dict protocol server.
* You can look up words using the @see(definitionFor:) method.
*/
@interface DictConnection : DictionaryHandle
{
NSInputStream* inputStream;
NSOutputStream* outputStream;
StreamLineReader* reader;
StreamLineWriter* writer;
NSHost* host;
int port;
}
// Instance methods
- (id) initWithHost: (NSHost *) aHost port: (int) aPort;
- (id) initWithHost: (NSHost *) aHost;
- (id) initWithDefaultHost; // dict.org
- (NSHost *) host;
- (int) port;
@end
#endif // _DICTCONNECTION_H_