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 UpnpAiwPlayOnExternalBaseService. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _UPNP_AIW_PLAY_ON_EXTERNAL_BASE_SERVICE_H |
|
20 #define _UPNP_AIW_PLAY_ON_EXTERNAL_BASE_SERVICE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AiwServiceIfBase.h> |
|
24 #include "upnpaiwengineobserver.h" |
|
25 |
|
26 // FUNCTION PROTOTYPES |
|
27 class CUPnPAiwEngine; |
|
28 class CUpnpDrmFilter; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * CUPnPAiwPlayOnExternalBaseService |
|
34 * The class implements the "Play on external" base service of the |
|
35 * UPnP AIW Media Provider. |
|
36 * @since Series S60 3.0 |
|
37 */ |
|
38 class CUPnPAiwPlayOnExternalBaseService : public CAiwServiceIfBase, |
|
39 public MUPnPAiwEngineObserver |
|
40 { |
|
41 |
|
42 public: // Constructors and destructor |
|
43 |
|
44 // Two-phased constructor. |
|
45 static CUPnPAiwPlayOnExternalBaseService* NewL(); |
|
46 |
|
47 // Destructor. |
|
48 virtual ~CUPnPAiwPlayOnExternalBaseService(); |
|
49 |
|
50 public: // Methods from the CAiwServiceIfBase |
|
51 |
|
52 // Unnecessary method |
|
53 void InitialiseL( MAiwNotifyCallback& /*aFrameworkCallback*/, |
|
54 const RCriteriaArray& /*aInterest*/ ) {} |
|
55 |
|
56 /** |
|
57 * Executes generic service commands included in criteria. |
|
58 * @param aCmdId Command to be executed |
|
59 * @param aInParamList Input parameters, can be an empty list |
|
60 * @param aOutParamList Output parameters, can be an empty list |
|
61 * @param aCmdOptions Options for the command, see KAiwCmdOpt* |
|
62 * constants. |
|
63 * @param aCallback callback for asynchronous command handling, |
|
64 * parameter checking, etc. |
|
65 * @see enum TServiceCmdOptions in GENERICPARAM.HRH |
|
66 * @exception KErrArgument if callback is missing when required. |
|
67 * @exception KErrNotSupported if no provider support service |
|
68 */ |
|
69 void HandleServiceCmdL( const TInt& aCmdId, |
|
70 const CAiwGenericParamList& aInParamList, |
|
71 CAiwGenericParamList& aOutParamList, |
|
72 TUint aCmdOptions = 0, |
|
73 const MAiwNotifyCallback* aCallback = NULL); |
|
74 |
|
75 public: // MUPnPAiwEngineObserver |
|
76 |
|
77 /** |
|
78 * Indicates that the play operation is complete. |
|
79 * |
|
80 * @since Series 60 3.0 |
|
81 * @param aStatus status information |
|
82 * @return None |
|
83 */ |
|
84 void PlayCompleteL( TInt aStatus ); |
|
85 |
|
86 /** |
|
87 * Indicates that the connection with the target UPnP |
|
88 * device has been lost. |
|
89 * |
|
90 * @since Series 60 3.0 |
|
91 * @param None |
|
92 * @return None |
|
93 */ |
|
94 void ConnectionLostL(); |
|
95 |
|
96 private: // private methods |
|
97 |
|
98 /** |
|
99 * Deletes the contents of the iFileNames pointer array |
|
100 * |
|
101 * @since Series 60 3.0 |
|
102 * @param None |
|
103 * @returns None |
|
104 */ |
|
105 void EmptyFileNameArray(); |
|
106 |
|
107 |
|
108 private: // construction |
|
109 |
|
110 // Constructor |
|
111 CUPnPAiwPlayOnExternalBaseService(); |
|
112 |
|
113 // ConstructL |
|
114 void ConstructL(); |
|
115 |
|
116 private: // Data members |
|
117 |
|
118 // reference to the engine component |
|
119 CUPnPAiwEngine* iEngine; // not owned (singleton) |
|
120 |
|
121 // iActiveDrmFilter does the filtering DRM file work |
|
122 CUpnpDrmFilter* iActiveDrmFilter; // owned |
|
123 |
|
124 // reference to the client (call back reference) |
|
125 MAiwNotifyCallback* iClient; // not owned |
|
126 |
|
127 // The list of file names received as a parameter |
|
128 RPointerArray<TDesC16> iFileNames; // owned |
|
129 |
|
130 // Filename of the file that is played |
|
131 HBufC16* iFileName; // owned |
|
132 }; |
|
133 |
|
134 #endif // _UPNP_AIW_PLAY_ON_EXTERNAL_BASE_SERVICE_H |
|
135 |
|
136 // End of file |
|