imstutils/imconnectionprovider/tsrc/imconnectionprovider_test/src/stubs/s_ximpcontext.cpp
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     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: s_ximpcontext.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 #include "s_ximpcontext.h"
       
    19 #include "s_ximpobjectfactory.h"
       
    20 
       
    21 TInt gUnBindingLeaves = KErrNone;
       
    22 
       
    23 void MXIMPContextStub::RegisterObserverL(
       
    24         MXIMPContextObserver& aObserver,
       
    25         const TArray<TInt32>* aEventFilter )
       
    26     {
       
    27     }
       
    28 
       
    29 void MXIMPContextStub::UnregisterObserver(
       
    30         MXIMPContextObserver& aObserver )
       
    31     {
       
    32     }
       
    33 
       
    34 TXIMPRequestId MXIMPContextStub::BindToL(
       
    35             TUid aProtocolImpUid,
       
    36             const TDesC16& aServiceAddress,
       
    37             const TDesC16& aUsername,
       
    38             const TDesC16& aPassword,
       
    39             TInt32 aIapId )
       
    40     {
       
    41     }
       
    42 
       
    43 TXIMPRequestId MXIMPContextStub::BindToL(
       
    44             TUid aProtocolImpUid,
       
    45             const TDesC16& aServiceAddress,
       
    46             const TDesC16& aUsername,
       
    47             const TDesC16& aPassword,
       
    48             const TDesC16& aClientId,
       
    49             TInt32 aIapId )
       
    50     {
       
    51     }
       
    52 
       
    53 TXIMPRequestId MXIMPContextStub::BindToL(
       
    54             TUid aProtocolImpUid,
       
    55             const TDesC16& aUsername,
       
    56             const TDesC16& aPassword,
       
    57             TInt aSettingsId )
       
    58     {
       
    59     }
       
    60 
       
    61 TXIMPRequestId MXIMPContextStub::BindToL( TUid aProtocolImpUid,
       
    62                         TInt aSettingsId )
       
    63     {
       
    64     }
       
    65 
       
    66 TXIMPRequestId MXIMPContextStub::UnbindL()
       
    67     {
       
    68     User::LeaveIfError( gUnBindingLeaves );
       
    69     }
       
    70 
       
    71 MXIMPFeatureInfo* MXIMPContextStub::GetContextFeaturesLC() const
       
    72     {
       
    73     return NULL;
       
    74     }
       
    75 
       
    76 MXIMPObjectFactory& MXIMPContextStub::ObjectFactory() const
       
    77     {
       
    78     
       
    79     
       
    80     MXIMPContextStub* thisObject = const_cast <MXIMPContextStub*> (this);
       
    81     if (!thisObject->iObjFactory)
       
    82 	    {
       
    83 	    thisObject->iObjFactory = new (ELeave) MyMXIMPObjectFactoryStub();	
       
    84 	    }
       
    85     return *iObjFactory;
       
    86     }
       
    87 
       
    88 const TAny* MXIMPContextStub::GetInterface(
       
    89                     TInt32 aInterfaceId,
       
    90                     TIfGetOps aOps ) const
       
    91     {
       
    92     return NULL;
       
    93     }
       
    94 
       
    95 TAny* MXIMPContextStub::GetInterface(
       
    96                     TInt32 aInterfaceId,
       
    97                     TIfGetOps aOps )
       
    98     {
       
    99     return NULL;
       
   100     }
       
   101 
       
   102 TInt32 MXIMPContextStub::GetInterfaceId() const
       
   103     {
       
   104     return 0;
       
   105     }
       
   106         
       
   107 MXIMPContextStub::MXIMPContextStub() 
       
   108 {
       
   109 	
       
   110 }
       
   111 
       
   112 MXIMPContextStub::~MXIMPContextStub()
       
   113 	{
       
   114 	delete 	iObjFactory;
       
   115 	}