bluetoothengine/btnotif/inc/btninqnotifier.h
branchRCL_3
changeset 56 9386f31cc85b
parent 0 f63038272f30
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Declares Bluetooth device inquiry notifier class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTNINQNOTIFIER_H
       
    20 #define BTNINQNOTIFIER_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include "btnotifier.h" // Base class
       
    25 #include "btninqui.h"
       
    26 #include <btextnotifiers.h> // Bluetooth notifiers API
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29   
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * This class is used in Bluetooth device search.
       
    33 */
       
    34 NONSHARABLE_CLASS(CBTInqNotifier): public CBTNotifierBase, public MBTNDeviceSearchObserver
       
    35     {
       
    36     public: // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         */
       
    41         static CBTInqNotifier* NewL();
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         virtual ~CBTInqNotifier();
       
    47                
       
    48         
       
    49     private: // Functions from base classes
       
    50         /**
       
    51         * From CBTNotifierBase Called when a notifier is first loaded.        
       
    52         * @param None.
       
    53         * @return A structure containing priority and channel info.
       
    54         */
       
    55         TNotifierInfo RegisterL();
       
    56 
       
    57         /**
       
    58         * From CBTNotifierBase The notifier has been deactivated 
       
    59         * so resources can be freed and outstanding messages completed.
       
    60         * @param None.
       
    61         * @return None.
       
    62         */
       
    63         void Cancel();
       
    64 
       
    65         /**
       
    66         * From CBTNotifierBase Used in asynchronous notifier launch to 
       
    67         * store received parameters into members variables and 
       
    68         * make needed initializations.
       
    69         * @param aBuffer A buffer containing received parameters
       
    70         * @param aReturnVal The return value to be passed back.
       
    71         * @param aMessage Should be completed when the notifier is deactivated.
       
    72         * @return None.
       
    73         */
       
    74         void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
    75 		
       
    76         /**
       
    77          * From MBTNDeviceSearchObserver Called when device search and selection completes.
       
    78          * @param aErr Error code
       
    79          * @param aDevice Response parameters to caller
       
    80          *                  defined in epoc32\include\btextnotifiers.h
       
    81          */
       
    82         void NotifyDeviceSearchCompleted(TInt aErr, const TBTDeviceResponseParams& aDevice = TBTDeviceResponseParams());
       
    83         
       
    84     private:
       
    85 
       
    86         /**
       
    87         * C++ default constructor.
       
    88         */
       
    89         CBTInqNotifier();
       
    90 
       
    91         void LaunchInquiryL(const TBTDeviceClass& aDesiredDevice);
       
    92         
       
    93     private: // Data
       
    94 
       
    95         CBTInqUI*       iUi;                    // User interface module
       
    96     };
       
    97 
       
    98 #endif
       
    99 
       
   100 // End of File