mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/Csip.cpp
changeset 0 f0cf47e981f9
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <badesca.h> 
       
    20 #include "sip.h"
       
    21 #include "sipobserver.h"
       
    22 #include "sipstrings.h"
       
    23 #include "musunittesting.h"
       
    24 
       
    25 EXPORT_C CSIP* CSIP::NewL(const TUid& aUid,MSIPObserver& aSIPObserver)
       
    26 	{
       
    27 	CSIP* self = new(ELeave) CSIP(aSIPObserver);
       
    28 	CleanupStack::PushL(self);
       
    29 	self->ConstructL(aUid);
       
    30 	CleanupStack::Pop();
       
    31 	return self;
       
    32 	}
       
    33 
       
    34 
       
    35 void CSIP::ConstructL(const TUid& /*aUid*/)
       
    36 	{
       
    37     SIPStrings::OpenL();
       
    38 	}
       
    39 
       
    40 
       
    41 CSIP::CSIP(MSIPObserver& aSIPObserver): iObserver(aSIPObserver)
       
    42 	{
       
    43 	}
       
    44 	
       
    45 
       
    46 EXPORT_C CSIP::~CSIP()
       
    47 	{
       
    48 	SIPStrings::Close();
       
    49 	} 
       
    50 
       
    51 
       
    52 EXPORT_C CDesC8Array* CSIP::SupportedSecurityMechanismsL() const
       
    53     {
       
    54     _LIT8(Ksipsec3gpp , "ipsec-3gpp");
       
    55     _LIT8(Ksipdigest, "digest");
       
    56     
       
    57     CDesC8ArraySeg* mechanisms = new(ELeave)CDesC8ArraySeg(1);
       
    58     CleanupStack::PushL(mechanisms);
       
    59   
       
    60     mechanisms->AppendL(Ksipsec3gpp);
       
    61   	mechanisms->AppendL(Ksipdigest);
       
    62         
       
    63     CleanupStack::Pop(mechanisms);
       
    64     
       
    65 	return mechanisms;
       
    66     }