bluetoothengine/btnotif/inc/btnpinnotifier.h
branchRCL_3
changeset 56 9386f31cc85b
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 authentication (PIN query) notifier class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTNPINNOTIFIER_H
       
    20 #define BTNPINNOTIFIER_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include "btnpairnotifier.h" // Base class 
       
    25 
       
    26 class MBTEngDevManObserver;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30 * This class is used to ask PIN code from user.
       
    31 */
       
    32 NONSHARABLE_CLASS(CBTPinNotifier): public CBTNPairNotifierBase
       
    33     {
       
    34     public: // Constructors and destructor
       
    35 
       
    36         /**
       
    37         * Two-phased constructor.
       
    38         */
       
    39         static CBTPinNotifier* NewL();  // Constructor (public)
       
    40 
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CBTPinNotifier();      // Destructor
       
    45 
       
    46     private:
       
    47         /**
       
    48         * From CBTNotifierBase Called when a notifier is first loaded 
       
    49         * to allow any initial construction that is required.
       
    50         * @param None.
       
    51         * @return A structure containing priority and channel info.
       
    52         */
       
    53         TNotifierInfo RegisterL();
       
    54         
       
    55         /**
       
    56         * From CBTNotifierBase Used in asynchronous notifier launch to 
       
    57         * store received parameters into members variables and 
       
    58         * make needed initializations.
       
    59         * @param aBuffer A buffer containing received parameters
       
    60         * @param aReturnVal The return value to be passed back.
       
    61         * @param aMessage Should be completed when the notifier is deactivated.
       
    62         * @return None.
       
    63         */
       
    64         void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
       
    65 
       
    66         /**
       
    67         * From CBTNotifierBase
       
    68         * Show queries to ask user response and return it to caller by completing message.
       
    69         */      
       
    70         void HandleGetDeviceCompletedL(const CBTDevice* aDev);
       
    71         
       
    72         /**
       
    73         * From CBTNPairNotifierBase
       
    74         * Generate prompt in Pin query dialog.
       
    75         * @param aRBuf the descriptor to which the prompt will be loaded.
       
    76         */      
       
    77         void GenerateQueryPromptL(RBuf& aRBuf); 
       
    78 
       
    79     private:
       
    80 
       
    81         /**
       
    82         * C++ default constructor.
       
    83         */
       
    84         CBTPinNotifier();               // Default constructor
       
    85         
       
    86         /**
       
    87         * Checks and sets iPinCode to '0000', used with automated pairing for headsets.
       
    88         */		        
       
    89         TBool CheckAndSetAutomatedPairing();        	
       
    90 
       
    91     private: // Data
       
    92         TUint                   iPasskeyLength;
       
    93     	TBTPinCode              iPinCode;
       
    94 		TBTRegistryQueryState   iBTRegistryQueryState;
       
    95         TBool                   iLocallyInitiated;
       
    96         TBool                   iStrongPinRequired;
       
    97 		        
       
    98     };
       
    99 
       
   100 #endif
       
   101 
       
   102 // End of File