S60 5th Edition SDK Example Applications Guide |
#include <timesession.h>
Inheritance diagram for CTimeServerSession:
Definition at line 31 of file timesession.h.
Public Member Functions | |
virtual | ~CTimeServerSession () |
void | ServiceL (const RMessage2 &aMessage) |
Static Public Member Functions | |
static CTimeServerSession * | NewL (CTimeServer &aServer) |
static CTimeServerSession * | NewLC (CTimeServer &aServer) |
Private Member Functions | |
CTimeServerSession (CTimeServer &aServer) | |
void | ConstructL () |
void | PanicClient (const RMessagePtr2 &aMessage, TInt aPanic) const |
void | RequestTimeL (const RMessage2 &aMessage) |
Private Attributes | |
CTimeServer & | iServer |
|
~CTimeServerSession. Destructor. Definition at line 77 of file timesession.cpp. References CTimeServer::DecrementSessions(), and iServer. 00078 { 00079 iServer.DecrementSessions(); 00080 }
|
|
CTimeServerSession. C++ default constructor.
Definition at line 66 of file timesession.cpp. Referenced by NewLC(). 00067 : iServer( aServer ) 00068 { 00069 // Implementation not required 00070 }
|
|
NewL. Two-phased constructor.
Definition at line 31 of file timesession.cpp. References NewLC(). Referenced by CTimeServer::NewSessionL(). 00032 { 00033 CTimeServerSession* self = CTimeServerSession::NewLC( aServer ); 00034 CleanupStack::Pop( self ); 00035 return self; 00036 }
|
|
NewLC. Two-phased constructor.
Definition at line 43 of file timesession.cpp. References CTimeServerSession(). Referenced by NewL(). 00044 { 00045 CTimeServerSession* self = new ( ELeave ) CTimeServerSession( aServer ); 00046 CleanupStack::PushL( self ); 00047 self->ConstructL(); 00048 return self; 00049 }
|
|
From CSession, ServiceL. Service request from client.
Definition at line 87 of file timesession.cpp. References PanicClient(), and RequestTimeL(). 00088 { 00089 switch ( aMessage.Function() ) 00090 { 00091 case ETimeServRequestTime : 00092 RequestTimeL( aMessage ); 00093 break; 00094 00095 default: 00096 PanicClient( aMessage, EBadRequest ); 00097 break; 00098 } 00099 aMessage.Complete( KErrNone ); 00100 }
|
|
ConstructL. 2nd phase constructor. Definition at line 56 of file timesession.cpp. References CTimeServer::IncrementSessions(), and iServer. 00057 { 00058 iServer.IncrementSessions(); 00059 }
|
|
PanicClient. Causes the client thread to panic.
Definition at line 126 of file timesession.cpp. Referenced by ServiceL(). 00128 { 00129 aMessage.Panic( KCSSyncServer,aPanic ); // Note: this panics the client thread, 00130 // not server 00131 }
|
|
RequestTimeL. Handle the result of the client requesting the time. Gets the time and writes it back to the client synchronously.
Definition at line 108 of file timesession.cpp. Referenced by ServiceL(). 00109 { 00110 TTime time; 00111 time.HomeTime(); 00112 00113 TPtr8 ptr( reinterpret_cast<TUint8*>( &time ), sizeof( time ), 00114 sizeof( time ) ); 00115 00116 // Write time data to the descriptor which is the first message argument 00117 aMessage.WriteL( 0, ptr, 0 ); 00118 }
|
|
iServer, reference to the server. Definition at line 105 of file timesession.h. Referenced by ConstructL(), and ~CTimeServerSession(). |
© Nokia 2009 |