1 /* |
|
2 * Copyright (c) 2010 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: Device Info Extension Data Container Plugin header file. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__ |
|
19 #define __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__ |
|
20 |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <ecom/ecom.h> |
|
25 #include <ecom/ecomresolverparams.h> |
|
26 |
|
27 // CONSTANTS |
|
28 const TUid KExtDataContainerInterfaceUid = { 0x2002DC7C }; |
|
29 |
|
30 // CLASS DEFINITION |
|
31 /** |
|
32 * Interface definition for Device Info Extension Data Container plugin |
|
33 */ |
|
34 class CNSmlDevInfExtDataContainerPlugin : public CBase |
|
35 { |
|
36 |
|
37 public: // Constructor & Destructor |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 */ |
|
42 virtual ~CNSmlDevInfExtDataContainerPlugin(); |
|
43 |
|
44 /** |
|
45 * Constructor for plugin instantiation |
|
46 */ |
|
47 static CNSmlDevInfExtDataContainerPlugin* NewL(); |
|
48 |
|
49 public: // Pure virtual methods to be implemented by the actual plugins |
|
50 /** |
|
51 * Resolve number of device info extensions <Ext> |
|
52 * |
|
53 * @return Number of extensions |
|
54 */ |
|
55 virtual TInt GetExtensionCountL() = 0; |
|
56 |
|
57 /** |
|
58 * Resolve name <XNam> of the extension in the given extension index. |
|
59 * The number of extensions supported can be deduced using |
|
60 * GetExtensionCountL() method. If the method is called with an index |
|
61 * out of range (i.e. negative value or value greater than/equal to |
|
62 * the value returned by GetExtensionCountL()), the method should |
|
63 * leave with KErrArgument. |
|
64 * |
|
65 * Note that any extension has one <XNam> field. |
|
66 * |
|
67 * @param aExtIndex Index of the extension to be returned. |
|
68 * @return Name of the extension |
|
69 */ |
|
70 virtual const TDesC8& GetExtNameL( TInt aExtIndex ) = 0; |
|
71 |
|
72 /** |
|
73 * Resolve number of values related to particular extension. If the |
|
74 * method is called with an index out of range (i.e. negative value |
|
75 * or value greater than/equal to the value returned by |
|
76 * GetExtensionCountL()), the method should leave with KErrArgument. |
|
77 * |
|
78 * Note that any extension can have 0...n number of values |
|
79 * |
|
80 * @param aExtIndex Index of an extension |
|
81 * @return Number of available values |
|
82 */ |
|
83 virtual TInt GetExtValueCountL( TInt aExtIndex ) = 0; |
|
84 |
|
85 /** |
|
86 * Resolve <XVal> field of an extension. If the method is called |
|
87 * with illegal index values (i.e. negative value or with non-existent |
|
88 * index), the method should leave with KErrArgument. |
|
89 * |
|
90 * @param aExtIndex Index of an extension |
|
91 * @param aValueIndex Index of a value related to particular extension |
|
92 * @return Value on textual format |
|
93 */ |
|
94 virtual const TDesC8& GetExtValueL( |
|
95 TInt aExtIndex, TInt aValueIndex ) = 0; |
|
96 |
|
97 private: |
|
98 TUid iDtor_ID_Key; // Instance identifier key |
|
99 }; |
|
100 |
|
101 #include "nsmldevinfextdatacontainerplugin.inl" // Base implementations for ECOM |
|
102 |
|
103 #endif // __NSMLDEVINFEXTDATACONTAINERPLUGIN_H__ |
|