|
1 // Copyright (c) 1997-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 // The state accessor class definitions for the CRegistrar class. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __REGISTRARSTATEACCESSOR_H__ |
|
19 #define __REGISTRARSTATEACCESSOR_H__ |
|
20 |
|
21 // ______________________________________________________________________________ |
|
22 // |
|
23 /** |
|
24 @internalComponent |
|
25 Comments : State accessor for the CRegistrar object under test. |
|
26 */ |
|
27 class TRegistrar_StateAccessor : public MStateAccessor |
|
28 { |
|
29 public: |
|
30 /** |
|
31 @fn InvariantTest(TAny* aTestObject) |
|
32 Intended Usage : Checks if CRegistrar has violated any of its invariants. |
|
33 @since 7.0 |
|
34 @param TAny* A pointer to the object under test. |
|
35 @return TInt KErrNone if the invariants were valid, error code otherwise. |
|
36 @pre TRegistrar_StateAccessor is fully constructed. |
|
37 @post The class under test is set to the state specified. |
|
38 */ |
|
39 inline TInt InvariantTest(TAny* aTestObject); |
|
40 |
|
41 /** |
|
42 @fn Internalize(TAny* aTestObject) |
|
43 Intended Usage : Implemented by the developer to set the state of the object under test. |
|
44 @since 7.0 |
|
45 @param TAny* A pointer to the object under test. |
|
46 @return TInt KErrNone if the state was set, error code otherwise. |
|
47 @pre TRegistrar_StateAccessor is fully constructed. |
|
48 @post The class under test is set to the state specified. |
|
49 */ |
|
50 inline TInt Internalize(TAny* aTestObject); |
|
51 |
|
52 /** |
|
53 @fn Externalize(TAny* aTestObject) |
|
54 Intended Usage : Implemented by the developer to persist the state of the object under test. |
|
55 @since 7.0 |
|
56 @param TAny* A pointer to the object under test. |
|
57 @return TInt KErrNone if the state was persisted, error code otherwise. |
|
58 @pre TRegistrar_StateAccessor is fully constructed. |
|
59 @post No change to the class under test. |
|
60 */ |
|
61 inline TInt Externalize(TAny* aTestObject); |
|
62 |
|
63 /** |
|
64 @fn void ParseL(CRegistrar& aRegistrar, CRegistryData::CDllData& aDll, const TDesC& aRscFileName) |
|
65 Intended Usage : |
|
66 Error Condition : |
|
67 @since 7.0 |
|
68 @param aRegistrar @see CRegistrar::ParseL |
|
69 @param aDll @see CRegistrar::ParseL |
|
70 @param aRscFileName @see CRegistrar::ParseL |
|
71 @pre This object is fully constructed |
|
72 @post The private method ParseL is executed on aRegistrar |
|
73 */ |
|
74 void ParseL(CRegistrar& aRegistrar, CRegistryData::CDllData& aDll, const TDesC& aRscFileName); |
|
75 |
|
76 /** |
|
77 @fn void ParseRegistrationDataL(CRegistrar& aRegistrar, const TEntry& anEntry, const TDesC& aRscFileName, const TDriveUnit& aDrive, TBool aUpdate, TInt aRegistryDriveIndex) |
|
78 Intended Usage : |
|
79 Error Condition : |
|
80 @since 7.0 |
|
81 @param aRegistrar " " |
|
82 @param aEntry @see CRegistrar::ParseRegistrationDataL |
|
83 @param aRscFileName @see CRegistrar::ParseRegistrationDataL |
|
84 @param aDrive @see CRegistrar::ParseRegistrationDataL |
|
85 @param aUpdate @see CRegistrar::ParseRegistrationDataL |
|
86 @param aRegistryDriveIndex @see CRegistrar::ParseRegistrationDataL |
|
87 @pre This object is fully constructed |
|
88 @post The private method ParseRegistrationDataL is executed on aRegistrar |
|
89 */ |
|
90 void ParseRegistrationDataL(CRegistrar& aRegistrar, const TEntry& aEntry, |
|
91 const TDesC& aRscFileName, const TDriveUnit& aDrive, |
|
92 TBool aUpdate, TInt aRegistryDriveIndex); |
|
93 |
|
94 // Internal methods access |
|
95 void DiscoveriesBegin(CRegistrar& aRegistrar); |
|
96 |
|
97 void DiscoveriesComplete(CRegistrar& aRegistrar, TBool aSuccessful); |
|
98 |
|
99 void DriveRemoved(CRegistrar& aRegistrar, TDriveUnit aDrive); |
|
100 |
|
101 void DriveReinstatedL(CRegistrar& aRegistrar, TDriveUnit aDrive); |
|
102 |
|
103 void RegisterDiscoveryL(CRegistrar& aRegistrar, const TEntry& aEntry); |
|
104 |
|
105 }; // TRegistrar_StateAccessor |
|
106 |
|
107 #include "RegistrarStateAccessor.inl" |
|
108 |
|
109 #endif // __REGISTRARSTATEACCESSOR_H__ |