GEOS SDK TechDocs
|
|
3.4 Standard GCN Messages
IACP is fully discussed in the Applications and Geodes chapter.
@importMessage MetaIACPMessages, void MSG_META_IACP_PROCESS_MESSAGE(
EventHandle msgToSend,
TravelOption topt,
EventHandle completionMsg);
This message dispatches an IACP message to its proper destination, sending a completion message back when that has finished.
Source:
IACPSendMessage()
.
Destination: Any object registered as an IACP server, or the GenApplication object of a geode that is a client of such a server.
Parameters: msgToSend EventHandle of recorded message that the other side of the connection is actually sending.
TravelOption
(or -1 if
msgToSend
should be dispatched via
MessageDispatch() o
r delivered via MSG_META_SEND_TO_CLASSED_EVENT.
EventHandle
of recorded message to send when the message in
msgToSend
has been handled. If null, then no completion message will be sent.
Interception: if you have an object other than the GenApplication object that is an IACP server, you will need to intercept this message. You do not want to pass it on to the superclass in this case; usually, you will just want to call
IACPProcessMessage()
.
@importMessage MetaIACPMessages, void MSG_META_IACP_NEW_CONNECTION(
MemHandle appLaunchBlock,
Boolean justLaunched,
IACPConnection connection);
This message informs servers that a new client has connected to the server.
Source:
IACPConnect()
.
Destination: Any object registered as an IACP server.
Parameters:
appLaunchBlock
Handle of
AppLaunchBlock
passed to
IACPConnect()
. Do not free this block.
AppLaunchBlock
in its MSG_META_ATTACH call).
IACPConnection
that is now open.Interception: Must intercept if you want to do anything about receiving the new client; there is not default handler for this message. If you do not intercept this message, no harm is done.
@importMessage MetaIACPMessages, void MSG_META_IACP_LOST_CONNECTION(
IACPConnection connection,
word serverNum);
This message informs a server (or client) that one of its clients (or servers) has shut down.
Source:
IACPShutdown()
.
Destination: Any object registered as an IACP server, or the GenApplication object of a geode who is a client of such.
Parameters:
connection
IACPConnection
being closed.
Interception: Must be intercepted to provide custom behavior upon losing a connection, as there is no default handler for this message.
IACPLostConnection()
is a good routine for servers to call to ensure that connections don't linger after a client has shut down its end.
@importMessage MetaIACPMessages, void MSG_META_IACP_SHUTDOWN_CONNECTION(
IACPConnection connection);
This message shuts down the appropriate side of the indicated connection.
Source:
IACPLostConnection()
, though after a delay.
Destination: Any IACP server object.
Parameters:
connection
IACPConnection
to shutdown.
Interception: Must be intercepted to finish the work of a call to
IACPLostConnection()
. Call
IACPShutdownConnection()
to get default handling of this message.
@importMessage MetaIACPMessages, void MSG_META_IACP_DOC_OPEN_ACK(
IACPDocOpenAckParams *params);
This message is sent when a document has been opened; the document must have previously been passed in the
AppLaunchBlock
when the IACP connection was made. The optr of the GenDocument object managing the document is passed so that messages can be sent to it explicitly, though these messages must always be sent via IACP (with a
TravelOption
of -1) to allow the application to exit at any time.
Source: GenDocumentGroup.
Destination: IACP client (usually the GenApplication object of the client application).
Parameters:
params
Pointer to an
IACPDocOpenAckParams
structure.
Structures:
typedef struct {
optr IDOAP_docObj;
IACPConnection IDOAP_connection;
word IDOAP_serverNum;
} IACPDocOpenAckParams;
IDOAP_
docObj
stores the optr of the document object managing the document.
IDOAP_
connection
stores the
IACPConnection
over which the open request was received.
IDOAP_
serverNum
stores the server number of the GenApplication object acting as the document object's server, or zero if the connection is through some other object.
Interception: No default handler is defined. You must intercept this message to provide custom behavior.
@importMessage MetaIACPMessages, void MSG_META_IACP_DOC_CLOSE_ACK(
IACPDocCloseAckParams *params);
This message acts as the acknowledgment sent by a GenDocument object after it successfully processes MSG_GEN_DOCUMENT_CLOSE. Documents opened via IACP always operate in transparent mode; i.e. if you close a dirty file, it will be saved. If you don't want this behavior, you will have to send a message to revert the document.
Source: GenDocument object.
Destination: IACP client.
Parameters:
params
Pointer to a
IACPDocCloseAckParams
structure.
Structures:
typedef struct {
optr IDCAP_docObj;
IACPConnection IDCAP_connection;
word IDCAP_serverNum;
word IDCAP_status;
} IACPDocCloseAckParams;
IDCAP_
docObj
stores the optr of the document object that was managing the document.
IDCAP_
connection
stores the
IACPConnection
over which the close request was received.
IDCAP_
serverNum
stores the server number of the GenApplication object acting as the document object's server, or zero if the connection is through some other object.
IDCAP_
status
stores the
DocQuitStatus
of the close operation.
Interception: No default handler is defined. You must intercept this message to provide custom behavior.
GEOS SDK TechDocs
|
|
3.4 Standard GCN Messages