|
1 /* |
|
2 * Copyright (c) 2002-2008 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: Abstract CCFScriptAction class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CFSCRIPTACTION_H |
|
21 #define C_CFSCRIPTACTION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <e32std.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MCFOperationServices; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Base class for all script actions in Context Framework. |
|
34 * |
|
35 * @lib BasicOperationsPlugIn |
|
36 * @since Series 60 5.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CCFScriptAction ): public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 enum TActionType |
|
43 { |
|
44 EPublishContext, |
|
45 ENotify, |
|
46 ESourceCommand |
|
47 }; |
|
48 |
|
49 /* |
|
50 * Destructor |
|
51 */ |
|
52 virtual ~CCFScriptAction(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /* |
|
57 * Method to access ActionType |
|
58 * @return ActionType |
|
59 * @since Series 60 2.6 |
|
60 */ |
|
61 const TActionType& ActionType(); |
|
62 |
|
63 /* |
|
64 * Action method that must be implemented by all inherited classes. |
|
65 * @since Series 60 2.6 |
|
66 */ |
|
67 virtual void ActL() = 0; |
|
68 |
|
69 /** |
|
70 * Gets the security policy of particular action. |
|
71 * @param aPolicy will contains the actions security policy after successful |
|
72 * call. |
|
73 * @return KErrNone if action definition found, KErrNotFound if not. |
|
74 */ |
|
75 virtual TInt GetSecurityPolicy( TSecurityPolicy& aPolicy ) = 0; |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CCFScriptAction( MCFOperationServices& aServices, TActionType aType ); |
|
83 |
|
84 protected: // Data |
|
85 |
|
86 // Operation service interface. |
|
87 MCFOperationServices& iServices; |
|
88 |
|
89 private: // Data |
|
90 |
|
91 // Action type. |
|
92 TActionType iType; |
|
93 }; |
|
94 |
|
95 #endif // C_CFSCRIPTACTION_H |