62
|
1 |
// Copyright (c) 2006-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 |
// tpushhandler.cpp
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
// System includes
|
|
19 |
#include <e32base.h>
|
|
20 |
#include <e32std.h>
|
|
21 |
#include <ecom/implementationproxy.h>
|
|
22 |
#include <push/pushdispatcher.h>
|
|
23 |
#include <push/pushlog.h>
|
|
24 |
#include <push/cpushhandlerbase.h>
|
|
25 |
#include <push/pluginkiller.h>
|
|
26 |
|
|
27 |
// Local includes
|
|
28 |
|
|
29 |
_LIT(KReserved, "Reserved");
|
|
30 |
|
|
31 |
class CTPushAppHandler : public CPushHandlerBase
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
static CTPushAppHandler* NewL ();
|
|
35 |
virtual ~CTPushAppHandler();
|
|
36 |
|
|
37 |
private:
|
|
38 |
|
|
39 |
void HandleMessageL(CPushMessage* aPushMsg, TRequestStatus& aStatus);
|
|
40 |
void CancelHandleMessage();
|
|
41 |
void HandleMessageL(CPushMessage* aPushMsg);
|
|
42 |
virtual void CPushHandlerBase_Reserved1();
|
|
43 |
virtual void CPushHandlerBase_Reserved2();
|
|
44 |
private:
|
|
45 |
void DoCancel();
|
|
46 |
void RunL();
|
|
47 |
|
|
48 |
private:
|
|
49 |
CTPushAppHandler();
|
|
50 |
};
|
|
51 |
|
|
52 |
CTPushAppHandler* CTPushAppHandler::NewL ()
|
|
53 |
{
|
|
54 |
CTPushAppHandler* self = new (ELeave)CTPushAppHandler;
|
|
55 |
return self;
|
|
56 |
}
|
|
57 |
|
|
58 |
CTPushAppHandler::CTPushAppHandler ()
|
|
59 |
: CPushHandlerBase()
|
|
60 |
{
|
|
61 |
CActiveScheduler::Add(this);
|
|
62 |
}
|
|
63 |
|
|
64 |
CTPushAppHandler::~CTPushAppHandler ()
|
|
65 |
{
|
|
66 |
__LOG_PTR_DEBUG("CTPushAppHandler:: Destructor Called");
|
|
67 |
}
|
|
68 |
|
|
69 |
void CTPushAppHandler::HandleMessageL( CPushMessage* /* aPushMsg */, TRequestStatus& /* aStatus */ )
|
|
70 |
{
|
|
71 |
// do nothing
|
|
72 |
}
|
|
73 |
|
|
74 |
void CTPushAppHandler::CancelHandleMessage()
|
|
75 |
{
|
|
76 |
// do nothing
|
|
77 |
}
|
|
78 |
|
|
79 |
void CTPushAppHandler::HandleMessageL ( CPushMessage* aPushMsg )
|
|
80 |
{
|
|
81 |
__LOG_PTR_DEBUG("CTPushAppHandler::HandleMessageL Sync Func. Called");
|
|
82 |
|
|
83 |
// plugin takes the ownership of the push message.
|
|
84 |
CleanupStack::PushL ( aPushMsg );
|
|
85 |
|
|
86 |
// Leave from here
|
|
87 |
User::Leave ( KErrGeneral );
|
|
88 |
}
|
|
89 |
|
|
90 |
void CTPushAppHandler::DoCancel()
|
|
91 |
{
|
|
92 |
}
|
|
93 |
|
|
94 |
void CTPushAppHandler::RunL()
|
|
95 |
{
|
|
96 |
SignalConfirmationStatus ( KErrNone );
|
|
97 |
iPluginKiller->KillPushPlugin ();
|
|
98 |
}
|
|
99 |
|
|
100 |
void CTPushAppHandler::CPushHandlerBase_Reserved1()
|
|
101 |
{
|
|
102 |
User::Panic(KReserved, KErrNotSupported);
|
|
103 |
}
|
|
104 |
|
|
105 |
void CTPushAppHandler::CPushHandlerBase_Reserved2()
|
|
106 |
{
|
|
107 |
User::Panic(KReserved, KErrNotSupported);
|
|
108 |
}
|
|
109 |
|
|
110 |
const TImplementationProxy ImplementationTable[] =
|
|
111 |
{
|
|
112 |
IMPLEMENTATION_PROXY_ENTRY(0x102822AC, CTPushAppHandler::NewL)
|
|
113 |
};
|
|
114 |
|
|
115 |
|
|
116 |
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
|
|
117 |
{
|
|
118 |
aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
|
|
119 |
|
|
120 |
return ImplementationTable;
|
|
121 |
}
|
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
#ifndef EKA2
|
|
126 |
GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
|
|
127 |
//
|
|
128 |
// DLL entry point.
|
|
129 |
{
|
|
130 |
return(KErrNone);
|
|
131 |
}
|
|
132 |
#endif
|