gdp.h

来自「Symbian C++ scmp.zip」· C头文件 代码 · 共 57 行

H
57
字号
// gdp.h
//
// Copyright (c) 2000 Symbian Ltd.  All rights reserved.
//

#ifndef __GDP_H__
#define __GDP_H__

#include <e32base.h>

const TUid KGdpProtocolImpl = {0x101f8b52};
/// Warning: This constant is replicated in the ImplementationTable, due to
/// initialisation problems.
const TUid KGdpLoopbackUid = {0x101f8b53};
const TUid KGdpSmsUid = {0x101f8b5e};
const TUid KGdpBTUid = {0x101f8b5f};


// game datagram protocol interface specification

/*
	class MGdpPacketHandler

	Handles incoming packets - passes up the protocol stack
*/

class MGdpPacketHandler
	{
public:
	virtual void GdpHandleL(const TDesC8& aFromAddress, const TDesC8& aData)=0;
	virtual void SendComplete(TInt aErr) = 0;
	};

/*
	class CGdpSession

	Defines the interface for real comms, startup, host address identification, and
	sending packets. 
*/

class CGdpSession : public CBase
	{
public:
	IMPORT_C static CGdpSession* NewL(TUid aUid);
	virtual void OpenL(MGdpPacketHandler* aHandler)=0; // start up, and set handler for packets received
	virtual void SendL(const TDesC8& aToAddress, const TDesC8& aData)=0; // send packet
	virtual TInt ReceiveAll()=0; // do a pull if necessary
	virtual TInt GetMaxPacketLength() const =0; // max packet length
	virtual TBool IsNetworked() const =0; // requires addresses, if networked
	inline  TUid Uid() const {return iDtor_ID_Key;};
protected:
	TUid iDtor_ID_Key;
	};


#endif

⌨️ 快捷键说明

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