williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @internalTechnology williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef CS_API_EXT_H williamr@2: #define CS_API_EXT_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class CCommsApiExtReqMsg; williamr@2: class CCommsApiExtRespMsg; williamr@2: williamr@2: class RCommsApiExtensionBase williamr@2: /** williamr@2: Base class for Comms API extensions. williamr@2: williamr@2: @internalTechnology williamr@2: @released williamr@2: */ williamr@2: { williamr@2: protected: williamr@2: IMPORT_C explicit RCommsApiExtensionBase(); williamr@2: IMPORT_C TInt Open(RCommsSubSession& aExtensionProvider, TSupportedCommsApiExt aInterfaceId); williamr@2: IMPORT_C void Close(); williamr@2: IMPORT_C void SendRequest(CCommsApiExtReqMsg& aRequestMsg, TDes8& aResponseBuf, TRequestStatus& aStatus); williamr@2: IMPORT_C void SendMessage(CCommsApiExtReqMsg& aRequestMsg); williamr@2: williamr@2: protected: williamr@2: RCommsSubSession iSubSession; williamr@2: TSupportedCommsApiExt iInterfaceId; williamr@2: williamr@2: private: williamr@2: RPointerArray iBuffers; williamr@2: }; williamr@2: williamr@2: template williamr@2: class RCommsApiExtension : public RCommsApiExtensionBase williamr@2: /** williamr@2: Comms API extensions template. New extension APIs may derive from this template. williamr@2: williamr@2: @internalTechnology williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: inline TInt Open(RCommsSubSession& aExtensionProvider); williamr@2: }; williamr@2: williamr@2: template williamr@2: TInt RCommsApiExtension::Open(RCommsSubSession& aExtensionProvider) williamr@2: { williamr@2: return RCommsApiExtensionBase::Open(aExtensionProvider,T); williamr@2: } williamr@2: williamr@2: #endif // CS_API_EXT_H