|
1 /* |
|
2 * Copyright (c) 2006 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: Network identity related prioritizer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef M_AIPUBLISHPRIORITIZER_H |
|
21 #define M_AIPUBLISHPRIORITIZER_H |
|
22 |
|
23 #include "aicontentobserver.h" |
|
24 |
|
25 class MAiPublisherBroadcaster; |
|
26 |
|
27 |
|
28 /** |
|
29 * @ingroup group_devicestatusplugin |
|
30 * |
|
31 * Network identity related prioritizer. |
|
32 * |
|
33 * This class is used as proxy between publishers which publish data that |
|
34 * needs to be priorised and content observers. It keeps record of published |
|
35 * data and decides if new published data has high enough priority to go |
|
36 * through to content observer. |
|
37 * |
|
38 * @since S60 3.2 |
|
39 */ |
|
40 class MAiPublishPrioritizer |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Invoked by publisher that publishes prioritized data. |
|
47 * Data is published only if aPriority is same or higher than |
|
48 * current priority. |
|
49 * |
|
50 * @param aBroadcaster - Publisher broadcaster implementation. |
|
51 * @param aContent - identification of content selector, MUST correspond |
|
52 * single content selector supported by plug-in. The framework |
|
53 * utilizes the selector id to match for cid and MIME type. |
|
54 * @param aResource - identification of content reference, MUST correspond |
|
55 * single content reference supported by plug-in. The framework |
|
56 * utilizes the reference if to match for cid and MIME type of the |
|
57 * content supplied with in UI definition. |
|
58 * @param aPriority - priority of published data. |
|
59 */ |
|
60 virtual void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
61 TInt aContent, |
|
62 TInt aResource, |
|
63 TInt aPriority ) = 0; |
|
64 |
|
65 /** |
|
66 * Invoked by publisher that publishes prioritized data. |
|
67 * Data is published only if aPriority is same or higher than |
|
68 * current priority. |
|
69 * |
|
70 * @param aBroadcaster - Publisher broadcaster implementation. |
|
71 * @param aContent - identification of content selector, MUST correspond |
|
72 * single content selector supported by plug-in. The framework |
|
73 * utilizes the selector id to match for cid and MIME type. |
|
74 * @param aText - Textual content in UNICODE. |
|
75 * @param aPriority - priority of published data. |
|
76 */ |
|
77 virtual void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
78 TInt aContent, |
|
79 const TDesC16& aText, |
|
80 TInt aPriority ) = 0; |
|
81 |
|
82 /** |
|
83 * Invoked by publisher that publishes prioritized data. |
|
84 * Data is published only if aPriority is same or higher than |
|
85 * current priority. |
|
86 * |
|
87 * @param aBroadcaster - Publisher broadcaster implementation. |
|
88 * @param aContent - identification of content selector, MUST correspond |
|
89 * single content selector supported by plug-in. The framework |
|
90 * utilizes the selector id to match for cid and MIME type. |
|
91 * @param aBuf - instance of content. |
|
92 * @param aPriority - priority of published data. |
|
93 */ |
|
94 virtual void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
95 TInt aContent, |
|
96 const TDesC8& aBuf, |
|
97 TInt aPriority ) = 0; |
|
98 |
|
99 /** |
|
100 * Invoked by publisher that wants to clean previously published data. |
|
101 * Data is cleaned only if aPriority is same than current priority. |
|
102 * |
|
103 * @param aBroadcaster - Publisher broadcaster implementation. |
|
104 * @param aContent - identification of content selector, MUST correspond |
|
105 * single content selector supported by plug-in. The framework |
|
106 * utilizes the selector id to match for cid and MIME type. |
|
107 * @param aPriority - priority of published data. |
|
108 */ |
|
109 virtual void TryToCleanL( MAiPublisherBroadcaster& aBroadcaster, |
|
110 TInt aContent, |
|
111 TInt aPriority ) = 0; |
|
112 |
|
113 }; |
|
114 |
|
115 |
|
116 #endif // M_AIPUBLISHPRIORITIZER_H |