~ubuntu-branches/ubuntu/dapper/pantomime/dapper

« back to all changes in this revision

Viewing changes to Headers/Pantomime/Connection.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-11-20 00:25:28 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041120002528-igjuwyao6gubpig1
Tags: 1.1.2-3
Build depend / depend on libgnustep-base-1.10-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
**  Connection.h
 
3
**
 
4
**  Copyright (c) 2001, 2002, 2003
 
5
**
 
6
**  Author: Ludovic Marcotte <ludovic@Sophos.ca>
 
7
**
 
8
**  This library is free software; you can redistribute it and/or
 
9
**  modify it under the terms of the GNU Lesser General Public
 
10
**  License as published by the Free Software Foundation; either
 
11
**  version 2.1 of the License, or (at your option) any later version.
 
12
**  
 
13
**  This library is distributed in the hope that it will be useful,
 
14
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
16
**  Lesser General Public License for more details.
 
17
**  
 
18
**  You should have received a copy of the GNU Lesser General Public
 
19
**  License along with this library; if not, write to the Free Software
 
20
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
21
*/
 
22
 
 
23
#ifndef _Pantomime_H_Connection
 
24
#define _Pantomime_H_Connection
 
25
 
 
26
#import <Foundation/NSData.h>
 
27
#import <Foundation/NSString.h>
 
28
 
 
29
@protocol Connection 
 
30
 
 
31
- (void) dealloc;
 
32
 
 
33
- (id) initWithName: (NSString *) theName
 
34
               port: (int) thePort;
 
35
 
 
36
- (id) initWithName: (NSString *) theName
 
37
               port: (int) thePort
 
38
  connectionTimeout: (int) theConnectionTimeout
 
39
        readTimeout: (int) theReadTimeout
 
40
       writeTimeout: (int) theWriteTimeout;
 
41
 
 
42
 
 
43
//
 
44
// access / mutation methods
 
45
//
 
46
 
 
47
- (NSString *) name;
 
48
- (void) setName: (NSString *) theName;
 
49
 
 
50
- (int) port;
 
51
- (void) setPort: (int) thePort;
 
52
 
 
53
- (int) connectionTimeout;
 
54
- (void) setConnectionTimeout: (int) theConnectionTimeout;
 
55
 
 
56
- (int) readTimeout;
 
57
- (void) setReadTimeout: (int) theReadTimeout;
 
58
 
 
59
- (int) writeTimeout;
 
60
- (void) setWriteTimeout: (int) theWriteTimeout;
 
61
 
 
62
- (int) fd;
 
63
 
 
64
- (void) setStopTarget: (id) theTarget;
 
65
- (void) setStopSelector: (SEL) theSelector;
 
66
 
 
67
//
 
68
// other methods
 
69
//
 
70
- (void) close;
 
71
 
 
72
- (NSData *) readDataOfLength: (int) theLength;
 
73
- (NSData *) readDataToEndOfLine;
 
74
 
 
75
- (NSString *) readStringOfLength: (int) theLength;
 
76
- (NSString *) readStringToEndOfLine;
 
77
- (NSString *) readStringToEndOfLineSkippingCR: (BOOL) aBOOL;
 
78
 
 
79
- (BOOL) writeLine: (NSString *) theLine;
 
80
 
 
81
- (BOOL) writeData: (NSData *) theData;
 
82
- (BOOL) writeString: (NSString *) theString;
 
83
 
 
84
@end
 
85
 
 
86
#endif // _Pantomime_H_Connection