GamemComms
A GameComms.dll re-implementation for the Nokia N-Gage
GameBTCommsNotify.h
Go to the documentation of this file.
1 
11 #ifndef __GAMEBTCOMMSNOTIFY_H
12 #define __GAMEBTCOMMSNOTIFY_H
13 
14 const TInt KUnknownClientId = 0;
15 const TInt KErrIncompatibleGame = (-1001);
16 const TInt KErrNotCommsHost = (-1002);
17 const TInt KErrClientNotReady = (-1003);
18 const TInt KErrHostQuit = (-1004);
19 const TInt KErrNotEnoughPlayers = (-1005);
20 const TInt KErrGamePaused = (-1006);
21 const TInt KErrGameOver = (-1007);
22 
35 {
36 public:
108  virtual void ClientConnected(TUint16 aClientId, TDesC& aClientName, TInt aError) = 0;
109 
128  virtual void HostSelected(TInt aError) = 0;
129 
149  virtual void HostConnected(TInt aError) = 0;
150 
176  virtual void StartMultiPlayerGame(TInt aError) = 0;
177 
190  virtual void ContinueMultiPlayerGame() = 0;
191 
204  virtual void PauseMultiPlayerGame() = 0;
205 
246  virtual void EndMultiPlayerGame(TInt aReason) = 0;
247 
284  virtual void ConnectedClientEndedGame(TUint16 aClientId) = 0;
285 
318  virtual void ClientDisconnected(TUint16 aClientId, TInt aError) = 0;
319 
342  virtual void HostDisconnected(TInt aError) = 0;
343 
362  virtual void ReceiveDataFromClient(TUint16 aClientId, TDesC8& aData) = 0;
363 
379  virtual void ReceiveDataFromHost(TDesC8& aData) = 0;
380 };
381 
382 #endif // __GAMEBTCOMMSNOTIFY_H
const TInt KErrGamePaused
Game paused error code.
Definition: GameBTCommsNotify.h:20
const TInt KErrNotCommsHost
Not a GameComms host error code.
Definition: GameBTCommsNotify.h:16
const TInt KUnknownClientId
Unknown client Id.
Definition: GameBTCommsNotify.h:14
const TInt KErrNotEnoughPlayers
Not enough players error code.
Definition: GameBTCommsNotify.h:19
const TInt KErrClientNotReady
Client not ready error code.
Definition: GameBTCommsNotify.h:17
const TInt KErrIncompatibleGame
Incompatible game error code.
Definition: GameBTCommsNotify.h:15
const TInt KErrHostQuit
Host quit error code.
Definition: GameBTCommsNotify.h:18
const TInt KErrGameOver
Game over error code.
Definition: GameBTCommsNotify.h:21
This is the notification interface provided by the library.
Definition: GameBTCommsNotify.h:35
virtual void ConnectedClientEndedGame(TUint16 aClientId)=0
Notifies the host game application that a connected client has chosen to end their game in the follow...
Definition: GameBTCommsNotify.cpp:43
virtual void StartMultiPlayerGame(TInt aError)=0
Always called on all applications when the game can be started (KErrNone == aError).
Definition: GameBTCommsNotify.cpp:27
virtual void ReceiveDataFromHost(TDesC8 &aData)=0
Notifies a client game application that some application specific data has been received from the hos...
Definition: GameBTCommsNotify.cpp:59
virtual void PauseMultiPlayerGame()=0
Called on all applications except the one that called CGameBTComms::PauseMultiPlayerGame()
Definition: GameBTCommsNotify.cpp:35
virtual void HostConnected(TInt aError)=0
Always called on each client application after StartClientL() is called (unless no device is selected...
Definition: GameBTCommsNotify.cpp:23
virtual void HostDisconnected(TInt aError)=0
This is called on a client application when the host has disconnected because:
Definition: GameBTCommsNotify.cpp:51
virtual void ClientDisconnected(TUint16 aClientId, TInt aError)=0
This is called on the host application when a client device has disconnected because:
Definition: GameBTCommsNotify.cpp:47
virtual void ClientConnected(TUint16 aClientId, TDesC &aClientName, TInt aError)=0
Always called on the host application (with KErrNone == aError) for each sucessful connection made wi...
Definition: GameBTCommsNotify.cpp:15
virtual void EndMultiPlayerGame(TInt aReason)=0
Notifies the game application that the game should be ended.
Definition: GameBTCommsNotify.cpp:39
virtual void ReceiveDataFromClient(TUint16 aClientId, TDesC8 &aData)=0
Notifies the game application that some application specific data has been received from a client gam...
Definition: GameBTCommsNotify.cpp:55
virtual void HostSelected(TInt aError)=0
Called on a client application when a host is selected by the user after calling StartClientL().
Definition: GameBTCommsNotify.cpp:19
virtual void ContinueMultiPlayerGame()=0
Always called on all applications when a game can be continued after it has been paused.
Definition: GameBTCommsNotify.cpp:31