bluetoothengine/btnotif/inc/btnssppasskeyentrynotifier.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 BTNSSPPASSKEYENTRYNOTIFIER_H_
       
    20 #define BTNSSPPASSKEYENTRYNOTIFIER_H_
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 
       
    25 #include "btnpairnotifier.h" // Base class
       
    26 
       
    27 const TInt KPassKeylength = 6; 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30 * This class is used to confirm PIN code from remote input devices. such as bluetooth keyboard.
       
    31 */
       
    32 NONSHARABLE_CLASS(CBTSSPPasskeyEntryNotifier): public CBTNPairNotifierBase
       
    33     {
       
    34     public: // Constructors and destructor
       
    35 
       
    36         /**
       
    37         * Two-phased constructor.
       
    38         */
       
    39         static CBTSSPPasskeyEntryNotifier* NewL();  // Constructor (public)
       
    40 
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CBTSSPPasskeyEntryNotifier();      // 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 Updates a currently active notifier.
       
    57         * @param aBuffer The updated data.
       
    58         * @return A pointer to return value.
       
    59         */
       
    60         TPtrC8 UpdateL(const TDesC8& aBuffer);                         
       
    61                
       
    62         /**
       
    63          * From CBTNotifierBase Used in asynchronous notifier launch to 
       
    64          * store received parameters into members variables and 
       
    65          * make needed initializations.
       
    66          * @param aBuffer A buffer containing received parameters
       
    67          * @param aReturnVal The return value to be passed back.
       
    68          * @param aMessage Should be completed when the notifier is deactivated.
       
    69          * @return None.
       
    70          */
       
    71         void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
       
    72 
       
    73         /**
       
    74         * From CBTNotifierBase
       
    75         */      
       
    76         void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
       
    77     
       
    78         /**
       
    79         * Generate prompt for passkey entry query.
       
    80         * @param aRBuf the descriptor to which the prompt will be loaded.
       
    81         */
       
    82         void GenerateQueryPromptL( RBuf& aRBuf );
       
    83         
       
    84     private:
       
    85 
       
    86         /**
       
    87         * C++ default constructor.
       
    88         */
       
    89         CBTSSPPasskeyEntryNotifier();               // Default constructor
       
    90         
       
    91     private: // Data
       
    92         TInt                    iAnswer;
       
    93         TBuf<100>               iBuf;
       
    94         TBuf<10>                iPasskey;
       
    95     };
       
    96 #endif
       
    97 // End of File