⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgprpcpacker.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpRPCPacker.h,v 1.5 2002/08/06 20:10:16 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_pgpRPCPacker_h	/* [ */
#define Included_pgpRPCPacker_h

#include "pgpPubTypes.h"

typedef struct PGPrpcMessage
{
	PGPUInt32	msgType;
	PGPUInt32	msgSize;
	PGPByte		msgData[1];
} PGPrpcMessage;

#define PGPrpcMessageBufferSize(msg)	((msg)->msgSize + sizeof((msg)->msgType) + sizeof((msg)->msgSize))

/*
 * Allowed format specifiers:
 *
 * i: signed 32 bit integer
 * u: unsigned 32 bit integer
 * U: unsigned 64 bit integer
 * b: boolean value
 * s: null terminated string
 * B: binary data (must give pointer and size as PGPByte* and PGPUInt32)
 */
 
	PGPError
PGPrpcPack(
	PGPContextRef	context,
	PGPUInt32		msgType,
	PGPByte **		pBuf,
	PGPSize *		pLen,
	const char *	fmt,
	... );

	PGPError
PGPrpcUnpack(
	PGPContextRef	context,
	PGPByte *		buf,
	PGPSize			len,
	const char *	fmt,
	... );

	PGPError
PGPrpcWrite(
	PGPInt32		sock,
	PGPByte *		buf,
	PGPSize			len );

	PGPError
PGPrpcRead(
	PGPContextRef	context,
	PGPInt32		sock,
	PGPByte **		outBuf,
	PGPSize *		outLen );

/*
 * Convenience function for PGPrpcPack and PGPrpcWrite.
 */
	PGPError
PGPrpcPackAndWrite(
	PGPContextRef	context,
	PGPInt32		sock,
	PGPUInt32		msgType,
	const char *	fmt,
	... );

/*
 * Convenience function for PGPrpcRead and PGPrpcUnpack.  Since the
 * format of the message depends on the message type, the message we read
 * must have the same message type as what we pass in.  If it does not
 * match, we assume the data is not valid.
 */
	PGPError
PGPrpcReadAndUnpack(
	PGPContextRef	context,
	PGPInt32		sock,
	PGPUInt32		msgType,
	const char *	fmt,
	... );

#endif /* ] Included_pgpRPCPacker_h */


/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -