messagingfw/msgtestproduct/testutils/src/TestUtilityServerObserver.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18 */
       
    19 
       
    20 #include "TestUtilityServerObserver.h"
       
    21 
       
    22 
       
    23 /**
       
    24 CTestUtilityServerObserver()
       
    25 private constructor
       
    26 */
       
    27 CTestUtilityServerObserver::CTestUtilityServerObserver() 
       
    28 	{
       
    29 	}
       
    30 
       
    31 
       
    32 /**
       
    33 CTestUtilityServerObserver()
       
    34 standard destructor 
       
    35 */
       
    36 CTestUtilityServerObserver::~CTestUtilityServerObserver() 
       
    37 	{
       
    38 	}
       
    39 
       
    40 
       
    41 
       
    42 /**
       
    43 NewLC()
       
    44 static interface for symbian standard 2 phase constructor, 
       
    45 
       
    46 @return
       
    47 CTestUtilityServerObserver pointer or NULL on failure
       
    48 */
       
    49 CTestUtilityServerObserver* CTestUtilityServerObserver::NewLC()
       
    50 	{
       
    51 	CTestUtilityServerObserver *self = new (ELeave) CTestUtilityServerObserver;
       
    52 	CleanupStack::PushL(self);
       
    53 	self->ConstructL();
       
    54 	return self;	
       
    55 	}
       
    56 	
       
    57 
       
    58 /**
       
    59  NewL()
       
    60 static interface for symbian standard 2 phase constructor, 
       
    61 
       
    62 @return
       
    63 CTestUtilityServerObserver pointer or NULL on failure
       
    64 */
       
    65 CTestUtilityServerObserver* CTestUtilityServerObserver::NewL()
       
    66 	{
       
    67 	CTestUtilityServerObserver *self = CTestUtilityServerObserver::NewLC();
       
    68 	CleanupStack::Pop( self );
       
    69 	return self;
       
    70 	}
       
    71 
       
    72 
       
    73 /**
       
    74 ConstructL()
       
    75 2nd Part os Symbian 2 phase constructor - contains construction code 
       
    76 that may leave.
       
    77 */
       
    78 void CTestUtilityServerObserver::ConstructL()
       
    79 	{
       
    80 	// add any construction code that may leave here
       
    81 	
       
    82 	}
       
    83 	
       
    84 	
       
    85 /**
       
    86 HandleSessionEventL()
       
    87 Implementation for MMsvSessionObserver interface. The type of event is indicated by the 
       
    88 value of aEvent. The interpretation of the TAny arguments depends on this type. For most 
       
    89 event types, the action that is taken, for example, updating the display, is 
       
    90 client-specific. All clients though should respond to EMsvCloseSession and 
       
    91 EMsvServerTerminated events. 
       
    92 
       
    93 @param TMsvSessionEvent aEvent
       
    94 Indicates the event type. 
       
    95  	
       
    96 @param TAny* aArg1
       
    97 Event type-specific argument value 
       
    98 
       
    99 @param TAny* aArg2
       
   100 Event type-specific argument value 
       
   101 
       
   102 @param TAny* aArg3
       
   103 Event type-specific argument value 
       
   104 */
       
   105 void CTestUtilityServerObserver::HandleSessionEventL( TMsvSessionEvent aEvent
       
   106 													, TAny* //aArg1
       
   107 													, TAny* //aArg2
       
   108 													, TAny* //aArg3
       
   109 													)
       
   110 	{
       
   111 	switch( aEvent )
       
   112 		{
       
   113 		case EMsvCloseSession:
       
   114 			// log server closed message her
       
   115 			break;
       
   116 		case EMsvServerTerminated:
       
   117 			// log server terminated message her
       
   118 			break;
       
   119 		default:
       
   120 			break;
       
   121 		};
       
   122 	}
       
   123