51
|
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 |
#ifndef REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H
|
|
25 |
#define REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H
|
|
26 |
|
|
27 |
NONSHARABLE_CLASS(MRemConDatabaseUnawareMediaLibraryBrowseObserver)
|
|
28 |
{
|
|
29 |
public:
|
|
30 |
/**
|
|
31 |
This requests a list of the items present in a folder. No metadata is
|
|
32 |
requested, that can be retrieved separately on a per item basis.
|
|
33 |
|
|
34 |
The result should be returned via a call to
|
|
35 |
MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderListing(). And
|
|
36 |
the ordering should be as shown locally, but should list folders before
|
|
37 |
media element items.
|
|
38 |
|
|
39 |
@param aScope The scope in which the folder listing is made.
|
|
40 |
This indicates which listing should be returned. If the scope is
|
|
41 |
EBrowseFolder then the contents of the current browsed
|
|
42 |
folder should be returned. If it is the ESearchResultFolder scope
|
|
43 |
then the contents of the folder populated by the last search
|
|
44 |
should be returned.
|
|
45 |
|
|
46 |
@param aStartItem The offset into the folder listing of the first item to
|
|
47 |
retrieve. If there is no media available at this offset the error
|
|
48 |
KErrMediaBrowseInvalidOffset should be returned via the result call
|
|
49 |
to MrcdumlbFolderListing().
|
|
50 |
|
|
51 |
@param aEndItem The offset into the folder listing of the final item to
|
|
52 |
retrieve. If this is beyond the end of the folder listing then the
|
|
53 |
items from the aStartItem offset to the end of the listing should
|
|
54 |
be returned via the result call to MrcdumlbFolderListing().
|
|
55 |
*/
|
|
56 |
virtual void MrcdumlboGetFolderListing(TRemConFolderScope aScope,
|
|
57 |
TUint aStartItem,
|
|
58 |
TUint aEndItem) = 0;
|
|
59 |
|
|
60 |
/**
|
|
61 |
Requests a specific item which may be a folder item or a media element
|
|
62 |
item.
|
|
63 |
|
|
64 |
If it returns KErrNone the client must return the metadata for the
|
|
65 |
requested item through the response function either
|
|
66 |
MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderItemResult()
|
|
67 |
or
|
|
68 |
MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbMediaElementItemResult()
|
|
69 |
according to the item type which is a folder item or media element item.
|
|
70 |
If it is unable to process this call then it can return error but not
|
|
71 |
call the response function.
|
|
72 |
|
|
73 |
@param aScope The scope in which the item is present. If the scope is
|
|
74 |
EBrowseFolder then the item is present in the media library's
|
|
75 |
virtual filesystem. If it is the ESearchResultFolder scope then the
|
|
76 |
item is present in the current set of search results.
|
|
77 |
|
|
78 |
@param aItemId The UID for the requested Item.
|
|
79 |
|
|
80 |
@param aIter An iterator for TMediaAttributeIds containing a list of
|
|
81 |
TMediaAttributeIds requested by the controller. It is intended for
|
|
82 |
the media element item, so omit it if the item is a folder item.
|
|
83 |
|
|
84 |
@return The call back result.
|
|
85 |
- KErrNone If success.
|
|
86 |
- The appropriate error code.
|
|
87 |
*/
|
|
88 |
virtual TInt MrcdumlboGetItem(TRemConFolderScope aScope,
|
|
89 |
const TRemConItemUid& aItemId,
|
|
90 |
TMediaAttributeIter& aIter) = 0;
|
|
91 |
|
|
92 |
/**
|
|
93 |
This requests that the current position within the folder heirarchy is
|
|
94 |
moved to the next folder up.
|
|
95 |
|
|
96 |
The result of this operation must be returned via a call to
|
|
97 |
MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderUpResult().
|
|
98 |
*/
|
|
99 |
virtual void MrcdumlboFolderUp() = 0;
|
|
100 |
|
|
101 |
/**
|
|
102 |
This requests that the current position within the folder hierarchy is
|
|
103 |
moved to the child folder of the current folder specified by aFolder.
|
|
104 |
|
|
105 |
The result of this operation must be returned via a call to
|
|
106 |
MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbFolderDownResult().
|
|
107 |
|
|
108 |
@param aFolder The child folder to change into.
|
|
109 |
*/
|
|
110 |
virtual void MrcdumlboFolderDown(const TRemConItemUid& aFolder) = 0;
|
|
111 |
|
|
112 |
/**
|
|
113 |
This requests the current path.
|
|
114 |
|
|
115 |
The client is responsible for appending items to the array then call
|
|
116 |
MrcdumlbGetPathResult() when completed. Once the item is appended in the
|
|
117 |
array the ownership of the item is taken so the client should keep the
|
|
118 |
item valid and never destroy the item. If the client can append the items
|
|
119 |
successfully then it must return a result via MrcdumlbGetPathResult().
|
|
120 |
If the client appends some items to the array but then fails to append all
|
|
121 |
the items then it must return an error via MrcdumlbGetPathResult().
|
|
122 |
|
|
123 |
@see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbGetPathResult()
|
|
124 |
|
|
125 |
@param aPath The current path.
|
|
126 |
Each entry in the array in one level of the path. For example the
|
|
127 |
path /A/B/C would be provided as:
|
|
128 |
aPath[0] 'A'
|
|
129 |
aPath[1] 'B'
|
|
130 |
aPath[2] 'C'
|
|
131 |
All string are in UTF-8.
|
|
132 |
*/
|
|
133 |
virtual void MrcdumlboGetPath(RPointerArray<HBufC8>& aPath) = 0;
|
|
134 |
|
|
135 |
/**
|
|
136 |
Perform a search in the current location for items
|
|
137 |
matching the search string.
|
|
138 |
|
|
139 |
@param aSearch The string to search on in UTF-8. The client can use it until
|
|
140 |
the client has called MrcdumlbSearchResult().
|
|
141 |
|
|
142 |
@see MRemConDatabaseUnawareMediaLibraryBrowse::MrcdumlbSearchResult()
|
|
143 |
*/
|
|
144 |
virtual void MrcdumlboSearch(const TDesC8& aSearch) = 0;
|
|
145 |
};
|
|
146 |
|
|
147 |
#endif //REMCONDATABASEUNAWAREMEDIALIBRARYBROWSEOBSERVER_H
|