1997-09-01 21:59:51 +00:00
|
|
|
|
/* Interface internal use by Distributed Objects components
|
|
|
|
|
Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
|
|
Written by: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|
|
|
|
Date: August 1997
|
|
|
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-09-14 11:36:11 +00:00
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1997-09-01 21:59:51 +00:00
|
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-08 10:38:33 +00:00
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
1997-09-01 21:59:51 +00:00
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
2007-09-14 11:36:11 +00:00
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1997-09-01 21:59:51 +00:00
|
|
|
|
License along with this library; if not, write to the Free
|
2006-09-13 10:20:49 +00:00
|
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
|
Boston, MA 02111 USA.
|
1997-09-01 21:59:51 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __DistributedObjects_h
|
|
|
|
|
#define __DistributedObjects_h
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-24 08:08:14 +00:00
|
|
|
|
* For <strong>INTERNAL</strong> use by the GNUstep base library.
|
2003-07-31 23:49:32 +00:00
|
|
|
|
* This file should not be installed. The only reason why it is
|
|
|
|
|
* located here, is to allow target specific headers (like mframe.h),
|
|
|
|
|
* which are located according to dis/enabled-flattened,
|
|
|
|
|
* may include this file via standard "GNUstepBase/DistributedObjects.h"
|
|
|
|
|
* and won't require an extra -I flag.
|
|
|
|
|
*
|
2000-06-20 05:12:26 +00:00
|
|
|
|
* Classes should implement [-classForPortCoder] to return the class
|
|
|
|
|
* that should be sent over the wire.
|
1997-09-01 21:59:51 +00:00
|
|
|
|
*
|
2000-06-20 05:12:26 +00:00
|
|
|
|
* Classes should implement [-replacementObjectForPortCoder:] to encode
|
|
|
|
|
* objects.
|
1997-09-01 21:59:51 +00:00
|
|
|
|
* The default action is to send a proxy.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <Foundation/NSConnection.h>
|
|
|
|
|
#include <Foundation/NSDistantObject.h>
|
|
|
|
|
#include <Foundation/NSPortCoder.h>
|
2004-08-24 08:08:14 +00:00
|
|
|
|
#include <Foundation/NSPort.h>
|
1997-09-01 21:59:51 +00:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Distributed Objects identifiers
|
|
|
|
|
* These define the type of messages sent by the D.O. system.
|
|
|
|
|
*/
|
|
|
|
|
enum {
|
|
|
|
|
METHOD_REQUEST = 0,
|
|
|
|
|
METHOD_REPLY,
|
|
|
|
|
ROOTPROXY_REQUEST,
|
|
|
|
|
ROOTPROXY_REPLY,
|
|
|
|
|
CONNECTION_SHUTDOWN,
|
1999-02-11 08:10:24 +00:00
|
|
|
|
METHODTYPE_REQUEST,
|
|
|
|
|
METHODTYPE_REPLY,
|
1997-11-26 21:15:12 +00:00
|
|
|
|
PROXY_RELEASE,
|
1998-06-26 20:39:50 +00:00
|
|
|
|
PROXY_RETAIN,
|
1999-02-11 08:10:24 +00:00
|
|
|
|
RETAIN_REPLY
|
1997-09-01 21:59:51 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-08-24 08:08:14 +00:00
|
|
|
|
* Category containing the methods by which the public interface to
|
|
|
|
|
* NSConnection must be extended in order to allow it's use by
|
|
|
|
|
* by NSDistantObject et al for implementation of Distributed objects.
|
1997-09-01 21:59:51 +00:00
|
|
|
|
*/
|
|
|
|
|
@interface NSConnection (Internal)
|
1999-01-29 21:29:32 +00:00
|
|
|
|
- (NSDistantObject*) includesLocalTarget: (unsigned)target;
|
1999-01-24 09:29:13 +00:00
|
|
|
|
- (NSDistantObject*) localForObject: (id)object;
|
2002-12-10 11:30:56 +00:00
|
|
|
|
- (NSDistantObject*) locateLocalTarget: (unsigned)target;
|
1999-01-29 21:29:32 +00:00
|
|
|
|
- (NSDistantObject*) proxyForTarget: (unsigned)target;
|
|
|
|
|
- (void) retainTarget: (unsigned)target;
|
2006-03-08 11:28:59 +00:00
|
|
|
|
|
|
|
|
|
- (retval_t) forwardForProxy: (NSDistantObject*)object
|
|
|
|
|
selector: (SEL)sel
|
|
|
|
|
argFrame: (arglist_t)argframe;
|
|
|
|
|
- (void) forwardInvocation: (NSInvocation *)inv
|
|
|
|
|
forProxy: (NSDistantObject*)object;
|
|
|
|
|
- (const char *) typeForSelector: (SEL)sel remoteTarget: (unsigned)target;
|
1997-09-01 21:59:51 +00:00
|
|
|
|
@end
|
|
|
|
|
|
2004-08-24 08:08:14 +00:00
|
|
|
|
@interface NSPort (Internal)
|
|
|
|
|
- (id) conversation: (NSPort*)receivePort;
|
|
|
|
|
@end
|
|
|
|
|
|
1997-09-01 21:59:51 +00:00
|
|
|
|
#endif /* __DistributedObjects_h */
|