bluetoothengine/btnotif/inc/btnumcmpnotifier.h
branchRCL_3
changeset 56 9386f31cc85b
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
       
     1 /*
       
     2 * Copyright (c) 2009 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 Numeric Comparison notifier for Secure Simle Pairing 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTNUMCMPNOTIFIER_H
       
    20 #define BTNUMCMPNOTIFIER_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include "btnpairnotifier.h" // Base class
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28 * This class is used to ask user to compare passcode in two devices.
       
    29 */
       
    30 const TInt Klength = 6; 
       
    31 const TInt KMaxPassKeyLength = 20;
       
    32 const TInt KBTDeviceShortNameLength = 7;
       
    33 
       
    34 
       
    35 NONSHARABLE_CLASS(CBTNumCmpNotifier): public CBTNPairNotifierBase
       
    36     {
       
    37     public: // Constructors and destructor
       
    38 
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         */
       
    42         static CBTNumCmpNotifier* NewL();  // Constructor (public)
       
    43 
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CBTNumCmpNotifier();      // Destructor
       
    48 
       
    49     private:
       
    50         /**
       
    51         * From CBTNotifierBase Called when a notifier is first loaded 
       
    52         * to allow any initial construction that is required.
       
    53         * @param None.
       
    54         * @return A structure containing priority and channel info.
       
    55         */
       
    56         TNotifierInfo RegisterL();
       
    57 
       
    58         
       
    59         /**
       
    60         * From CBTNotifierBase Used in asynchronous notifier launch to 
       
    61         * store received parameters into members variables and 
       
    62         * make needed initializations.
       
    63         * @param aBuffer A buffer containing received parameters
       
    64         * @param aReturnVal The return value to be passed back.
       
    65         * @param aMessage Should be completed when the notifier is deactivated.
       
    66         * @return None.
       
    67         */
       
    68         void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
       
    69                                          
       
    70         /**
       
    71         * From CBTNotifierBase
       
    72         * Show notes to ask user response and return to Notifier caller by completing message.
       
    73         */      
       
    74         void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
       
    75         
       
    76         /**
       
    77         * From CBTNPairNotifierBase
       
    78         * @param aRBuf the descriptor to which the prompt will be loaded.
       
    79         */
       
    80         void GenerateQueryPromptL( RBuf& aRBuf );
       
    81 
       
    82     private:
       
    83 
       
    84         /**
       
    85         * C++ default constructor.
       
    86         */
       
    87         CBTNumCmpNotifier();               // Default constructor
       
    88 		
       
    89     private: // Data
       
    90 		TBuf<20> iPasskeyToShow;
       
    91         
       
    92     };
       
    93 
       
    94 #endif
       
    95 
       
    96 // End of File