29
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: class to publish the data into widget
|
|
15 |
*
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CSERVICEWIDGETCONTENTPUBLISHER_H
|
|
21 |
#define CSERVICEWIDGETCONTENTPUBLISHER_H
|
|
22 |
|
|
23 |
#include <liwservicehandler.h>
|
|
24 |
#include <liwvariant.h>
|
|
25 |
#include <liwgenericparam.h>
|
|
26 |
#include "servicewidgetcpglobals.h"
|
|
27 |
#include "mservicewidgetobservers.h"
|
|
28 |
|
|
29 |
class MServiceWidgetEventObserver;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* @class servicewidgetdatapubliser
|
|
33 |
* @since 5.0
|
|
34 |
*/
|
|
35 |
class CServiceWidgetContentPublisher: public CBase,
|
|
36 |
public MLiwNotifyCallback
|
|
37 |
{
|
|
38 |
|
|
39 |
|
|
40 |
public:
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Two-phased constructor.
|
|
44 |
*/
|
|
45 |
static CServiceWidgetContentPublisher* NewL(MServiceWidgetEventObserver& aObserver);
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Two-phased constructor.
|
|
49 |
*/
|
|
50 |
static CServiceWidgetContentPublisher* NewLC(MServiceWidgetEventObserver& aObserver);
|
|
51 |
|
|
52 |
/**
|
|
53 |
* @function ~CServiceWidgetContentPublisher
|
|
54 |
* @discussion Destroy the object and release all memory objects
|
|
55 |
*/
|
|
56 |
~CServiceWidgetContentPublisher();
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
public:
|
|
61 |
|
|
62 |
/**
|
|
63 |
* publish the text with given details and actions
|
|
64 |
* @param aPublisherId, publisher id
|
|
65 |
* @param aInstId, Instance id
|
|
66 |
* @paramconst aOwnTextToAdd Own text (updated in first row)
|
|
67 |
* @paramconst aStatusTextToAdd status text (updated in second row)
|
|
68 |
* @param aBitmapHandle image handle to add
|
|
69 |
* @param aMaskHandle, image mask handle to add
|
|
70 |
*/
|
|
71 |
void PublishDataWithActionL( const TDesC& aPublisherId,
|
|
72 |
const TDesC& aInstId,
|
|
73 |
const TDesC& aOwnTextToAdd,
|
|
74 |
const TDesC& aStatusTextToAdd,
|
|
75 |
TInt aBitmapHandle,
|
|
76 |
TInt aMaskHandle,
|
|
77 |
TInt sericonbitmapHandle,
|
|
78 |
TInt sericonmaskHandle
|
|
79 |
);
|
|
80 |
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Notifies event from widget (from CPS)
|
|
84 |
* @param aCmdId, cmd id
|
|
85 |
* @param aEventParamList
|
|
86 |
* @param aInParamList
|
|
87 |
*/
|
|
88 |
virtual TInt HandleNotifyL(TInt aCmdId, TInt /*aEventId*/,
|
|
89 |
CLiwGenericParamList& aEventParamList,
|
|
90 |
const CLiwGenericParamList& aInParamList);
|
|
91 |
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Unregister widget from CPS
|
|
95 |
* @param aPublisherId, publisher id
|
|
96 |
*/
|
|
97 |
void UnregisterWidgetL(const TDesC& aPublisherId );
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Unregister all widgets from CPS
|
|
101 |
*/
|
|
102 |
void UnregisterAllWidgetsL(RArray<TInt>* aServiceArray);
|
|
103 |
|
|
104 |
/**
|
|
105 |
* Register widget from CPS
|
|
106 |
* @param aPublisherId, publisher id
|
|
107 |
*/
|
|
108 |
void RegisterWidgetL(const TDesC& aPublisherId,
|
|
109 |
TInt aBitmapHandle,
|
|
110 |
TInt aMaskHandle );
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Remove data from widget
|
|
114 |
* @param aPublisherId, publisher id
|
|
115 |
*/
|
|
116 |
void RemoveWidgetDataL(const TDesC& aPublisherId,const TDesC& aInstId );
|
|
117 |
|
|
118 |
private:
|
|
119 |
|
|
120 |
/**
|
|
121 |
* @function ConstructL
|
|
122 |
* @discussion Perform the second phase construction of a CServiceWidgetContentPublisher object
|
|
123 |
* this needs to be public due to the way the framework constructs the AppUi
|
|
124 |
*/
|
|
125 |
void ConstructL();
|
|
126 |
|
|
127 |
/**
|
|
128 |
*@function CServiceWidgetContentPublisher
|
|
129 |
* @discussion Perform the first phase of two phase construction.
|
|
130 |
* This needs to be public due to the way the framework constructs the AppUi
|
|
131 |
*/
|
|
132 |
CServiceWidgetContentPublisher(MServiceWidgetEventObserver& aObserver);
|
|
133 |
|
|
134 |
/**
|
|
135 |
* GetMessagingInterfaceL get interface from liw
|
|
136 |
*/
|
|
137 |
MLiwInterface* GetMessagingInterfaceL( );
|
|
138 |
|
|
139 |
private: // data
|
|
140 |
|
|
141 |
MServiceWidgetEventObserver& iObserver;
|
|
142 |
// owns : message interface to liw
|
|
143 |
MLiwInterface* iMsgInterface;
|
|
144 |
// owns : liw service handler
|
|
145 |
CLiwServiceHandler* iServiceHandler;
|
|
146 |
};
|
|
147 |
|
|
148 |
#endif // CSERVICEWIDGETCONTENTPUBLISHER_H
|
|
149 |
|