1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
28 #include <comms-infras/api_ext_list.h>
29 #include <comms-infras/trbuf.h>
31 class CCommsApiExtReqMsg;
32 class CCommsApiExtRespMsg;
34 class RCommsApiExtensionBase
36 Base class for Comms API extensions.
43 IMPORT_C explicit RCommsApiExtensionBase();
44 IMPORT_C TInt Open(RCommsSubSession& aExtensionProvider, TSupportedCommsApiExt aInterfaceId);
45 IMPORT_C void Close();
46 IMPORT_C void SendRequest(CCommsApiExtReqMsg& aRequestMsg, TDes8& aResponseBuf, TRequestStatus& aStatus);
47 IMPORT_C void SendMessage(CCommsApiExtReqMsg& aRequestMsg);
50 RCommsSubSession iSubSession;
51 TSupportedCommsApiExt iInterfaceId;
54 RPointerArray<Elements::TRBuf8> iBuffers;
57 template<TSupportedCommsApiExt T>
58 class RCommsApiExtension : public RCommsApiExtensionBase
60 Comms API extensions template. New extension APIs may derive from this template.
67 inline TInt Open(RCommsSubSession& aExtensionProvider);
70 template<TSupportedCommsApiExt T>
71 TInt RCommsApiExtension<T>::Open(RCommsSubSession& aExtensionProvider)
73 return RCommsApiExtensionBase::Open(aExtensionProvider,T);
76 #endif // CS_API_EXT_H