1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
|
23 |
|
24 #include <remcondatabaseunawaremediabrowsetarget.h> |
|
25 |
|
26 EXPORT_C CRemConDatabaseUnawareMediaBrowseTarget* CRemConDatabaseUnawareMediaBrowseTarget::NewL( |
|
27 CRemConInterfaceSelector& aInterfaceSelector, |
|
28 MRemConDatabaseUnawareMediaLibraryBrowseObserver& aMlObserver, |
|
29 MRemConDatabaseUnawareNowPlayingBrowseObserver& aNpObserver, |
|
30 TBool aSearchSupported, |
|
31 MRemConDatabaseUnawareMediaLibraryBrowse*& aMlInterface, |
|
32 MRemConDatabaseUnawareNowPlayingBrowse*& aNpInterface) |
|
33 { |
|
34 CRemConDatabaseUnawareMediaBrowseTarget* self = new(ELeave)CRemConDatabaseUnawareMediaBrowseTarget( |
|
35 aInterfaceSelector, aMlObserver, aNpObserver, aMlInterface, aNpInterface); |
|
36 CleanupStack::PushL(self); |
|
37 self->ConstructL(aSearchSupported); |
|
38 CleanupStack::Pop(self); |
|
39 return self; |
|
40 } |
|
41 |
|
42 CRemConDatabaseUnawareMediaBrowseTarget::CRemConDatabaseUnawareMediaBrowseTarget( |
|
43 CRemConInterfaceSelector& aInterfaceSelector, |
|
44 MRemConDatabaseUnawareMediaLibraryBrowseObserver& aMlObserver, |
|
45 MRemConDatabaseUnawareNowPlayingBrowseObserver& aNpObserver, |
|
46 MRemConDatabaseUnawareMediaLibraryBrowse*& aMlInterface, |
|
47 MRemConDatabaseUnawareNowPlayingBrowse*& aNpInterface) |
|
48 : CRemConMediaBrowseTargetBase(aInterfaceSelector, aMlObserver, aNpObserver) |
|
49 { |
|
50 aMlInterface = this; |
|
51 aNpInterface = this; |
|
52 } |
|
53 |
|
54 void CRemConDatabaseUnawareMediaBrowseTarget::ConstructL( |
|
55 TBool aSearchSupported) |
|
56 { |
|
57 BaseConstructL(aSearchSupported); |
|
58 } |
|
59 |
|
60 CRemConDatabaseUnawareMediaBrowseTarget::~CRemConDatabaseUnawareMediaBrowseTarget() |
|
61 { |
|
62 } |
|
63 |
|
64 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoFolderListing( |
|
65 const TArray<TRemConItem>& aFolderListing, |
|
66 TUint aResult) |
|
67 { |
|
68 DoFolderListing(aFolderListing, 0, aResult); |
|
69 } |
|
70 |
|
71 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoFolderUpResult( |
|
72 TUint aItemCount, TInt aResult) |
|
73 { |
|
74 DoFolderUpResult(aItemCount, aResult); |
|
75 } |
|
76 |
|
77 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoFolderDownResult( |
|
78 TUint aItemCount, TInt aResult) |
|
79 { |
|
80 DoFolderDownResult(aItemCount, aResult); |
|
81 } |
|
82 |
|
83 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoGetPathResult( |
|
84 TUint aItemCount, |
|
85 TInt aResult) |
|
86 { |
|
87 DoGetPathResult(aItemCount, 0, aResult); |
|
88 } |
|
89 |
|
90 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoSearchResult( |
|
91 TUint aNumberItemsFound, |
|
92 TInt aResult) |
|
93 { |
|
94 DoSearchResult(aNumberItemsFound, 0, aResult); |
|
95 } |
|
96 |
|
97 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoMediaLibraryStateChange() |
|
98 { |
|
99 DoMediaLibraryStateChange(0); |
|
100 } |
|
101 |
|
102 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoFolderItemResult( |
|
103 const TRemConItemUid& aFolderID, |
|
104 const TDesC8& aFolderName, |
|
105 TFolderItemType aFolderType, |
|
106 TFolderItemPlayable aPlayable, |
|
107 const TArray<TMediaElementAttribute>& aAttributes, |
|
108 TInt aResult) |
|
109 { |
|
110 DoFolderItemResult(aFolderID,aFolderName, aFolderType, aPlayable, aAttributes, aResult); |
|
111 } |
|
112 |
|
113 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdumlbDoMediaElementItemResult( |
|
114 const TRemConItemUid& aMediaID, |
|
115 const TDesC8& aMediaName, |
|
116 TMediaItemType aMediaType, |
|
117 const TArray<TMediaElementAttribute>& aAttributes, |
|
118 TInt aResult) |
|
119 { |
|
120 DoMediaElementItemResult(aMediaID, aMediaName, aMediaType, aAttributes, aResult); |
|
121 } |
|
122 |
|
123 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdunpbDoFolderListing( |
|
124 const TArray<TRemConItem>& aFolderListing, |
|
125 TUint aResult) |
|
126 { |
|
127 DoFolderListing(aFolderListing, 0, aResult); |
|
128 } |
|
129 |
|
130 void CRemConDatabaseUnawareMediaBrowseTarget::MrcdunpbDoMediaElementItemResult( |
|
131 const TRemConItemUid& aMediaID, |
|
132 const TDesC8& aMediaName, |
|
133 TMediaItemType aMediaType, |
|
134 const TArray<TMediaElementAttribute>& aAttributes, |
|
135 TInt aResult) |
|
136 { |
|
137 DoMediaElementItemResult(aMediaID, aMediaName, aMediaType, aAttributes, aResult); |
|
138 } |
|
139 |
|