imstutils/imconnectionprovider/tsrc/imconnectionprovider_test/src/stubs/s_ximpobjectfactory.cpp
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     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:  Interface for XIMP Framework object factory.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "s_ximpobjectfactory.h"
       
    20 #include "s_ximpidentity.h"
       
    21 
       
    22 TBool gCreateXIMPIdentity;
       
    23 /**
       
    24  * Instantiates new status object.
       
    25  *
       
    26  * @return New status object instance.
       
    27  *         Object ownership is returned to caller.
       
    28  *
       
    29  * @leave KErrNoMemory if failed to allocate memory.
       
    30  */
       
    31 MXIMPStatus* MyMXIMPObjectFactoryStub::NewStatusLC() {}
       
    32 
       
    33 
       
    34 /**
       
    35  * Instantiates new identity object.
       
    36  *
       
    37  * @return New identity object instance.
       
    38  *         Object ownership is returned to caller.
       
    39  *
       
    40  * @leave KErrNoMemory if failed to allocate memory.
       
    41  */
       
    42 MXIMPIdentity* MyMXIMPObjectFactoryStub::NewIdentityLC() 
       
    43 	{
       
    44 	if (gCreateXIMPIdentity)
       
    45 		{
       
    46 			
       
    47 		
       
    48 		MyMXIMPIdentityStub* ret = new (ELeave) MyMXIMPIdentityStub();
       
    49 		CleanupStack::PushL(ret);
       
    50 		return ret;
       
    51 		}
       
    52 
       
    53 	return NULL;
       
    54 	}
       
    55 
       
    56 
       
    57 /**
       
    58  * Instantiates new restricted object collection object.
       
    59  *
       
    60  * @return New restricted object collection instance.
       
    61  *         Object ownership is returned to caller.
       
    62  *
       
    63  * @leave KErrNoMemory if failed to allocate memory.
       
    64  */
       
    65 MXIMPRestrictedObjectCollection* MyMXIMPObjectFactoryStub::NewRestrictedObjectCollectionLC() { return NULL;}
       
    66 
       
    67 
       
    68 /**
       
    69  * Instantiates new object collection object.
       
    70  *
       
    71  * @return New object collection instance.
       
    72  *         Object ownership is returned to caller.
       
    73  *
       
    74  * @leave KErrNoMemory if failed to allocate memory.
       
    75  */
       
    76 MXIMPObjectCollection* MyMXIMPObjectFactoryStub::NewObjectCollectionLC() { return NULL; }
       
    77 
       
    78 
       
    79 /**
       
    80  * Instantiates new data subscription state object.
       
    81  *
       
    82  * @return New data subscription state instance.
       
    83  *         Object ownership is returned to caller.
       
    84  *
       
    85  * @leave KErrNoMemory if failed to allocate memory.
       
    86  */
       
    87 MXIMPDataSubscriptionState* MyMXIMPObjectFactoryStub::NewDataSubscriptionStateLC() { return NULL; }
       
    88 
       
    89 
       
    90 const TAny* MyMXIMPObjectFactoryStub::GetInterface(
       
    91                     TInt32 aInterfaceId,
       
    92                     TIfGetOps aOps ) const
       
    93                     {
       
    94                     	
       
    95                     }
       
    96 
       
    97 TAny* MyMXIMPObjectFactoryStub::GetInterface(
       
    98                     TInt32 aInterfaceId,
       
    99                     TIfGetOps aOps )
       
   100 {
       
   101 	
       
   102 }
       
   103 
       
   104 TInt32 MyMXIMPObjectFactoryStub::GetInterfaceId() const
       
   105 {
       
   106 	
       
   107 }
       
   108 
       
   109