|
1 /* |
|
2 * Copyright (c) 2007 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: |
|
15 * Defines sdk extended capabilities |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __EXTENDEDMTMIDS_HRH__ |
|
22 #define __EXTENDEDMTMIDS_HRH__ |
|
23 |
|
24 /** |
|
25 * UIDs for quering capabilities from MTMs (CBaseMtmUiData) |
|
26 * |
|
27 * How to use: |
|
28 * |
|
29 * @code |
|
30 * #include <ExtendedMTMIDS.hrh> |
|
31 * |
|
32 * TInt CMyMtmUiData::QueryCapability( TUid aFunctionId, TInt& aResponse ) const |
|
33 * { |
|
34 * ... |
|
35 * switch ( aFunctionId.iUid ) |
|
36 * { |
|
37 * // MTM supports linked attachments: |
|
38 * case KUidMsvMtmQuerySupportLinks: |
|
39 * { |
|
40 * aResponse = ETrue; |
|
41 * return KErrNone; |
|
42 * } |
|
43 * // MTM supports service validation: |
|
44 * case KUidMsvMtmQuerySupportValidateService: |
|
45 * { |
|
46 * aResponse = ETrue; |
|
47 * return KErrNone; |
|
48 * } |
|
49 * // MTM supports editor: |
|
50 * case KUidMsvMtmQuerySupportEditor: |
|
51 * { |
|
52 * aResponse = ETrue; |
|
53 * return KErrNone; |
|
54 * } |
|
55 * ... |
|
56 * } |
|
57 * ... |
|
58 * } |
|
59 * @endcode |
|
60 * |
|
61 */ |
|
62 #define KUidMsvMtmQuerySupportLinks 0x100059D4 // response true/false |
|
63 #define KUidMsvMtmQuerySupportValidateService 0x10005A11 // response true/false |
|
64 #define KUidMsvMtmQuerySupportEditor 0x101FD692 // response true/false |
|
65 |
|
66 |
|
67 /** |
|
68 * Function ids for custom MTM commands |
|
69 * |
|
70 * For MTM specific command ids use consecutive numbering starting from |
|
71 * KMtmUiFirstFreeMtmSpecificFunction. |
|
72 * |
|
73 * How to use: |
|
74 * |
|
75 * Define custom commands in resources: |
|
76 * |
|
77 * @code |
|
78 * |
|
79 * RESOURCE MTUD_FUNCTION_ARRAY r_my_mtm_function_array |
|
80 * { |
|
81 * functions = |
|
82 * { |
|
83 * // Settings to be shown in Message Center |
|
84 * MTUD_FUNCTION |
|
85 * { |
|
86 * functiontext = "My settings"; |
|
87 * command = KMtmUiMceSettings; |
|
88 * flags = EMtudCommandTransferSend; |
|
89 * } |
|
90 * // Settings wizard to be shown in Email Wizard UI |
|
91 * MTUD_FUNCTION |
|
92 * { |
|
93 * functiontext = "My wizard"; |
|
94 * command = KMtmUiFunctionSettingsWizard; |
|
95 * flags = EMtudCommandTransferSend; |
|
96 * } |
|
97 * ... |
|
98 * } |
|
99 * } |
|
100 * |
|
101 * @endcode |
|
102 * |
|
103 * Implement functionality in the UI MTM (CBaseMtmUi) |
|
104 * |
|
105 * @code |
|
106 * void CMyMtmUi::InvokeSyncFunctionL( TInt aFunctionId, |
|
107 * const CMsvEntrySelection& aSelection, |
|
108 * TDes8& aParameter) |
|
109 * { |
|
110 * switch ( aFunctionId ) |
|
111 * { |
|
112 * case KMtmUiFunctionValidateService: |
|
113 * { |
|
114 * // Validate service |
|
115 * ... |
|
116 * // Service valid |
|
117 * TPckgBuf<TInt> resultPackage( KErrNone ); |
|
118 * aParameter.Copy( resultPackage ); |
|
119 * break; |
|
120 * } |
|
121 * case KMtmUiFunctionSettingsWizard: |
|
122 * { |
|
123 * // Show settings wizard |
|
124 * ... |
|
125 * // Wizard completed successfully |
|
126 * TPckgBuf<TInt> resultPackage( 1 ); |
|
127 * aParameter.Copy( resultPackage ); |
|
128 * break; |
|
129 * } |
|
130 * } |
|
131 * } |
|
132 * |
|
133 * @endcode |
|
134 * |
|
135 * "KMtmUiMceSettings" command is handled in a special way. The MTUD_FUNCTION is only |
|
136 * used for registration purposes. The actual settings dialog is launched by |
|
137 * calling "CBaseMtmUi::EditL" for the service entry of the corresponding MTM. |
|
138 * |
|
139 * @code |
|
140 * |
|
141 * CMsvOperation* CMyMtmUi::EditL( TRequestStatus& aStatus ) |
|
142 * { |
|
143 * switch ( iBaseMtm.Entry().Entry().iType.iUid ) |
|
144 * { |
|
145 * case KUidMsvServiceEntryValue: |
|
146 * { |
|
147 * // Open settings dialog |
|
148 * return OpenServiceSettingsDialogOperationL( aStatus ); |
|
149 * } |
|
150 * ... |
|
151 * } |
|
152 * } |
|
153 * |
|
154 * @endcode |
|
155 */ |
|
156 #define KMtmUiMceSettings 0x00203004 |
|
157 #define KMtmUiFunctionValidateService 0x00203006 |
|
158 #define KMtmUiFunctionSettingsWizard 0x00203013 |
|
159 #define KMtmUiFirstFreeMtmSpecificFunction 0x00300000 |
|
160 |
|
161 #endif // __EXTENDEDMTMIDS_HRH__ |
|
162 |
|
163 // End of file |