|
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 "tssm_ssmclient.h" |
|
23 |
|
24 |
|
25 /** |
|
26 RSsmStateManagerTestClient implementation |
|
27 */ |
|
28 |
|
29 EXPORT_C TInt RSsmStateManagerTestClient::Connect(const TDesC& aServerName, const TVersion& aVersion) |
|
30 { |
|
31 return DoConnect(aServerName, aVersion, -1); |
|
32 } |
|
33 |
|
34 EXPORT_C TInt RSsmStateManagerTestClient::Connect() |
|
35 { |
|
36 return DoConnect(KSsmServerNameTest, TVersion(KSsmServMajorVersionNumber, KSsmServMinorVersionNumber, KSsmServBuildVersionNumber), -1); |
|
37 } |
|
38 |
|
39 EXPORT_C void RSsmStateManagerTestClient::Close() |
|
40 { |
|
41 RSsmStateManager::Close(); |
|
42 } |
|
43 |
|
44 EXPORT_C TInt RSsmStateManagerTestClient::HeapMark() |
|
45 { |
|
46 if(Handle()) |
|
47 { |
|
48 return SendReceive(ERequestMarkHeap); |
|
49 } |
|
50 return KErrDisconnected; |
|
51 } |
|
52 |
|
53 EXPORT_C TInt RSsmStateManagerTestClient::HeapMarkEnd() |
|
54 { |
|
55 return HeapMarkEnd(ENoCleanup); |
|
56 } |
|
57 |
|
58 EXPORT_C TInt RSsmStateManagerTestClient::HeapMarkEnd(TInt aDoCleanup) |
|
59 { |
|
60 if(Handle()) |
|
61 { |
|
62 TIpcArgs args(aDoCleanup); |
|
63 return SendReceive(ERequestMarkHeapEnd, args); |
|
64 } |
|
65 return KErrDisconnected; |
|
66 } |
|
67 |
|
68 EXPORT_C TInt RSsmStateManagerTestClient::RequestDeRegisterSwpMappingL(TUint aSwpKey, const TDesC& aFilename) |
|
69 { |
|
70 if(Handle()) |
|
71 { |
|
72 TIpcArgs args(aSwpKey, &aFilename); |
|
73 return SendReceive(ERequestDeRegisterSwpMapping, args); |
|
74 } |
|
75 return KErrDisconnected; |
|
76 } |
|
77 |