1 /* |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: State machine for file lookup |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_RSFW_LOOKUPSTATEMACHINE_H |
|
20 #define C_RSFW_LOOKUPSTATEMACHINE_H |
|
21 |
|
22 #include "rsfwrfestatemachine.h" |
|
23 |
|
24 /** |
|
25 * state machine for file lookup |
|
26 * |
|
27 * |
|
28 */ |
|
29 class CRsfwLookupStateMachine : public CRsfwRfeStateMachine |
|
30 { |
|
31 public: |
|
32 CRsfwLookupStateMachine(); |
|
33 ~CRsfwLookupStateMachine(); |
|
34 public: |
|
35 // STATES |
|
36 // updating attributes |
|
37 // if the file type is unknow we first try file then directory |
|
38 class TUpdateKidAttributesTryFirstTypeState : public CRsfwLookupStateMachine::TState |
|
39 { |
|
40 public: |
|
41 TUpdateKidAttributesTryFirstTypeState(CRsfwLookupStateMachine* aOperation); |
|
42 void EnterL(); |
|
43 TState* CompleteL(); |
|
44 TState* ErrorL(TInt aCode); |
|
45 private: |
|
46 CRsfwLookupStateMachine *iOperation; |
|
47 }; |
|
48 |
|
49 class TUpdateKidAttributesTrySecondTypeState : public CRsfwLookupStateMachine::TState |
|
50 { |
|
51 public: |
|
52 TUpdateKidAttributesTrySecondTypeState(CRsfwLookupStateMachine* aOperation); |
|
53 void EnterL(); |
|
54 TState* CompleteL(); |
|
55 TState* ErrorL(TInt aCode); |
|
56 private: |
|
57 CRsfwLookupStateMachine *iOperation; |
|
58 }; |
|
59 |
|
60 public: |
|
61 TState* CompleteL(); |
|
62 TState* CompleteRequestL(TInt aError); |
|
63 |
|
64 public: |
|
65 // input parameters |
|
66 TUint iNodeType; // are we looking up file, directory or unknown... |
|
67 |
|
68 // output parameters: |
|
69 CRsfwFileEntry *iKidFep; |
|
70 |
|
71 TPtrC iKidName; |
|
72 TFid* iParentFidp; |
|
73 |
|
74 CRsfwDirEntAttr* iDirEntAttr; |
|
75 TBool iKidCreated; |
|
76 HBufC* iPath; |
|
77 }; |
|
78 |
|
79 |
|
80 #endif // C_RSFW_LOOKUPSTATEMACHINE_H |
|