natfw/natfwunsaf_protocols/unsaf_codec/src/natfwunsafsetactivedestinationresponse.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "natfwunsafsetactivedestinationresponse.h"
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // CNATFWUNSAFSetActiveDestinationResponse::NewL
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 CNATFWUNSAFSetActiveDestinationResponse*
       
    28 CNATFWUNSAFSetActiveDestinationResponse::NewL(
       
    29     const TNATFWUNSAFTransactionID& aTransactionID)
       
    30     {
       
    31     CNATFWUNSAFSetActiveDestinationResponse* self =
       
    32         CNATFWUNSAFSetActiveDestinationResponse::NewLC(aTransactionID);
       
    33     CleanupStack::Pop(self);
       
    34     return self;
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CNATFWUNSAFSetActiveDestinationResponse::NewLC
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 CNATFWUNSAFSetActiveDestinationResponse*
       
    42 CNATFWUNSAFSetActiveDestinationResponse::NewLC(
       
    43     const TNATFWUNSAFTransactionID& aTransactionID)
       
    44     {
       
    45     CNATFWUNSAFSetActiveDestinationResponse* self =
       
    46         new (ELeave) CNATFWUNSAFSetActiveDestinationResponse(aTransactionID);
       
    47     CleanupStack::PushL(self);
       
    48     return self;
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CNATFWUNSAFSetActiveDestinationResponse::CreateL
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 CNATFWUNSAFMessage* CNATFWUNSAFSetActiveDestinationResponse::CreateL(
       
    56     const TNATFWUNSAFTransactionID& aTransactionID)
       
    57     {
       
    58     return NewL(aTransactionID);
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CNATFWUNSAFSetActiveDestinationResponse::
       
    63 // CNATFWUNSAFSetActiveDestinationResponse
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 CNATFWUNSAFSetActiveDestinationResponse::
       
    67 CNATFWUNSAFSetActiveDestinationResponse(
       
    68     const TNATFWUNSAFTransactionID& aTransactionID) :
       
    69     CNATFWUNSAFMessage(aTransactionID)
       
    70     {
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CNATFWUNSAFSetActiveDestinationResponse::
       
    75 // ~CNATFWUNSAFSetActiveDestinationResponse
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CNATFWUNSAFSetActiveDestinationResponse::
       
    79 ~CNATFWUNSAFSetActiveDestinationResponse()
       
    80     {
       
    81     }
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CNATFWUNSAFSetActiveDestinationResponse::Type
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 CNATFWUNSAFMessage::TType CNATFWUNSAFSetActiveDestinationResponse::Type() const
       
    88     {
       
    89     return CNATFWUNSAFMessage::ESetActiveDestinationResponse;
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // CNATFWUNSAFSetActiveDestinationResponse::Validate
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 TBool CNATFWUNSAFSetActiveDestinationResponse::Validate() const
       
    97     {
       
    98     return ETrue;
       
    99     }
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // CNATFWUNSAFSetActiveDestinationResponse::IsAllowed
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 TBool CNATFWUNSAFSetActiveDestinationResponse::IsAllowed(
       
   106     TUint16 aAttributeType) const
       
   107     {
       
   108     return (aAttributeType == CNATFWUNSAFAttribute::ETimerVal ||
       
   109             aAttributeType == CNATFWUNSAFAttribute::EMessageIntegrity ||
       
   110             aAttributeType == CNATFWUNSAFAttribute::EFingerprint);
       
   111     }