|
1 /* |
|
2 * Copyright (c) 2006-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: Base class for message handlers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CFMESSAGEHANDLERBASE_H |
|
20 #define C_CFMESSAGEHANDLERBASE_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "cfcontextsubscriptionlistener.h" |
|
26 |
|
27 class RMessage2; |
|
28 class MCFExtendedContextInterface; |
|
29 class MCFActionInterface; |
|
30 class MCFScriptInterface; |
|
31 |
|
32 /** |
|
33 * Context Framework server session message handler base class. |
|
34 */ |
|
35 NONSHARABLE_CLASS( CCFMessageHandlerBase ): public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 // Message handler type |
|
40 enum TCFMessageHandler |
|
41 { |
|
42 EContextMessageHandler, |
|
43 EActionMessageHandler, |
|
44 EScriptMessageHandler |
|
45 }; |
|
46 |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Handles message from client. |
|
51 * |
|
52 * @since S60 4.0 |
|
53 * @param aMessage Message from client. |
|
54 * @return ETrue if message handled. |
|
55 */ |
|
56 virtual TBool HandleMessageL( const RMessage2& aMessage ) = 0; |
|
57 |
|
58 protected: |
|
59 |
|
60 CCFMessageHandlerBase( MCFExtendedContextInterface& aCFContext, |
|
61 MCFActionInterface& aCFAction, |
|
62 MCFScriptInterface& aScriptInterface ); |
|
63 |
|
64 protected: // Data |
|
65 |
|
66 // Ref: |
|
67 MCFExtendedContextInterface& iCFContext; |
|
68 |
|
69 // Ref: |
|
70 MCFActionInterface& iCFAction; |
|
71 |
|
72 // Ref: |
|
73 MCFScriptInterface& iCFScriptInterface; |
|
74 }; |
|
75 |
|
76 #endif // C_CFMESSAGEHANDLERBASE_H |