|
1 /* |
|
2 * Copyright (c) 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: Transfer state base class for different transfer states |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SVPTRANSFERSTATEBASE_H |
|
20 #define SVPTRANSFERSTATEBASE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CSVPTransferStateContext; |
|
25 |
|
26 /** |
|
27 * Transfer state base class |
|
28 * |
|
29 * @lib svp.dll |
|
30 * @since S60 3.2 |
|
31 */ |
|
32 class CSVPTransferStateBase : public CBase |
|
33 { |
|
34 |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 virtual ~CSVPTransferStateBase(); |
|
41 |
|
42 public: // New functions |
|
43 |
|
44 /** |
|
45 * Applies the current state. Called after the state transition. |
|
46 * Leaves on error. |
|
47 * @since S60 3.2 |
|
48 * @param aContext SVP Transfer context |
|
49 */ |
|
50 void ApplyL( CSVPTransferStateContext& aContext ); |
|
51 |
|
52 /** |
|
53 * Called when the state is entered, before it is applied. |
|
54 * |
|
55 * @since S60 3.2 |
|
56 * @param aContext SVP Transfer context |
|
57 */ |
|
58 void Enter( CSVPTransferStateContext& aContext ); |
|
59 |
|
60 |
|
61 protected: // New functions |
|
62 |
|
63 /** |
|
64 * Applies the current concrete state. Leaves on error. |
|
65 * Implemented by the concrete states. |
|
66 * |
|
67 * @since S60 3.2 |
|
68 * @param aContext SVP Transfer context |
|
69 */ |
|
70 virtual void DoApplyL( CSVPTransferStateContext& aContext ) = 0; |
|
71 |
|
72 /** |
|
73 * Called when the state is entered. Implemented by the concrete states. |
|
74 * |
|
75 * @since S60 3.2 |
|
76 * @param aContext SVP Transfer context |
|
77 */ |
|
78 virtual void DoEnter( CSVPTransferStateContext& aContext ) = 0; |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CSVPTransferStateBase(); |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // SVPTRANSFERSTATEBASE_H |