1 // Copyright (c) 2001-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 <ecom/ecom.h>
29 #include <push/cpushhandlerbase.h>
35 inline CPushHandlerBase::CPushHandlerBase()
36 : CActive(EPriorityStandard)
44 inline CPushHandlerBase::~CPushHandlerBase()
46 REComSession::DestroyedImplementation(iDtor_ID_Key);
51 Finds and instantiates an ECom WAP Push Application plug-in that matches the
52 specified Application ID.
55 WAP Push Application plug-in that handles the specified Application ID.
60 inline CPushHandlerBase* CPushHandlerBase::NewL(const TDesC& aMatchData)
62 return NewL(aMatchData, KUidPushHandlerBase);
67 Finds and instantiates an ECom plug-in that implements an interface specialised
68 from CPushHandlerBase.
70 This is a utility function for use by ECom interface classes that specialise
71 CPushHandlerBase, such as CContentHandlerBase.
77 UID of the required derived ECom interface.
80 WAP Push plug-in that handles the specified Application ID.
82 inline CPushHandlerBase* CPushHandlerBase::NewL(const TDesC& aMatchData, const TUid& aInterfaceUid)
84 // Convert match data to 8-bits
85 HBufC8* buf = HBufC8::NewLC(aMatchData.Length());
86 TPtr8 data = buf->Des();
87 data.Copy(aMatchData);
88 data.LowerCase(); // change to lower case
90 // Set resolving parameters
91 TEComResolverParams resolverParams;
92 resolverParams.SetDataType(data);
93 resolverParams.SetWildcardMatch(ETrue);
95 // Get the instantiation
96 CPushHandlerBase* pushHandler = REINTERPRET_CAST(CPushHandlerBase*,
97 REComSession::CreateImplementationL(aInterfaceUid,
98 _FOFF(CPushHandlerBase, iDtor_ID_Key),
100 CleanupStack::PopAndDestroy(buf);
106 Specifies an interface to handle logging.
108 Log messages are intended to aid debugging.
111 Log interface. This is stored in iLog.
113 inline void CPushHandlerBase::SetLogger(MWapPushLog& aLog)
120 Called by the framework to supply a CPluginKiller object.
122 The plug-in calls CPluginKiller::KillPushPlugin() to delete itself when it
123 has completed handling a message.
126 Plugin killer. This is stored in iPluginKiller.
128 inline void CPushHandlerBase::SetKiller(CPluginKiller& aPluginKiller)
130 iPluginKiller = &aPluginKiller;
134 Set the connection manager.
136 @param aManager Reference to connection manager object to be set.*/
137 inline void CPushHandlerBase::SetManager(MConnManObserver& aManager)
139 iManager = &aManager;
144 Stores the passed TRequestStatus and sets it to KRequestPending.
147 Asynchronous status, stored in iConfirmStatus.
149 inline void CPushHandlerBase::SetConfirmationStatus(TRequestStatus& aStatus)
151 aStatus=KRequestPending;
152 iConfirmStatus = &aStatus;
156 Completes the stored asynchronous status with the specified error code.
161 inline void CPushHandlerBase::SignalConfirmationStatus(TInt aErr)
163 User::RequestComplete(iConfirmStatus, aErr);