emailuis/nmframeworkadapter/src/nmmailboxsearchobserver.cpp
changeset 23 2dc6caa42ec3
child 27 9ba4404ef423
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmframeworkadapter/src/nmmailboxsearchobserver.cpp	Fri May 14 15:41:10 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "nmframeworkadapterheaders.h"
+
+
+/*!
+    \class NmMailboxSearchObserver
+    \brief A Qt wrapper class for MFSMailBoxSearchObserver.
+*/
+
+
+/*!
+    Class constructor.
+*/
+NmMailboxSearchObserver::NmMailboxSearchObserver()
+{
+    
+}
+
+
+/*!
+    Class destructor.
+*/
+NmMailboxSearchObserver::~NmMailboxSearchObserver()
+{
+    
+}
+
+
+/*!
+    From MFSMailBoxSearchObserver.
+    Converts the ID of the received message into NmId and emits it with the
+    signal notifying that a match was found.
+
+    \param aMatchMessage A message that matches the search criteria. This class
+                         takes the ownership of the given instance.
+*/
+void NmMailboxSearchObserver::MatchFoundL(CFSMailMessage *aMatchMessage)
+{
+    if (aMatchMessage) {
+        NmMessage *message = aMatchMessage->GetNmMessage();
+
+        if (message) {
+            emit matchFound(message->envelope().messageId());
+            delete message;
+        }
+    }
+}
+
+
+/*!
+    From MFSMailBoxSearchObserver.
+    Emits a signal to notify that the search is complete.
+*/
+void NmMailboxSearchObserver::SearchCompletedL()
+{
+    emit searchComplete();
+}
+
+
+/*!
+    From MFSMailBoxSearchObserver.
+    TODO Implement if necessary.
+*/
+void NmMailboxSearchObserver::ClientRequiredSearchPriority(
+    TInt *apRequiredSearchPriority)
+{
+    Q_UNUSED(apRequiredSearchPriority);
+}
+
+
+// End of file.