|
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 - factory |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef UPNPITEMRESOLVERFACTORY_H |
|
24 #define UPNPITEMRESOLVERFACTORY_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MUPnPItemResolver; |
|
31 class MUPnPAVController; |
|
32 class MUPnPAVBrowsingSession; |
|
33 class MUPnPResourceSelector; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Factory class for constructing MUPnPItemResolver |
|
39 * implementations. This class only contains static methods. |
|
40 * |
|
41 * @lib upnpavcontrollerhelper.lib |
|
42 * @since S60 3.2 |
|
43 */ |
|
44 class UPnPItemResolverFactory |
|
45 { |
|
46 |
|
47 public: // construction/destruction |
|
48 |
|
49 /** |
|
50 * The optimisation flags |
|
51 */ |
|
52 enum TResolverOptimisationFlags |
|
53 { |
|
54 ENoOptimisation = 0x0000, |
|
55 // this is the default |
|
56 EOmitLocalMSStart = 0x0001, |
|
57 // do not start local MS (in this case it must |
|
58 // already started and kept alive the whole time |
|
59 EOmitDrmCheck = 0x0002 |
|
60 // do not check for file protection (in this case |
|
61 // protection check must have been done before) |
|
62 }; |
|
63 |
|
64 /** |
|
65 * Creates a resolver for remote content |
|
66 * @param aItemId the item ID to resolve into an item |
|
67 * @param aHostSession the session where to resolve items |
|
68 * @param aSelector selects the desider resource |
|
69 * @param aBrowseFilter filter to be used in browse |
|
70 * @param aOptimisationFlags flags to optimise resolver behaviour |
|
71 * @return instance of RemoteItemResolver |
|
72 */ |
|
73 IMPORT_C static MUPnPItemResolver* NewRemoteItemResolverL( |
|
74 const TDesC8& aItemId, |
|
75 MUPnPAVBrowsingSession& aHostSession, |
|
76 MUPnPResourceSelector& aSelector, |
|
77 const TDesC8& aBrowseFilter, |
|
78 TInt aOptimisationFlags = ENoOptimisation ); |
|
79 |
|
80 /** |
|
81 * Creates a resolver for local content |
|
82 * @param aFilePath the local file to be resolved into an item |
|
83 * @param aAvController AVController resource to reserve local media server |
|
84 * @param aSelector selects the desider resource |
|
85 * @param aOptimisationFlags flags to optimise resolver behaviour |
|
86 * @return instance of RemoteItemResolver |
|
87 */ |
|
88 IMPORT_C static MUPnPItemResolver* NewLocalItemResolverL( |
|
89 const TDesC& aFilePath, |
|
90 MUPnPAVController& aAvController, |
|
91 MUPnPResourceSelector& aSelector, |
|
92 TInt aOptimisationFlags = ENoOptimisation ); |
|
93 |
|
94 /** |
|
95 * Creates a resolver for remote content that will be resolved and |
|
96 * then downloaded to a temporary file in local file system |
|
97 * @param aItemId the item ID to resolve into an item |
|
98 * @param aAvController AVController resource to reserve local media server |
|
99 * @param aHostSession the session where to resolve items |
|
100 * @param aSelector selects the desider resource |
|
101 * @param aBrowseFilter filter to be used in browse |
|
102 * @param aOptimisationFlags flags to optimise resolver behaviour |
|
103 * @return instance of RemoteItemResolver |
|
104 */ |
|
105 IMPORT_C static MUPnPItemResolver* NewDownloadItemResolverL( |
|
106 const TDesC8& aItemId, |
|
107 MUPnPAVController& aAvController, |
|
108 MUPnPAVBrowsingSession& aHostSession, |
|
109 MUPnPResourceSelector& aSelector, |
|
110 const TDesC8& aBrowseFilter, |
|
111 TInt aOptimisationFlags = ENoOptimisation ); |
|
112 |
|
113 }; |
|
114 |
|
115 #endif // UPNPITEMRESOLVERFACTORY_H |
|
116 |
|
117 // End of File |