telephonyprotocols/pdplayer/umts/test/mbufgobblerlayer/src/mbufgobblersubconnproviderfactory.cpp
branchRCL_3
changeset 82 042fd2753b8f
equal deleted inserted replaced
74:9200f38b1324 82:042fd2753b8f
       
     1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Sub Connection Provider Factory
       
    15 //  (control plane)
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #include "mbufgobblersubconnproviderfactory.h"
       
    24 #include "mbufgobblersubconnprovider.h"
       
    25 #include "mbufgobblerlog.h"
       
    26 
       
    27 CMbufGobblerSubconnProviderFactory* CMbufGobblerSubconnProviderFactory::NewL(TAny* aParentContainer)
       
    28     {
       
    29     return new (ELeave) CMbufGobblerSubconnProviderFactory(TUid::Uid(CMbufGobblerSubconnProviderFactory::iUid), 
       
    30                                             *reinterpret_cast<ESock::CSubConnectionFactoryContainer*>(aParentContainer));
       
    31     }
       
    32     
       
    33 CMbufGobblerSubconnProviderFactory::CMbufGobblerSubconnProviderFactory(TUid aFactoryId, ESock::CSubConnectionFactoryContainer& aParentContainer)
       
    34 	: CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer)
       
    35     {
       
    36     }
       
    37 
       
    38 ESock::ACommsFactoryNodeId* CMbufGobblerSubconnProviderFactory::DoCreateObjectL(ESock::TFactoryQueryBase& aQuery)
       
    39     {
       
    40     
       
    41     const ESock::TDefaultSCPRFactoryQuery& query = static_cast<const ESock::TDefaultSCPRFactoryQuery&>(aQuery);
       
    42     if (query.iSCPRType == RSubConnection::EAttachToDefault)
       
    43         {
       
    44         return CMbufGobblerSubconnProvider::NewL(*this);
       
    45         }
       
    46     else if(query.iSCPRType == RSubConnection::ECreateNew)
       
    47     	{
       
    48     	
       
    49     	}
       
    50     else if(query.iSCPRType == RSubConnection::EWaitIncoming)
       
    51     	{
       
    52     
       
    53     	}
       
    54     else //will never get here - should really assert
       
    55         {
       
    56         User::Leave(KErrNotSupported);
       
    57         }
       
    58     return NULL;
       
    59     }