48 * Destructor |
48 * Destructor |
49 */ |
49 */ |
50 ~CEmailMessageSearchAsync(); |
50 ~CEmailMessageSearchAsync(); |
51 |
51 |
52 public: // from MEmailInterface |
52 public: // from MEmailInterface |
53 TEmailTypeId InterfaceId() const; |
53 virtual TEmailTypeId InterfaceId() const; |
54 |
54 |
55 void Release(); |
55 virtual void Release(); |
56 |
56 |
57 |
57 |
58 public: // from MEmailMessageSearchAsync |
58 public: // from MEmailMessageSearchAsync |
59 /** |
59 /** |
60 * Sets sort order for search results. |
60 * Sets sort order for search results. |
61 * Leaves KErrNotReady if search is ongoing. |
61 * Leaves KErrNotReady if search is ongoing. |
62 */ |
62 */ |
63 void SetSortCriteriaL( const TEmailSortCriteria& aCriteria ); |
63 virtual void SetSortCriteriaL( const TEmailSortCriteria& aCriteria ); |
64 |
64 |
65 /** |
65 /** |
66 * Adds a search key. Leaves KErrNotReady if search is ongoing. |
66 * Adds a search key. Leaves KErrNotReady if search is ongoing. |
67 */ |
67 */ |
68 void AddSearchKeyL( const TDesC& aSearchKey ); |
68 virtual void AddSearchKeyL( const TDesC& aSearchKey ); |
69 |
69 |
70 /** |
70 /** |
71 * Enables/disables search from remote email server. |
71 * Enables/disables search from remote email server. |
72 * Leaves KErrNotReady if search is ongoing. |
72 * Leaves KErrNotReady if search is ongoing. |
73 */ |
73 */ |
74 void SetRemoteSearchL( TBool aRemote ); |
74 virtual void SetRemoteSearchL( TBool aRemote ); |
75 |
75 |
76 /** |
76 /** |
77 * Indicates whether remote search is enabled. |
77 * Indicates whether remote search is enabled. |
78 */ |
78 */ |
79 TBool IsRemoteSearch() const; |
79 virtual TBool IsRemoteSearch() const; |
80 |
80 |
81 /** |
81 /** |
82 * Starts search, all methods affecting search attribures leave |
82 * Starts search, all methods affecting search attribures leave |
83 * KErrNotReady while search is ongoing. |
83 * KErrNotReady while search is ongoing. |
84 * @param aObserver called when results are available. |
84 * @param aObserver called when results are available. |
85 */ |
85 */ |
86 void StartSearchL( MEmailSearchObserver& aObserver ); |
86 virtual void StartSearchL( MEmailSearchObserver& aObserver ); |
87 |
87 |
88 /** |
88 /** |
89 * Cancels search. |
89 * Cancels search. |
90 */ |
90 */ |
91 void Cancel(); |
91 virtual void Cancel(); |
92 |
92 |
93 /** returns search status |
93 /** returns search status |
94 * @return search status: |
94 * @return search status: |
95 * < 0 : Search has failed |
95 * < 0 : Search has failed |
96 * KRequestPending : search is ongoing. note that status may be |
96 * KRequestPending : search is ongoing. note that status may be |
97 * KRequestPending after HandleResultL callback because results |
97 * KRequestPending after HandleResultL callback because results |
98 * may be given in chunks of results. Size of chunk depends on |
98 * may be given in chunks of results. Size of chunk depends on |
99 * implementation and may vary. |
99 * implementation and may vary. |
100 * KErrNone : initial state, or search has finished |
100 * KErrNone : initial state, or search has finished |
101 */ |
101 */ |
102 TInt Status() const; |
102 virtual TInt Status() const; |
103 |
103 |
104 /** |
104 /** |
105 * Resets all search attribures. Cancels search if ongoing. |
105 * Resets all search attribures. Cancels search if ongoing. |
106 */ |
106 */ |
107 void Reset(); |
107 virtual void Reset(); |
108 |
108 |
109 public: // From MFSMailBoxSearchObserver |
109 public: // From MFSMailBoxSearchObserver |
110 /** |
110 /** |
111 * Notifies the email search API client that a match has been found |
111 * Notifies the email search API client that a match has been found |
112 * |
112 * |
113 * @param aMatchMessage contains a pointer to the matched message. |
113 * @param aMatchMessage contains a pointer to the matched message. |
114 * Ownership is transfered to the observer. |
114 * Ownership is transfered to the observer. |
115 * |
115 * |
116 */ |
116 */ |
117 void MatchFoundL( CFSMailMessage* aMatchMessage ); |
117 virtual void MatchFoundL( CFSMailMessage* aMatchMessage ); |
118 |
118 |
119 /** |
119 /** |
120 * Notifies the email search API client that the search has completed |
120 * Notifies the email search API client that the search has completed |
121 * |
121 * |
122 */ |
122 */ |
123 void SearchCompletedL(); |
123 virtual void SearchCompletedL(); |
124 |
124 |
125 // |
125 // |
126 /** |
126 /** |
127 * Asks client if search engine should change search priority |
127 * Asks client if search engine should change search priority |
128 */ |
128 */ |
129 void ClientRequiredSearchPriority(TInt *apRequiredSearchPriority); |
129 virtual void ClientRequiredSearchPriority(TInt *apRequiredSearchPriority); |
130 // |
130 // |
131 |
131 |
132 |
132 |
133 private: |
133 private: |
134 /** |
134 /** |