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 UpnpAiwPlayOnExternalMenuService. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _UPNP_AIW_PLAY_ON_EXTERNAL_MENU_SERVICE_H |
|
20 #define _UPNP_AIW_PLAY_ON_EXTERNAL_MENU_SERVICE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AiwServiceIfMenu.h> |
|
24 #include "upnpaiwengineobserver.h" |
|
25 |
|
26 // FUNCTION PROTOTYPES |
|
27 class CUPnPAiwEngine; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CUPnPAiwPlayOnExternalMenuService |
|
33 * The class implements the "Play on external" menu service of the |
|
34 * UPnP AIW Media Provider. |
|
35 * @since Series S60 3.0 |
|
36 */ |
|
37 class CUPnPAiwPlayOnExternalMenuService : public CAiwServiceIfMenu, |
|
38 public MUPnPAiwEngineObserver |
|
39 { |
|
40 |
|
41 public: // Constructors and destructor |
|
42 |
|
43 // Two-phased constructor. |
|
44 static CUPnPAiwPlayOnExternalMenuService* NewL(); |
|
45 |
|
46 // Destructor. |
|
47 virtual ~CUPnPAiwPlayOnExternalMenuService(); |
|
48 |
|
49 public: // Methods from the CAiwServiceIfMenu |
|
50 |
|
51 // Unnecessary methods |
|
52 void InitialiseL( MAiwNotifyCallback& /*aFrameworkCallback*/, |
|
53 const RCriteriaArray& /*aInterest*/ ) {} |
|
54 void HandleServiceCmdL( |
|
55 const TInt& /*aCmdId*/, |
|
56 const CAiwGenericParamList& /*aInParamList*/, |
|
57 CAiwGenericParamList& /*aOutParamList*/, |
|
58 TUint /*aCmdOptions*/, |
|
59 const MAiwNotifyCallback* /*aCallback*/ ) {} |
|
60 |
|
61 /** |
|
62 * Initialises menu pane by adding provider specific menu items. |
|
63 * The AIW Framework gives the parameters to be used in addition. |
|
64 * @param aMenuPane Menu pane handle |
|
65 * @param aIndex position of item where to add menu items. |
|
66 * @param aCascadeId ID of cascade menu item. |
|
67 * @param aInParamList input parameter list for provider's parameters |
|
68 * checking |
|
69 */ |
|
70 void InitializeMenuPaneL( CAiwMenuPane& aMenuPane, |
|
71 TInt aIndex, |
|
72 TInt aCascadeId, |
|
73 const CAiwGenericParamList& aInParamList); |
|
74 |
|
75 /** |
|
76 * Handle a menu command invoked by the Handler. |
|
77 * @param aMenuCmdId Command ID for the menu command, |
|
78 * defined by the provider when adding the menu commands. |
|
79 * @param aInParamList Input parameters, could be empty list |
|
80 * @param aOutParamList Output parameters, could be empty list |
|
81 * @param aCmdOptions Options for the command, see KAiwCmdOpt* |
|
82 * constants. |
|
83 * @param aCallback callback if asynchronous command handling is wanted |
|
84 * by consumer.The provider may or may not support this, leaves |
|
85 * with KErrNotSupported, it not. |
|
86 */ |
|
87 void HandleMenuCmdL( TInt aMenuCmdId, |
|
88 const CAiwGenericParamList& aInParamList, |
|
89 CAiwGenericParamList& aOutParamList, |
|
90 TUint aCmdOptions = 0, |
|
91 const MAiwNotifyCallback* aCallback = NULL); |
|
92 |
|
93 public: // MUPnPAiwEngineObserver |
|
94 |
|
95 /** |
|
96 * Indicates that the play operation is complete. |
|
97 * |
|
98 * @since Series 60 3.0 |
|
99 * @param aStatus status information |
|
100 * @return None |
|
101 */ |
|
102 void PlayCompleteL( TInt aStatus ); |
|
103 |
|
104 /** |
|
105 * Indicates that the connection with the target UPnP |
|
106 * device has been lost. |
|
107 * |
|
108 * @since Series 60 3.0 |
|
109 * @param None |
|
110 * @return None |
|
111 */ |
|
112 void ConnectionLostL(); |
|
113 |
|
114 private: // private methods |
|
115 |
|
116 /** |
|
117 * Deletes the contents of the iFileNames pointer array |
|
118 * |
|
119 * @since Series 60 3.0 |
|
120 * @param None |
|
121 * @returns None |
|
122 */ |
|
123 void EmptyFileNameArray(); |
|
124 |
|
125 private: // construction |
|
126 |
|
127 // Constructor |
|
128 CUPnPAiwPlayOnExternalMenuService(); |
|
129 |
|
130 // ConstructL |
|
131 void ConstructL(); |
|
132 |
|
133 private: // Data members |
|
134 |
|
135 // reference to the engine component |
|
136 CUPnPAiwEngine* iEngine; // not owned (singleton) |
|
137 |
|
138 // reference to the client (call back reference) |
|
139 MAiwNotifyCallback* iClient; // not owned |
|
140 |
|
141 // The list of file names received as a parameter |
|
142 RPointerArray<TDesC16> iFileNames; // owned |
|
143 |
|
144 // Filename of the file that is played |
|
145 HBufC16* iFileName; // owned |
|
146 }; |
|
147 |
|
148 #endif // _UPNP_AIW_PLAY_ON_EXTERNAL_MENU_SERVICE_H |
|
149 |
|
150 // End of file |
|