1994-11-04 16:29:24 +00:00
|
|
|
/* Interface for coder object for distributed objects
|
1996-01-27 00:55:38 +00:00
|
|
|
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
|
|
|
Date: July 1994
|
|
|
|
|
|
|
|
This file is part of the GNU Objective C Class Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ConnectedCoder_h
|
|
|
|
#define __ConnectedCoder_h
|
|
|
|
|
|
|
|
#include <objects/stdobjects.h>
|
1996-01-27 00:55:38 +00:00
|
|
|
#include <objects/Coder.h>
|
1996-03-12 19:45:11 +00:00
|
|
|
#include <objects/Port.h>
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
/* ConnectedCoder identifiers */
|
1996-03-01 15:54:57 +00:00
|
|
|
enum {
|
|
|
|
METHOD_REQUEST = 0,
|
|
|
|
METHOD_REPLY,
|
|
|
|
ROOTPROXY_REQUEST,
|
|
|
|
ROOTPROXY_REPLY,
|
|
|
|
CONNECTION_SHUTDOWN,
|
|
|
|
METHODTYPE_REQUEST, /* these two only needed with NeXT runtime */
|
|
|
|
METHODTYPE_REPLY
|
|
|
|
};
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
@class Connection;
|
|
|
|
|
1996-03-01 15:54:57 +00:00
|
|
|
@interface ConnectedEncoder : Encoder
|
1994-11-04 16:29:24 +00:00
|
|
|
{
|
|
|
|
Connection *connection;
|
|
|
|
unsigned sequence_number;
|
|
|
|
int identifier;
|
|
|
|
}
|
|
|
|
|
1996-03-01 15:54:57 +00:00
|
|
|
+ newForWritingWithConnection: (Connection*)c
|
1994-11-04 16:29:24 +00:00
|
|
|
sequenceNumber: (int)n
|
|
|
|
identifier: (int)i;
|
1996-03-01 15:54:57 +00:00
|
|
|
- (void) dismiss;
|
|
|
|
|
|
|
|
- connection;
|
|
|
|
- (unsigned) sequenceNumber;
|
|
|
|
- (int) identifier;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface ConnectedDecoder : Decoder
|
|
|
|
{
|
|
|
|
Connection *connection;
|
|
|
|
unsigned sequence_number;
|
|
|
|
int identifier;
|
|
|
|
}
|
|
|
|
|
1996-03-12 19:45:11 +00:00
|
|
|
+ newDecodingWithPacket: (Packet*)packet
|
|
|
|
connection: (Connection*)c;
|
1994-11-04 16:29:24 +00:00
|
|
|
+ newDecodingWithConnection: (Connection*)c
|
|
|
|
timeout: (int) timeout;
|
1996-03-01 15:54:57 +00:00
|
|
|
- (void) dismiss;
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
- connection;
|
|
|
|
- (unsigned) sequenceNumber;
|
|
|
|
- (int) identifier;
|
|
|
|
|
1996-03-01 15:54:57 +00:00
|
|
|
- replyPort;
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __ConnectedCoder_h */
|