03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

19.2 The Client Interface<br />

You can see a UML diagram representing the client interface in Appendix 3. Here is the<br />

7ode from gsdp.h:<br />

#ifndef __GSDP_H<br />

#define __GSDP_H<br />

#include <br />

// game session datagram protocol interface specification<br />

class MGsdpPacketHandler<br />

{<br />

public:<br />

virtual void GsdpHandleL(const TDesC8& aData)=0;<br />

};<br />

const TInt KMaxGdpDisplayName = 0x20;<br />

class TGdpProtocolInfo<br />

{<br />

public:<br />

TUid iUid;<br />

TBuf iDisplayName;<br />

TBool iNetworked;<br />

};<br />

class CGsdpReceiveHandler;<br />

class RGsdpSession : public RSessionBase<br />

{<br />

public:<br />

// construct<br />

inline RGsdpSession() : iHandler(0) {};<br />

// open/close<br />

IMPORT_C void ConnectL(MGsdpPacketHandler& aHandler);<br />

IMPORT_C void Close();<br />

// Query supported protocols<br />

IMPORT_C TInt CountGdpProtocols() const;<br />

///< Returns count of protocols<br />

/// Retrieve info for particular protocol

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!