|
1 /* |
|
2 * Copyright (c) 2006 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: AVController interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef M_UPNPAVCONTROLLER_H |
|
24 #define M_UPNPAVCONTROLLER_H |
|
25 |
|
26 // INCLUDE FILES |
|
27 #include <e32std.h> |
|
28 #include "upnpavcontrollerglobals.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class MUPnPAVDeviceObserver; |
|
32 class CUpnpAVDeviceList; |
|
33 class CUpnpAVDevice; |
|
34 class MUPnPAVBrowsingSession; |
|
35 class MUPnPAVRenderingSession; |
|
36 class MUPnPFileUploadSession; |
|
37 class MUPnPFileDownloadSession; |
|
38 |
|
39 /** |
|
40 * Defines the AV Controller interface |
|
41 * |
|
42 * This class defines the AV Controller interface. Provides methods to |
|
43 * get devices and to start and stop rendering and browsing sessions. |
|
44 * |
|
45 * @lib upnpavcontrollerclient.lib |
|
46 * @since S60 v3.1 |
|
47 */ |
|
48 class MUPnPAVController |
|
49 { |
|
50 |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Sets Device observer instance |
|
55 * |
|
56 * @since Series 60 3.1 |
|
57 * @param aInstance MUPnPAVDeviceObserver instance of the class that |
|
58 * implements the IF |
|
59 * @return TInt status |
|
60 */ |
|
61 virtual void SetDeviceObserver( MUPnPAVDeviceObserver& aObserver ) = 0; |
|
62 |
|
63 /** |
|
64 * Removes Device observer instance |
|
65 * |
|
66 * @since Series 60 3.1 |
|
67 * @param None |
|
68 * @return None |
|
69 */ |
|
70 virtual void RemoveDeviceObserver() = 0; |
|
71 |
|
72 /** |
|
73 * Returns Device observer instance |
|
74 * |
|
75 * @since Series 60 3.1 |
|
76 * @param None |
|
77 * @return observer pointer |
|
78 */ |
|
79 virtual MUPnPAVDeviceObserver* DeviceObserver() = 0; |
|
80 |
|
81 /** |
|
82 * Start a browsing session with a media server |
|
83 * |
|
84 * @since Series 60 3.1 |
|
85 * @param aDevice media server |
|
86 * @return session reference |
|
87 */ |
|
88 virtual MUPnPAVBrowsingSession& StartBrowsingSessionL( |
|
89 const CUpnpAVDevice& aDevice ) = 0; |
|
90 |
|
91 /** |
|
92 * Stop a browsing session with a media server |
|
93 * |
|
94 * @since Series 60 3.1 |
|
95 * @param aSession session reference |
|
96 * @return None |
|
97 */ |
|
98 virtual void StopBrowsingSession( MUPnPAVBrowsingSession& aSession ) = 0; |
|
99 |
|
100 /** |
|
101 * Start a rendering session with a media renderer |
|
102 * |
|
103 * @since Series 60 3.1 |
|
104 * @param aDevice media renderer |
|
105 * @return session reference |
|
106 */ |
|
107 virtual MUPnPAVRenderingSession& StartRenderingSessionL( |
|
108 const CUpnpAVDevice& aDevice ) = 0; |
|
109 |
|
110 /** |
|
111 * Stop a rendering session with a media server |
|
112 * |
|
113 * @since Series 60 3.1 |
|
114 * @param aSession session reference |
|
115 * @return None |
|
116 */ |
|
117 virtual void StopRenderingSession( |
|
118 MUPnPAVRenderingSession& aSession ) = 0; |
|
119 |
|
120 /** |
|
121 * Start an upload session with a media server |
|
122 * |
|
123 * @since Series 60 3.1 |
|
124 * @param aDevice media renderer |
|
125 * @return session reference |
|
126 */ |
|
127 virtual MUPnPFileUploadSession& StartUploadSessionL( |
|
128 const CUpnpAVDevice& aDevice ) = 0; |
|
129 |
|
130 /** |
|
131 * Stop an upload session |
|
132 * |
|
133 * @since Series 60 3.1 |
|
134 * @param aSession session reference |
|
135 * @return None |
|
136 */ |
|
137 virtual void StopUploadSession( |
|
138 MUPnPFileUploadSession& aSession ) = 0; |
|
139 |
|
140 /** |
|
141 * Start a download session with a media server |
|
142 * |
|
143 * @since Series 60 3.1 |
|
144 * @param aDevice media renderer |
|
145 * @return session reference |
|
146 */ |
|
147 virtual MUPnPFileDownloadSession& StartDownloadSessionL( |
|
148 const CUpnpAVDevice& aDevice ) = 0; |
|
149 |
|
150 /** |
|
151 * Stop a download session |
|
152 * |
|
153 * @since Series 60 3.1 |
|
154 * @param aSession session reference |
|
155 * @return None |
|
156 */ |
|
157 virtual void StopDownloadSession( |
|
158 MUPnPFileDownloadSession& aSession ) = 0; |
|
159 |
|
160 // ======================================================= |
|
161 // DEVICE CONTROL METHODS |
|
162 // ======================================================= |
|
163 public: |
|
164 |
|
165 /** |
|
166 * Gets the list of online Media Server devices. |
|
167 * |
|
168 * The client must release the memory allocated for the items |
|
169 * in the array. |
|
170 * |
|
171 * @since Series 60 3.1 |
|
172 * @param none |
|
173 * @return device list |
|
174 */ |
|
175 virtual CUpnpAVDeviceList* GetMediaServersL() = 0; |
|
176 |
|
177 /** |
|
178 * Gets the list of online Media Renderer devices. |
|
179 * |
|
180 * The client must release the memory allocated for the items |
|
181 * in the array. |
|
182 * |
|
183 * @since Series 60 3.1 |
|
184 * @param none |
|
185 * @return device list |
|
186 */ |
|
187 virtual CUpnpAVDeviceList* GetMediaRenderersL() = 0; |
|
188 |
|
189 public: // Destructor |
|
190 |
|
191 /** |
|
192 * Destructor |
|
193 * DEPRACATED, usage of Release() recommended. Will be removed in the |
|
194 * future. Safe deletion is not guaranteed. |
|
195 * |
|
196 * @since Series 60 3.1 |
|
197 */ |
|
198 virtual ~MUPnPAVController() {}; |
|
199 |
|
200 /** |
|
201 * Destructor. Ensures safe deletion (also during WLAN disconnection). |
|
202 * |
|
203 * @since Series 60 3.2 |
|
204 */ |
|
205 virtual void Release() = 0; |
|
206 }; |
|
207 |
|
208 |
|
209 #endif // M_UPNPAVCONTROLLER_H |