sysstatemgmt/systemstatemgr/test/tssm/src/tssmswppolicy_swppolicycli.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-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  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21 
       
    22 #include "tssmswppolicy_swppolicycli.h"
       
    23 #include "ssmswppolicyconst.h"
       
    24 
       
    25 /**
       
    26 RSsmSwpPolicySessionTest implementation
       
    27 */
       
    28 
       
    29 TInt RSsmSwpPolicySessionTest::HeapMark()
       
    30 	{
       
    31 	if(Handle())
       
    32 		{
       
    33 		return SendReceive(EDebugMarkHeap);
       
    34 		}
       
    35 	return KErrDisconnected;
       
    36 	}
       
    37 	
       
    38 TInt RSsmSwpPolicySessionTest::DeleteSSwpPolicySessionInfo()
       
    39 	{
       
    40 	if(Handle())
       
    41 		{
       
    42 		return SendReceive(EDeleteSSwpPolicySessionInfo);
       
    43 		}
       
    44 	return KErrDisconnected;
       
    45 	}
       
    46 
       
    47 TInt RSsmSwpPolicySessionTest::HeapMarkEnd()
       
    48 	{
       
    49 	if(Handle())
       
    50 		{
       
    51 		return SendReceive(EDebugMarkHeapEnd);
       
    52 		}
       
    53 	return KErrDisconnected;
       
    54 	}
       
    55 
       
    56 TInt RSsmSwpPolicySessionTest::SetHeapFailure(TInt aFailureRate)
       
    57 	{
       
    58 	if(Handle())
       
    59 		{
       
    60 		return SendReceive(EDebugSetHeapFailure, TIpcArgs(aFailureRate));
       
    61 		}
       
    62 	return KErrDisconnected;
       
    63 	}
       
    64 
       
    65 TInt RSsmSwpPolicySessionTest::HeapReset()
       
    66 	{
       
    67 	if(Handle())
       
    68 		{
       
    69 		return SendReceive(EDebugHeapReset);
       
    70 		}
       
    71 	return KErrDisconnected;
       
    72 	}
       
    73