|
1 /* |
|
2 * Copyright (c) 2005-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: Header file for the UpnpAiwEnableExternalService. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _UPNP_AIW_ENABLE_EXTERNAL_SERVICE_H |
|
20 #define _UPNP_AIW_ENABLE_EXTERNAL_SERVICE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AiwServiceIfMenu.h> |
|
24 |
|
25 // FUNCTION PROTOTYPES |
|
26 class CUPnPAiwEngine; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * CUPnPAiwEnableExternalService |
|
32 * The class implements the "Enable external" service of the |
|
33 * UPnP AIW Media Provider. |
|
34 * @since Series S60 3.0 |
|
35 */ |
|
36 class CUPnPAiwEnableExternalService : public CAiwServiceIfMenu |
|
37 { |
|
38 |
|
39 public: // Constructors and destructor |
|
40 |
|
41 // Two-phased constructor. |
|
42 static CUPnPAiwEnableExternalService* NewL(); |
|
43 |
|
44 // Destructor. |
|
45 virtual ~CUPnPAiwEnableExternalService(); |
|
46 |
|
47 public: // Methods from the CAiwServiceIfMenu |
|
48 |
|
49 // Unnecessary method |
|
50 void InitialiseL( MAiwNotifyCallback& /*aFrameworkCallback*/, |
|
51 const RCriteriaArray& /*aInterest*/) {} |
|
52 |
|
53 /** |
|
54 * Executes generic service commands included in criteria. |
|
55 * @param aCmdId Command to be executed |
|
56 * @param aInParamList Input parameters, can be an empty list |
|
57 * @param aOutParamList Output parameters, can be an empty list |
|
58 * @param aCmdOptions Options for the command, see KAiwCmdOpt* |
|
59 * constants. |
|
60 * @param aCallback callback for asynchronous command handling, |
|
61 * parameter checking, etc. |
|
62 * @see enum TServiceCmdOptions in GENERICPARAM.HRH |
|
63 * @exception KErrArgument if callback is missing when required. |
|
64 * @exception KErrNotSupported if no provider support service |
|
65 */ |
|
66 void HandleServiceCmdL( const TInt& aCmdId, |
|
67 const CAiwGenericParamList& aInParamList, |
|
68 CAiwGenericParamList& aOutParamList, |
|
69 TUint aCmdOptions = 0, |
|
70 const MAiwNotifyCallback* aCallback = NULL); |
|
71 |
|
72 /** |
|
73 * Initialises menu pane by adding provider specific menu items. |
|
74 * The AIW Framework gives the parameters to be used in addition. |
|
75 * @param aMenuPane Menu pane handle |
|
76 * @param aIndex position of item where to add menu items. |
|
77 * @param aCascadeId ID of cascade menu item. |
|
78 * @param aInParamList input parameter list for provider's parameters |
|
79 * checking |
|
80 */ |
|
81 void InitializeMenuPaneL( CAiwMenuPane& aMenuPane, |
|
82 TInt aIndex, |
|
83 TInt aCascadeId, |
|
84 const CAiwGenericParamList& aInParamList); |
|
85 |
|
86 /** |
|
87 * Handle a menu command invoked by the Handler. |
|
88 * @param aMenuCmdId Command ID for the menu command, |
|
89 * defined by the provider when adding the menu commands. |
|
90 * @param aInParamList Input parameters, could be empty list |
|
91 * @param aOutParamList Output parameters, could be empty list |
|
92 * @param aCmdOptions Options for the command, see KAiwCmdOpt* |
|
93 * constants. |
|
94 * @param aCallback callback if asynchronous command handling is wanted |
|
95 * by consumer. The provider may or may not support this, leaves |
|
96 * with KErrNotSupported, it not. |
|
97 */ |
|
98 void HandleMenuCmdL( TInt aMenuCmdId, |
|
99 const CAiwGenericParamList& aInParamList, |
|
100 CAiwGenericParamList& aOutParamList, |
|
101 TUint aCmdOptions = 0, |
|
102 const MAiwNotifyCallback* aCallback = NULL); |
|
103 |
|
104 private: // construction |
|
105 |
|
106 // Constructor |
|
107 CUPnPAiwEnableExternalService(); |
|
108 |
|
109 // ConstructL |
|
110 void ConstructL(); |
|
111 |
|
112 private: // Data members |
|
113 |
|
114 // reference to the engine component |
|
115 CUPnPAiwEngine* iEngine; // not owned (singleton pointer) |
|
116 |
|
117 // reference to the client (call back reference) |
|
118 MAiwNotifyCallback* iClient; // not owned |
|
119 |
|
120 }; |
|
121 |
|
122 #endif // _UPNP_AIW_ENABLE_EXTERNAL_SERVICE_H |
|
123 |
|
124 // End of file |