servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnppint.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-2009 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 // @file
       
    15 // @internalComponent
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __UPNPPINT_H_
       
    20 #define __UPNPPINT_H_
       
    21 
       
    22 #include <comms-infras/ss_protflow.h> 
       
    23 #include <comms-infras/ss_nodemessages.h> 
       
    24 #include <cchunkmanager.h>
       
    25 #include "cprotocolhandler.h"
       
    26 #include "genericcontainer.h"
       
    27 
       
    28 class CUPnPProtocolIntfBase;
       
    29 class CUPnPProtocolIntfFactory : public ESock::CProtocolIntfFactoryBase
       
    30 /**
       
    31 UPnP Protocol-Interface Factory
       
    32 */
       
    33 	{		
       
    34 public:	
       
    35 	static CUPnPProtocolIntfFactory* CUPnPProtocolIntfFactory::NewL(TUid aFactoryId, ESock::CProtocolIntfFactoryContainer& aParentContainer);					
       
    36 protected:
       
    37 	CUPnPProtocolIntfFactory(TUid /*aFactoryId*/, ESock::CProtocolIntfFactoryContainer& /*aParentContainer*/);
       
    38 	
       
    39 	//from CProtocolIntfFactoryBase
       
    40 	virtual ESock::CProtocolIntfBase* DoCreateProtocolIntfL(ESock::TFactoryQueryBase& aQuery);
       
    41 	};
       
    42 
       
    43 
       
    44 // ==========================================================================================
       
    45 /** Base Class for implementing UPnP Protocol Interfaces.
       
    46 */
       
    47 
       
    48 class CHttpServer;
       
    49 class CUPnPProtocolIntfBase : public ESock::CProtocolIntfBase
       
    50 	{	
       
    51 public:
       
    52 	static CUPnPProtocolIntfBase * NewL(ESock::CProtocolIntfFactoryBase& aFactory, const Messages::TNodeId& aId);
       
    53 	virtual ~CUPnPProtocolIntfBase();	
       
    54 	void AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver,  Messages::TNodeCtxId aServiceId, Messages::TNodeCtxId aControlProviderId );
       
    55 	void RemoveServiceUri ( const TDesC8& aUri,  Messages::TNodeCtxId aServiceId, Messages::TNodeCtxId aControlProviderId );
       
    56 	const Messages::TNodeId& GetAppProtIntfContainerId();
       
    57 	void SetChunkManager(CChunkManager* aChunkManager);
       
    58 	CChunkManager* GetMemoryChunkManager();
       
    59 protected:
       
    60 	// from CProtocolIntfBase
       
    61 	CUPnPProtocolIntfBase(ESock::CProtocolIntfFactoryBase& aFactory, const Messages::TNodeId& aId);
       
    62 	void ConstructL();
       
    63 	inline void DoFlowCreated(ESock::CSubConnectionFlowBase& aFlow);
       
    64 	inline void DoFlowBeingDeleted(ESock::CSubConnectionFlowBase& aFlow);
       
    65 		
       
    66 private:
       
    67 	CHttpServer*			iHttpServer;
       
    68 	CChunkManager*  		iMemChunkManager;
       
    69 	CAppProtIntfFactoryContainer* iAppProtIntfFactoryContainer;
       
    70 	};
       
    71 
       
    72 void CUPnPProtocolIntfBase::DoFlowCreated ( ESock::CSubConnectionFlowBase& /*aFlow*/ )
       
    73 	{
       
    74 	}
       
    75 
       
    76 void CUPnPProtocolIntfBase::DoFlowBeingDeleted ( ESock::CSubConnectionFlowBase& /*aFlow*/ )
       
    77 	{	
       
    78 	}
       
    79 
       
    80 
       
    81 #endif //UPNPPINT_H