|
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 implementation of the transition classes upon the CSmsSchemeHandler class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @SYMCreationDate Created : 01/06/01 14:07:23 |
|
21 */ |
|
22 |
|
23 // ______________________________________________________________________________ |
|
24 // |
|
25 _LIT(KSmsSchemeHandlerNewLTransition,"CSmsSchemeHandler_NewL_Transition"); |
|
26 |
|
27 inline CSmsSchemeHandler_NewL_Transition::CSmsSchemeHandler_NewL_Transition(CUnitTestContext& aUTContext, |
|
28 TTransitionValidator& aValidator) |
|
29 : CTransition(KSmsSchemeHandlerNewLTransition, aUTContext, aValidator) |
|
30 { |
|
31 // Do nothing here. |
|
32 } |
|
33 |
|
34 inline void CSmsSchemeHandler_NewL_Transition::TransitMethodL() |
|
35 { |
|
36 _LIT(KSmsSchemeHandlerNewLTransitMethod, "CSmsSchemeHandler::NewL transition"); |
|
37 Context().DataLogger().LogInformation(KSmsSchemeHandlerNewLTransitMethod); |
|
38 Context().iSmsSchemeHandler = CSmsSchemeHandler::NewL(); |
|
39 } |
|
40 |
|
41 inline CSmsSchemeHandler_UnitTestContext& CSmsSchemeHandler_NewL_Transition::Context() const |
|
42 { |
|
43 return REINTERPRET_CAST(CSmsSchemeHandler_UnitTestContext&,iUTContext); |
|
44 } |
|
45 |
|
46 // ______________________________________________________________________________ |
|
47 // |
|
48 _LIT(KSmsSchemeHandlerDtorTransition,"CSmsSchemeHandler_Dtor_Transition"); |
|
49 |
|
50 inline CSmsSchemeHandler_Dtor_Transition::CSmsSchemeHandler_Dtor_Transition(CUnitTestContext& aUTContext, |
|
51 TTransitionValidator& aValidator) |
|
52 : CTransition(KSmsSchemeHandlerDtorTransition, aUTContext, aValidator) |
|
53 { |
|
54 // Do nothing here. |
|
55 } |
|
56 |
|
57 inline void CSmsSchemeHandler_Dtor_Transition::TransitMethodL() |
|
58 { |
|
59 _LIT(KSmsSchemeHandlerDtorTransitMethod, "CSmsSchemeHandler::Dtor transition"); |
|
60 Context().DataLogger().LogInformation(KSmsSchemeHandlerDtorTransitMethod); |
|
61 delete Context().iSmsSchemeHandler; |
|
62 Context().iSmsSchemeHandler = NULL; |
|
63 } |
|
64 |
|
65 inline CSmsSchemeHandler_UnitTestContext& CSmsSchemeHandler_Dtor_Transition::Context() const |
|
66 { |
|
67 return REINTERPRET_CAST(CSmsSchemeHandler_UnitTestContext&,iUTContext); |
|
68 } |
|
69 |
|
70 |
|
71 // ______________________________________________________________________________ |
|
72 // |
|
73 _LIT(KSmsSchemeHandlerParseUrlLTransition,"CSmsSchemeHandler_ParseUrlL_Transition"); |
|
74 |
|
75 inline CSmsSchemeHandler_ParseUrlL_Transition::CSmsSchemeHandler_ParseUrlL_Transition(CUnitTestContext& aUTContext, |
|
76 TTransitionValidator& aValidator) |
|
77 : CTransition(KSmsSchemeHandlerParseUrlLTransition, aUTContext, aValidator) |
|
78 { |
|
79 // Do nothing here. |
|
80 } |
|
81 |
|
82 inline void CSmsSchemeHandler_ParseUrlL_Transition::TransitMethodL() |
|
83 { |
|
84 _LIT(KSmsSchemeHandlerParseUrlLTransitMethod, "CSmsSchemeHandler::ParseUrlL transition"); |
|
85 Context().DataLogger().LogInformation(KSmsSchemeHandlerParseUrlLTransitMethod); |
|
86 /** |
|
87 Set up any asynchronous calls by setting iStatus = KRequestPending, |
|
88 calling SetActive() etc..., |
|
89 Handle method parameter passing, if any. |
|
90 N.B. Do the right thing on construction/destruction |
|
91 E.g. For heap based classes: |
|
92 If this is a d'tor, don't forget to NULL the iSmsSchemeHandler pointer. |
|
93 and conversely if this is a c'tor assign the |
|
94 created class to the iSmsSchemeHandler pointer. |
|
95 |
|
96 Note: To transit a private method you will almost certainly have to do |
|
97 something like this: |
|
98 REINTERPRET_CAST(TSmsSchemeHandler_StateAccessor&, Context().StateAccessor()).ParseUrlL(Context().iSmsSchemeHandler, Context().iParameter1, etc...); |
|
99 */ |
|
100 |
|
101 TSmsSchemeHandler_StateAccessor& accessor = REINTERPRET_CAST(TSmsSchemeHandler_StateAccessor&, Context().StateAccessor()); |
|
102 accessor.ParseUrlL(*(Context().iSmsSchemeHandler), *Context().iUrl); |
|
103 } |
|
104 |
|
105 inline CSmsSchemeHandler_UnitTestContext& CSmsSchemeHandler_ParseUrlL_Transition::Context() const |
|
106 { |
|
107 return REINTERPRET_CAST(CSmsSchemeHandler_UnitTestContext&,iUTContext); |
|
108 } |