williamr@4
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
//
|
williamr@4
|
15 |
|
williamr@4
|
16 |
|
williamr@4
|
17 |
|
williamr@4
|
18 |
/**
|
williamr@4
|
19 |
@file
|
williamr@4
|
20 |
@publishedAll
|
williamr@4
|
21 |
@released
|
williamr@4
|
22 |
*/
|
williamr@4
|
23 |
|
williamr@4
|
24 |
#include <e32base.h>
|
williamr@4
|
25 |
#include <remconmediabrowsetypes.h>
|
williamr@4
|
26 |
|
williamr@4
|
27 |
#ifndef REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H
|
williamr@4
|
28 |
#define REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H
|
williamr@4
|
29 |
|
williamr@4
|
30 |
NONSHARABLE_CLASS(MRemConDatabaseAwareMediaLibraryBrowseObserver)
|
williamr@4
|
31 |
{
|
williamr@4
|
32 |
public:
|
williamr@4
|
33 |
/**
|
williamr@4
|
34 |
This requests a list of the items present in a folder. No metadata is
|
williamr@4
|
35 |
requested, that can be retrieved separately on a per item basis.
|
williamr@4
|
36 |
|
williamr@4
|
37 |
The result should be returned via a call to
|
williamr@4
|
38 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderListing(). And
|
williamr@4
|
39 |
the ordering should be as shown locally, but should list folders before
|
williamr@4
|
40 |
media element items.
|
williamr@4
|
41 |
|
williamr@4
|
42 |
@param aScope The scope in which the folder listing is made.
|
williamr@4
|
43 |
This indicates which listing should be returned. If the scope is
|
williamr@4
|
44 |
EBrowseFolder then the contents of the current browsed folder
|
williamr@4
|
45 |
should be returned. If it is the ESearchResultFolder scope then
|
williamr@4
|
46 |
the contents of the folder populated by the last search should be
|
williamr@4
|
47 |
returned.
|
williamr@4
|
48 |
|
williamr@4
|
49 |
@param aStartItem The offset into the folder listing of the first item to
|
williamr@4
|
50 |
retrieve. If there is no media available at this offset the error
|
williamr@4
|
51 |
KErrMediaBrowseInvalidOffset should be returned via the result call
|
williamr@4
|
52 |
to MrcdamlbFolderListing().
|
williamr@4
|
53 |
|
williamr@4
|
54 |
@param aEndItem The offset into the folder listing of the final item to
|
williamr@4
|
55 |
retrieve. If this is beyond the end of the folder listing then the
|
williamr@4
|
56 |
items from the aStartItem offset to the end of the listing should
|
williamr@4
|
57 |
be returned via the result call to MrcdamlbFolderListing().
|
williamr@4
|
58 |
*/
|
williamr@4
|
59 |
virtual void MrcdamlboGetFolderListing(TRemConFolderScope aScope,
|
williamr@4
|
60 |
TUint aStartItem,
|
williamr@4
|
61 |
TUint aEndItem) = 0;
|
williamr@4
|
62 |
|
williamr@4
|
63 |
/**
|
williamr@4
|
64 |
Requests a specific item which may be a folder item or a media element
|
williamr@4
|
65 |
item.
|
williamr@4
|
66 |
|
williamr@4
|
67 |
If it returns KErrNone the client must return the metadata for the
|
williamr@4
|
68 |
requested item through the response function either
|
williamr@4
|
69 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderItemResult()
|
williamr@4
|
70 |
or
|
williamr@4
|
71 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbMediaElementItemResult()
|
williamr@4
|
72 |
according to the item type which is a folder item or media element item.
|
williamr@4
|
73 |
If it is unable to process this call then it can return error but not
|
williamr@4
|
74 |
call the response function.
|
williamr@4
|
75 |
|
williamr@4
|
76 |
@param aScope The scope in which the item is present. If the scope is
|
williamr@4
|
77 |
EBrowseFolder then the item is present in the media library's
|
williamr@4
|
78 |
virtual filesystem. If it is the ESearchResultFolder scope then the
|
williamr@4
|
79 |
item is present in the current set of search results.
|
williamr@4
|
80 |
|
williamr@4
|
81 |
@param aItemId The UID for the requested Item.
|
williamr@4
|
82 |
|
williamr@4
|
83 |
@param aIter An iterator for TMediaAttributeIds containing a list of
|
williamr@4
|
84 |
TMediaAttributeIds requested by the controller. It is intended for
|
williamr@4
|
85 |
the media element item, so omit it if the item is a folder item.
|
williamr@4
|
86 |
|
williamr@4
|
87 |
@param aMediaLibraryStateCookie The cookie which the remote device
|
williamr@4
|
88 |
believes refers to the current state of the media library. If this
|
williamr@4
|
89 |
does not match the current state according to the client then the
|
williamr@4
|
90 |
client shall call
|
williamr@4
|
91 |
MrcdamlbFolderItemResult() or MrcdamlbMediaElementItemResult() to
|
williamr@4
|
92 |
return the error KErrInvalidMediaLibraryStateCookie according it
|
williamr@4
|
93 |
is a folder item or a media element item.
|
williamr@4
|
94 |
@return The call back result.
|
williamr@4
|
95 |
- KErrNone If success.
|
williamr@4
|
96 |
- The appropriate error code.
|
williamr@4
|
97 |
*/
|
williamr@4
|
98 |
virtual TInt MrcdamlboGetItem(TRemConFolderScope aScope,
|
williamr@4
|
99 |
const TRemConItemUid& aItemId,
|
williamr@4
|
100 |
TMediaAttributeIter& aIter,
|
williamr@4
|
101 |
TUint16 aMediaLibraryStateCookie) = 0;
|
williamr@4
|
102 |
|
williamr@4
|
103 |
/**
|
williamr@4
|
104 |
This requests that the current position within the folder heirarchy is
|
williamr@4
|
105 |
moved to the next folder up.
|
williamr@4
|
106 |
|
williamr@4
|
107 |
The result of this operation must be returned via a call to
|
williamr@4
|
108 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderUpResult.
|
williamr@4
|
109 |
|
williamr@4
|
110 |
@param aMediaLibraryStateCookie The cookie which the remote device
|
williamr@4
|
111 |
believes refers to the current state of the media library. If this
|
williamr@4
|
112 |
does not match the current state according to the client then the
|
williamr@4
|
113 |
client should call
|
williamr@4
|
114 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderUpResult with
|
williamr@4
|
115 |
the error KErrInvalidMediaLibraryStateCookie.
|
williamr@4
|
116 |
*/
|
williamr@4
|
117 |
virtual void MrcdamlboFolderUp(TUint16 aMediaLibraryStateCookie) = 0;
|
williamr@4
|
118 |
|
williamr@4
|
119 |
/**
|
williamr@4
|
120 |
This requests that the current position within the folder hierarchy is
|
williamr@4
|
121 |
moved to the child folder of the current folder specified by aFolder.
|
williamr@4
|
122 |
|
williamr@4
|
123 |
The result of this operation must be returned via a call to
|
williamr@4
|
124 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderDownResult.
|
williamr@4
|
125 |
|
williamr@4
|
126 |
@param aFolder The child folder to change into.
|
williamr@4
|
127 |
|
williamr@4
|
128 |
@param aMediaLibraryStateCookie The cookie which the remote device
|
williamr@4
|
129 |
believes refers to the current state of the media library. If this
|
williamr@4
|
130 |
does not match the current state according to the client then the
|
williamr@4
|
131 |
client should call
|
williamr@4
|
132 |
MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbFolderDownResult()
|
williamr@4
|
133 |
with the error KErrInvalidMediaLibraryStateCookie.
|
williamr@4
|
134 |
*/
|
williamr@4
|
135 |
virtual void MrcdamlboFolderDown(const TRemConItemUid& aFolder,
|
williamr@4
|
136 |
TUint16 aMediaLibraryStateCookie) = 0;
|
williamr@4
|
137 |
|
williamr@4
|
138 |
/**
|
williamr@4
|
139 |
This requests the current path.
|
williamr@4
|
140 |
|
williamr@4
|
141 |
The client is responsible for appending items to the array then call
|
williamr@4
|
142 |
MrcdamlbGetPathResult() when completed. Once the item is appended in the
|
williamr@4
|
143 |
array the ownership of the item is taken so the client should keep the
|
williamr@4
|
144 |
item valid and never destroy the item. If the client can append the items
|
williamr@4
|
145 |
successfully then it should return a result via MrcdamlbGetPathResult().
|
williamr@4
|
146 |
If the client appends some items to the array but then fails to append all
|
williamr@4
|
147 |
the items then it should return an error via MrcdamlbGetPathResult().
|
williamr@4
|
148 |
|
williamr@4
|
149 |
@see MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbGetPathResult()
|
williamr@4
|
150 |
|
williamr@4
|
151 |
@param aPath The current path.
|
williamr@4
|
152 |
Each entry in the array in one level of the path. For example the
|
williamr@4
|
153 |
path /A/B/C would be provided as:
|
williamr@4
|
154 |
aPath[0] 'A'
|
williamr@4
|
155 |
aPath[1] 'B'
|
williamr@4
|
156 |
aPath[2] 'C'
|
williamr@4
|
157 |
All string are in UTF-8.
|
williamr@4
|
158 |
*/
|
williamr@4
|
159 |
virtual void MrcdamlboGetPath(RPointerArray<HBufC8>& aPath) = 0;
|
williamr@4
|
160 |
|
williamr@4
|
161 |
/**
|
williamr@4
|
162 |
Perform a search in the current location for items
|
williamr@4
|
163 |
matching the search string.
|
williamr@4
|
164 |
|
williamr@4
|
165 |
@param aSearch The string to search on in UTF-8. The client can use it until
|
williamr@4
|
166 |
the client has called MrcdamlbSearchResult().
|
williamr@4
|
167 |
|
williamr@4
|
168 |
@see MRemConDatabaseAwareMediaLibraryBrowse::MrcdamlbSearchResult()
|
williamr@4
|
169 |
*/
|
williamr@4
|
170 |
virtual void MrcdamlboSearch(const TDesC8& aSearch) = 0;
|
williamr@4
|
171 |
};
|
williamr@4
|
172 |
|
williamr@4
|
173 |
|
williamr@4
|
174 |
#endif // REMCONDATABASEAWAREMEDIALIBRARYBROWSEOBSERVER_H
|