instantmessagesalert/tsrc/testinstantmsgalert/src/stubs/s_ximpcontext.cpp
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     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     TXIMPRequestId id;
       
    42     return id;
       
    43     }
       
    44 
       
    45 TXIMPRequestId MXIMPContextStub::BindToL(
       
    46             TUid /*aProtocolImpUid*/,
       
    47             const TDesC16& /*aServiceAddress*/,
       
    48             const TDesC16& /*aUsername*/,
       
    49             const TDesC16& /*aPassword*/,
       
    50             const TDesC16& /*aClientId*/,
       
    51             TInt32 /*aIapId*/ )
       
    52     {
       
    53     TXIMPRequestId id;
       
    54         return id;
       
    55     }
       
    56 
       
    57 TXIMPRequestId MXIMPContextStub::BindToL(
       
    58             TUid /*aProtocolImpUid*/,
       
    59             const TDesC16& /*aUsername*/,
       
    60             const TDesC16& /*aPassword*/,
       
    61             TInt /*aSettingsId*/ )
       
    62     {
       
    63     TXIMPRequestId id;
       
    64         return id;
       
    65     }
       
    66 
       
    67 TXIMPRequestId MXIMPContextStub::BindToL( TUid /*aProtocolImpUid*/,
       
    68                         TInt /*aSettingsId*/ )
       
    69     {
       
    70     TXIMPRequestId id;
       
    71         return id;
       
    72     }
       
    73 
       
    74 TXIMPRequestId MXIMPContextStub::UnbindL()
       
    75     {
       
    76     User::LeaveIfError( gUnBindingLeaves );
       
    77     TXIMPRequestId id;
       
    78         return id;
       
    79     }
       
    80 
       
    81 MXIMPFeatureInfo* MXIMPContextStub::GetContextFeaturesLC() const
       
    82     {
       
    83     return NULL;
       
    84     }
       
    85 
       
    86 MXIMPObjectFactory& MXIMPContextStub::ObjectFactory() const
       
    87     {
       
    88     
       
    89     
       
    90     MXIMPContextStub* thisObject = const_cast <MXIMPContextStub*> (this);
       
    91     if (!thisObject->iObjFactory)
       
    92 	    {
       
    93 	    thisObject->iObjFactory = new (ELeave) MyMXIMPObjectFactoryStub();	
       
    94 	    }
       
    95     return *iObjFactory;
       
    96     }
       
    97 
       
    98 const TAny* MXIMPContextStub::GetInterface(
       
    99                     TInt32 /*aInterfaceId*/,
       
   100                     TIfGetOps /*aOps*/ ) const
       
   101     {
       
   102     return NULL;
       
   103     }
       
   104 
       
   105 TAny* MXIMPContextStub::GetInterface(
       
   106                     TInt32 /*aInterfaceId*/,
       
   107                     TIfGetOps /*aOps*/ )
       
   108     {
       
   109     return NULL;
       
   110     }
       
   111 
       
   112 TInt32 MXIMPContextStub::GetInterfaceId() const
       
   113     {
       
   114     return 0;
       
   115     }
       
   116         
       
   117 MXIMPContextStub::MXIMPContextStub() 
       
   118 {
       
   119 	
       
   120 }
       
   121 
       
   122 MXIMPContextStub::~MXIMPContextStub()
       
   123 	{
       
   124 	delete 	iObjFactory;
       
   125 	}