emailuis/nmframeworkadapter/src/nmmailboxsearchobserver.cpp
changeset 23 2dc6caa42ec3
child 27 9ba4404ef423
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "nmframeworkadapterheaders.h"
       
    19 
       
    20 
       
    21 /*!
       
    22     \class NmMailboxSearchObserver
       
    23     \brief A Qt wrapper class for MFSMailBoxSearchObserver.
       
    24 */
       
    25 
       
    26 
       
    27 /*!
       
    28     Class constructor.
       
    29 */
       
    30 NmMailboxSearchObserver::NmMailboxSearchObserver()
       
    31 {
       
    32     
       
    33 }
       
    34 
       
    35 
       
    36 /*!
       
    37     Class destructor.
       
    38 */
       
    39 NmMailboxSearchObserver::~NmMailboxSearchObserver()
       
    40 {
       
    41     
       
    42 }
       
    43 
       
    44 
       
    45 /*!
       
    46     From MFSMailBoxSearchObserver.
       
    47     Converts the ID of the received message into NmId and emits it with the
       
    48     signal notifying that a match was found.
       
    49 
       
    50     \param aMatchMessage A message that matches the search criteria. This class
       
    51                          takes the ownership of the given instance.
       
    52 */
       
    53 void NmMailboxSearchObserver::MatchFoundL(CFSMailMessage *aMatchMessage)
       
    54 {
       
    55     if (aMatchMessage) {
       
    56         NmMessage *message = aMatchMessage->GetNmMessage();
       
    57 
       
    58         if (message) {
       
    59             emit matchFound(message->envelope().messageId());
       
    60             delete message;
       
    61         }
       
    62     }
       
    63 }
       
    64 
       
    65 
       
    66 /*!
       
    67     From MFSMailBoxSearchObserver.
       
    68     Emits a signal to notify that the search is complete.
       
    69 */
       
    70 void NmMailboxSearchObserver::SearchCompletedL()
       
    71 {
       
    72     emit searchComplete();
       
    73 }
       
    74 
       
    75 
       
    76 /*!
       
    77     From MFSMailBoxSearchObserver.
       
    78     TODO Implement if necessary.
       
    79 */
       
    80 void NmMailboxSearchObserver::ClientRequiredSearchPriority(
       
    81     TInt *apRequiredSearchPriority)
       
    82 {
       
    83     Q_UNUSED(apRequiredSearchPriority);
       
    84 }
       
    85 
       
    86 
       
    87 // End of file.