bthci/hci2implementations/CommandsEvents/symbian/src/writepintypecommand.cpp
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file was generated automatically from the template commandsource.tmpl
       
    15 // on Thu, 29 May 2008 15:17:54 (time stamp)
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22 */
       
    23 
       
    24 #include <bluetooth/hci/writepintypecommand.h>
       
    25 #include <bluetooth/hci/event.h>
       
    26 #include <bluetooth/hci/commandcompleteevent.h>
       
    27 #include <bluetooth/hci/hciframe.h>
       
    28 #include <bluetooth/hci/hciopcodes.h>
       
    29 
       
    30 
       
    31 #ifdef __FLOG_ACTIVE
       
    32 _LIT8(KLogComponent, LOG_COMPONENT_COMMANDSEVENTS_SYMBIAN);
       
    33 #endif
       
    34 
       
    35 
       
    36 
       
    37 // Factory methods
       
    38 
       
    39 EXPORT_C CWritePINTypeCommand* CWritePINTypeCommand::NewL(TUint8 aPINType)
       
    40 	{
       
    41 	CWritePINTypeCommand* self = new (ELeave) CWritePINTypeCommand(aPINType);
       
    42 	CleanupStack::PushL(self);
       
    43 	self->CHCICommandBase::BaseConstructL();
       
    44 	CleanupStack::Pop(self);
       
    45 	return self;
       
    46 	}
       
    47 
       
    48 EXPORT_C CWritePINTypeCommand* CWritePINTypeCommand::NewL()
       
    49 	{
       
    50 	CWritePINTypeCommand* self = new (ELeave) CWritePINTypeCommand();
       
    51 	CleanupStack::PushL(self);
       
    52 	self->CHCICommandBase::BaseConstructL();
       
    53 	CleanupStack::Pop(self);
       
    54 	return self;
       
    55 	}
       
    56 
       
    57 // Constructors
       
    58 
       
    59 CWritePINTypeCommand::CWritePINTypeCommand(TUint8 aPINType)
       
    60 	: CHCICommandBase(KWritePINTypeOpcode)
       
    61 	, iPINType(aPINType)
       
    62 	{
       
    63 	SetExpectsCommandStatusEvent(EFalse);
       
    64 	}
       
    65 
       
    66 CWritePINTypeCommand::CWritePINTypeCommand()
       
    67 	: CHCICommandBase(KWritePINTypeOpcode)
       
    68 	{
       
    69 	SetExpectsCommandStatusEvent(EFalse);
       
    70 	}
       
    71 
       
    72 // Destructor
       
    73 CWritePINTypeCommand::~CWritePINTypeCommand()
       
    74 	{
       
    75 	
       
    76 	}	
       
    77 
       
    78 
       
    79 
       
    80 // Override of pure virtual from CHCICommandBase. This method embodies the knowledge
       
    81 // of how to format the specifics of this command into the HCTL command frame.
       
    82 void CWritePINTypeCommand::Format(CHctlCommandFrame& aCommandFrame) const
       
    83 	{
       
    84 	aCommandFrame.PutByte(iPINType);
       
    85 	}
       
    86 
       
    87 // Assign new values to the parameters of this command
       
    88 EXPORT_C void CWritePINTypeCommand::Reset(TUint8 aPINType)
       
    89 	{
       
    90 	iPINType = aPINType;
       
    91 	}
       
    92 
       
    93 // Accessor methods for the parameters of the command
       
    94 
       
    95 EXPORT_C TUint8 CWritePINTypeCommand::PINType() const
       
    96 	{
       
    97 	return iPINType;
       
    98 	}
       
    99 
       
   100 
       
   101 
       
   102 // Extension function.  Use this to retrieve any extension interfaces from CWritePINTypeCommand
       
   103 // or any class from which it derives.
       
   104 /*virtual*/ TInt CWritePINTypeCommand::Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData)
       
   105 	{
       
   106 	// To add an additional interface implementation specific for this class check the 
       
   107 	// provided ID and return an appropriate interface.
       
   108 
       
   109 	// If a specific interface implementation is not provided - forward the call to the base class.
       
   110 	return CHCICommandBase::Extension_(aExtensionId, aInterface, aData);
       
   111 	}
       
   112