|
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: Tool for resolving local or remote items |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef UPNPITEMRESOLVER_H |
|
24 #define UPNPITEMRESOLVER_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MUPnPAVController; |
|
31 class MUPnPAVBrowsingSession; |
|
32 class MUPnPResourceSelector; |
|
33 class MUPnPItemResolverObserver; |
|
34 class CUpnpItem; |
|
35 class CUpnpElement; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * An interface for resolving either remote or local content. |
|
41 * The interface takes in some identification of the content, |
|
42 * resolves the content and asynchronously notifies when the |
|
43 * content is available. The content itself is provided by |
|
44 * CUpnpItem, which contains item metadata, resource and URI, |
|
45 * and it can be used directly in AVController interface to |
|
46 * play content on remote renderer or download content. |
|
47 * |
|
48 * @lib upnpavcontrollerhelper.lib |
|
49 * @since S60 3.2 |
|
50 */ |
|
51 class MUPnPItemResolver |
|
52 { |
|
53 |
|
54 public: // construction/destruction |
|
55 |
|
56 |
|
57 /** |
|
58 * virtual destructor |
|
59 * for deleting the resolver implementation using the API pointer |
|
60 */ |
|
61 virtual ~MUPnPItemResolver() {} |
|
62 |
|
63 |
|
64 public: // the interface |
|
65 |
|
66 /** |
|
67 * Starts resolving an object id using given session. |
|
68 * given Callback is notified when result objects are available, |
|
69 * or in case of an error. |
|
70 * @since S60 3.2 |
|
71 * @param aObserver interface that will receive result callback |
|
72 * @param aSelector selects the desider resource |
|
73 */ |
|
74 virtual void ResolveL( |
|
75 MUPnPItemResolverObserver& aObserver ) = 0; |
|
76 |
|
77 /** |
|
78 * access to the resolved item. |
|
79 * Note that if the object represents an item, it is not necessarily |
|
80 * safe to query the resource in this item, instead you should use |
|
81 * this item to query all metadata. |
|
82 * Use this method after receiving MetadataBrowseComplete( KErrNone ) |
|
83 * @return reference to the item with the given ID |
|
84 */ |
|
85 virtual const CUpnpItem& Item() const = 0; |
|
86 |
|
87 /** |
|
88 * access to the pointed item's resource. |
|
89 * The resource may be in the original or in the pointed item. |
|
90 * This is the easiest and recommended way for accessing the |
|
91 * resource. |
|
92 * example: |
|
93 * const TDesC& uri = browseUtil->Res().Value(); |
|
94 * Use this method after receiving MetadataBrowseComplete( KErrNone ) |
|
95 * @return reference to the upnp element of <res> type. |
|
96 */ |
|
97 virtual const CUpnpElement& Resource() const = 0; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // UPNPITEMRESOLVER_H |
|
102 |
|
103 // End of File |