?? tmserver.h
字號:
/* Copyright (c) 2005, Forum Nokia. All rights reserved */
#ifndef __TMSERVER_H__
#define __TMSERVER_H__
// INCLUDE FILES
#include <e32base.h>
_LIT( KTMExampleServer, "TMExampleServer" );
/** SyncServer panic codes */
enum TTmServPanic
{
EBadRequest,
EBadDescriptor,
ESrvCreateServer,
ECreateTrapCleanup,
};
// CLASS DECLARATION
/**
* CTmServer.
* An instance of class CTmServer is the main server class
* for the example application
*/
class CTmServer : public CServer2
{
public : // Constructors and destructors
/**
* NewL.
* Two-phased constructor.
* @return Pointer to created CTmServer object.
*/
static CTmServer* NewL();
/**
* NewLC.
* Two-phased constructor.
* @return Pointer to created CTmServer object.
*/
static CTmServer* NewLC();
public: // New functions
/**
* IncrementSessions.
* Increments the count of the active sessions for this server.
*/
void IncrementSessions();
/**
* DecrementSessions.
* Decrements the count of the active sessions for this server.
* If no more sessions are in use the server terminates.
*/
void DecrementSessions();
static TInt RunServer();
static void RunServerL();
protected: // Functions from base classes
/**
* From CActive, RunError.
* Processes any errors.
* @param aError The leave code reported.
* @result return KErrNone if leave is handled.
*/
TInt RunError( TInt aError );
private: // Constructors and destructors
/**
* CTmServer.
* C++ default constructor.
* @param aPriority priority for this thread.
*/
CTmServer( TInt aPriority );
/**
* ConstructL.
* 2nd phase constructor.
*/
void ConstructL();
private: // New methods
/**
* PanicClient.
* Panics the client.
* @param aMessage The message channel to the client.
* @param aReason The reason code for the panic.
*/
static void PanicClient( const RMessage2& aMessage,
TTmServPanic aReason );
/**
* PanicServer.
* Panics the server.
* @param aReason the reason code for the panic.
*/
static void PanicServer( TTmServPanic aReason );
private: // Functions from base classes
/**
* From CServer, NewSessionL.
* Create a tm server session.
* @param aVersion The client version.
* @return Pointer to new session.
*/
CSession2* NewSessionL( const TVersion& aVersion,
const RMessage2& aMessage ) const;
private: // Data
/**
* iSessionCount, the number of open sessions.
*/
TInt iSessionCount;
};
#endif // __TMSERVER_H__
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -