|
1 /* |
|
2 * Copyright (c) 2006-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: interface class for CSrchUiResFolder class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef FOLDER_FILE_INTERFACE_H |
|
24 #define FOLDER_FILE_INTERFACE_H |
|
25 |
|
26 |
|
27 // CLASS DECLARATION |
|
28 class CSearchLightResult; |
|
29 class CSearchResult; |
|
30 |
|
31 |
|
32 NONSHARABLE_CLASS( MSrchUiFolder ) |
|
33 { |
|
34 public: // Destructor |
|
35 /** |
|
36 * Destructor. |
|
37 */ |
|
38 virtual ~MSrchUiFolder() {}; |
|
39 |
|
40 public: // New functions (Getters and setters) |
|
41 /** |
|
42 * Getter for the folder name. |
|
43 * |
|
44 * @return Reference to the folder name. |
|
45 */ |
|
46 virtual const TDesC& GetFolderName() const = 0; |
|
47 |
|
48 /** |
|
49 * Setter for the folder name. |
|
50 * |
|
51 * @param aName The new folder name. |
|
52 */ |
|
53 virtual void SetFolderNameL( const TDesC& aName ) = 0; |
|
54 |
|
55 /** |
|
56 * Returns the subfolder, knowing the (child) folder index. |
|
57 * |
|
58 * @param aIndex Index of the subfolder. |
|
59 * @return Pointer to the subfolder. |
|
60 */ |
|
61 virtual MSrchUiFolder* GetSubFolder( TInt aIndex ) = 0; |
|
62 |
|
63 /** |
|
64 * Returns the subfolder index knowing the (child) subfolder pointer. |
|
65 * |
|
66 * @param aFolder Pointer to the subfolder. |
|
67 * @return The index of the subfolder pointed to. |
|
68 * KErrNotFound if the sub-folder was not found. |
|
69 */ |
|
70 virtual TInt GetSubFolderIndex( MSrchUiFolder* aFolder ) = 0; |
|
71 |
|
72 /** |
|
73 * Getter for the parent folder. |
|
74 * |
|
75 * @return Pointer to the parent folder. |
|
76 */ |
|
77 virtual MSrchUiFolder* GetParentFolder() = 0; |
|
78 |
|
79 /** |
|
80 * Retuns the light result, knowing the child index |
|
81 * |
|
82 * @param aIndex Index of the child |
|
83 * @return Pointer to the light result |
|
84 */ |
|
85 virtual CSearchLightResult* GetResult( TInt aIndex ) = 0; |
|
86 |
|
87 /** |
|
88 * Retuns the number of (child) subfolders. |
|
89 * |
|
90 * @return The number of subfolders |
|
91 */ |
|
92 virtual TInt GetSubFoldersCount() const = 0; |
|
93 |
|
94 /** |
|
95 * Returns the number of ALL (child) subfolders. This means that folders |
|
96 * inside folders |
|
97 * are added to the count. |
|
98 * |
|
99 * @return The number of all subfolders. |
|
100 */ |
|
101 virtual TInt GetAllSubFoldersCount() const = 0; |
|
102 |
|
103 /** |
|
104 * Retuns the number of light results |
|
105 * |
|
106 * @return The number of light results |
|
107 */ |
|
108 virtual TInt GetResultsCount() const = 0; |
|
109 |
|
110 /** |
|
111 * Retuns the number of ALL (child) light results. This means that files |
|
112 * inside folders |
|
113 * are added to the count. |
|
114 * |
|
115 * @return The number of all light results |
|
116 */ |
|
117 virtual TInt GetAllResultsCount() const = 0; |
|
118 |
|
119 /** |
|
120 * Returns the light results |
|
121 * |
|
122 * @return the light results. |
|
123 */ |
|
124 virtual RPointerArray<CSearchLightResult>& Results() = 0; |
|
125 |
|
126 /** |
|
127 * Returns the heavy results |
|
128 * |
|
129 * @return the heavy results. |
|
130 */ |
|
131 virtual RPointerArray<CSearchResult>& HeavyResults() = 0; |
|
132 }; |
|
133 |
|
134 |
|
135 |
|
136 #endif // FOLDER_FILE_INTERFACE_H |
|
137 |
|
138 // End of File |