bluetoothcommsprofiles/btpan/bnep/RBnepNotUnderstoodResponseControl.cpp
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2004-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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #include <bluetooth/logger.h>
       
    22 #include <es_sock.h>
       
    23 #include "RBnepNotUnderstoodResponseControl.h"
       
    24 
       
    25 #ifdef __FLOG_ACTIVE
       
    26 _LIT8(KLogComponent, LOG_COMPONENT_PAN_BNEP);
       
    27 #endif
       
    28 
       
    29 /**
       
    30    Allocate some buffer space for this object.
       
    31    @internalComponent
       
    32 */
       
    33 void RBnepNotUnderstoodResponseControl::InitL ()
       
    34     {
       
    35     LOG_FUNC
       
    36     AllocL(KMaxSizeOfCommandNotUnderstoodResponse);
       
    37     }
       
    38 
       
    39 /**
       
    40    Write an unknown control code into the BNEP not understood control response
       
    41    @internalComponent
       
    42 */
       
    43 void RBnepNotUnderstoodResponseControl::SetUnknownControlType (TUint8 aUnknownControlType)
       
    44     {
       
    45     LOG_FUNC
       
    46     TPckgBuf<TUint8> controlType(static_cast<TUint8>(EBnepControlCommandNotUnderstood));
       
    47     TPckgBuf<TUint8> unknownControlType(aUnknownControlType);
       
    48     CopyIn(controlType, KControlTypeOffset);
       
    49     CopyIn(unknownControlType, KUnknownControlTypeResponseFieldOffset);
       
    50     DUMPFRAME(_L8("RBnepNotUnderstoodResponseControl"));
       
    51     }
       
    52