|
1 // Copyright (c) 2002-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 // |
|
15 |
|
16 |
|
17 #ifndef __MMFCUSTOMCOMMANDPARSERMANAGER_H__ |
|
18 #define __MMFCUSTOMCOMMANDPARSERMANAGER_H__ |
|
19 |
|
20 /** |
|
21 @publishedPartner |
|
22 @released |
|
23 |
|
24 Class to manage custom command parsers. |
|
25 |
|
26 An object of this type is owned by the controller framework to contain all the custom command |
|
27 parsers for the controller plugin. |
|
28 |
|
29 @since 7.0s |
|
30 */ |
|
31 class CMMFCustomCommandParserManager : public CBase |
|
32 { |
|
33 public: |
|
34 /** |
|
35 Factory constructor. |
|
36 |
|
37 @return A pointer to the newly created object. |
|
38 |
|
39 @since 7.0s |
|
40 */ |
|
41 IMPORT_C static CMMFCustomCommandParserManager* NewL(); |
|
42 |
|
43 /** |
|
44 Destructor. |
|
45 |
|
46 Deletes all custom command parsers added to the manager. |
|
47 |
|
48 @since 7.0s |
|
49 */ |
|
50 IMPORT_C ~CMMFCustomCommandParserManager(); |
|
51 |
|
52 /** |
|
53 Attempts to find a custom command parser capable of handling the message. |
|
54 |
|
55 @param aMessage |
|
56 The message to be handled. |
|
57 |
|
58 @return A boolean indicating in the message has been handled. ETrue if the message has been handled, EFalse |
|
59 if it has not. |
|
60 |
|
61 @since 7.0s |
|
62 */ |
|
63 IMPORT_C TBool HandleRequest(TMMFMessage& aMessage); |
|
64 |
|
65 /** |
|
66 Adds a custom command parser to the manager. The manager takes ownership of the parser. |
|
67 |
|
68 Note: |
|
69 This method will leave if it fails to add the parser. If it does leave, ownership |
|
70 of the parser will remain with the caller. |
|
71 |
|
72 @param aParser |
|
73 A reference to the parser to be added to the manager. |
|
74 |
|
75 @since 7.0s |
|
76 */ |
|
77 IMPORT_C void AddCustomCommandParserL(CMMFCustomCommandParserBase& aParser); |
|
78 private: |
|
79 CMMFCustomCommandParserManager(); |
|
80 private: |
|
81 /** |
|
82 The array of custom command parsers. |
|
83 */ |
|
84 RPointerArray<CMMFCustomCommandParserBase> iParsers; |
|
85 }; |
|
86 |
|
87 #endif __MMFCUSTOMCOMMANDPARSERMANAGER_H__ |