/*<ATGCOPYRIGHT>
 * Copyright (C) 1997 Art Technology Group, Inc.
 * All Rights Reserved.  No use, copying or distribution of this
 * work may be made except in accordance with a valid license
 * agreement from Art Technology Group.  This notice must be
 * included on all copies, modifications and derivatives of this
 * work.
 *
 * Art Technology Group (ATG) MAKES NO REPRESENTATIONS OR WARRANTIES 
 * ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. ATG SHALL NOT BE
 * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, 
 * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 *
 * "Dynamo" is a trademark of Art Technology Group, Inc.
 </ATGCOPYRIGHT>*/

/* 
   DRPServerIO.h - API for sending/receiving DRP objects, etc
 */

#ifndef _DRP_SERVER_IO_
#define _DRP_SERVER_IO_

#include "DRPTypes.h"
#include "DRPClient.h"


int recvByte(drpContextBlock * pCB, socket_t iSock, drpByte * oByte);
int sendByte(drpContextBlock * pCB, socket_t iSock, const drpByte * iByte);
int recvLong(drpContextBlock * pCB, socket_t iSock, drpInt * oLong);
int sendLong(drpContextBlock * pCB, socket_t iSock, const drpInt * iLong);
int recvBuffer(drpContextBlock * pCB, socket_t iSock, growBuffer * oBuffer,
	       size_t iLength);
int sendBuffer(drpContextBlock * pCB, socket_t iSock, 
	       const growBuffer * iBuffer);
int recvByteStream(drpContextBlock * pCB, socket_t iSock, char * oBuffer,
		   size_t iLength);
int sendByteStream(drpContextBlock * pCB, socket_t iSock,
		   const char * iBytes, size_t iLength);
int recvIdentifier(drpContextBlock * pCB, socket_t iSock,
		   drpIdentifier * oIdent, growBuffer * oBuffer);
int recvTLiteral(drpContextBlock * pCB, socket_t iSock,
		 drpTLiteral * oTLiteral, growBuffer * oBuffer);
int sendIdentifier(drpContextBlock * pCB, socket_t iSock, 		   
		   const drpIdentifier * iIdent);
int sendTLiteral(drpContextBlock * pCB, socket_t iSock,
		 const drpTLiteral * iTLiteral);
int sendAsciiTLiteral(drpContextBlock * pCB, socket_t iSock, 
		      const growBuffer * iAsciiBuffer);
int sendIntTLiteral(drpContextBlock * pCB, socket_t iSock,
		    drpInt iInt);
int sendNameIndexedPair(drpContextBlock * pCB, socket_t iSock,
			drpByte iDefinedName, const drpByte * iIndex,
			const drpByte * iValue);
int sendIntIndexedPair(drpContextBlock * pCB, socket_t iSock, 
		       drpByte iDefinedName, int iIndex, 
		       const drpByte * iAscii);
int send_flush(drpContextBlock * pCB, socket_t iSock, int iFlags);



#endif
