114
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-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: Interface for device status publisher.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef M_AIDEVICESTATUSPUBLISHER_H
|
|
20 |
#define M_AIDEVICESTATUSPUBLISHER_H
|
|
21 |
|
|
22 |
// System includes
|
|
23 |
#include <e32std.h>
|
|
24 |
|
|
25 |
// User includes
|
|
26 |
|
|
27 |
// Forward declarations
|
|
28 |
class CHsContentPublisher;
|
|
29 |
class MAiContentObserver;
|
|
30 |
class MAiPublishPrioritizer;
|
|
31 |
class MAiPublisherBroadcaster;
|
|
32 |
|
|
33 |
/**
|
|
34 |
* @ingroup group_devicestatusplugin
|
|
35 |
*
|
|
36 |
* Interface for device status publisher.
|
|
37 |
*
|
|
38 |
* @since S60 3.2
|
|
39 |
*/
|
|
40 |
class MAiDeviceStatusPublisher
|
|
41 |
{
|
|
42 |
|
|
43 |
public:
|
|
44 |
/**
|
|
45 |
* Virtual destructor.
|
|
46 |
*
|
|
47 |
* Publisher can be destroyed through this interface.
|
|
48 |
*/
|
|
49 |
virtual ~MAiDeviceStatusPublisher() {};
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Subscribe content observer.
|
|
53 |
*
|
|
54 |
* @param aObserver is reference to content observer.
|
|
55 |
* @param aExtension is reference to property extension.
|
|
56 |
* @param aPrioritizer is reference to publish prioritizer.
|
|
57 |
* @param aBroadcaster is reference for publisher broadcaster.
|
|
58 |
*/
|
|
59 |
virtual void Subscribe( MAiContentObserver& aObserver,
|
|
60 |
CHsContentPublisher& aExtension,
|
|
61 |
MAiPublishPrioritizer& aPrioritizer,
|
|
62 |
MAiPublisherBroadcaster& aBroadcaster ) = 0;
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Resume publisher.
|
|
66 |
*
|
|
67 |
* Publisher publishes content if it is available.
|
|
68 |
*/
|
|
69 |
virtual void ResumeL() = 0;
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Refresh publisher.
|
|
73 |
*
|
|
74 |
* This has the same effect as the publisher would get content update from system.
|
|
75 |
* Publisher publishes content if it is available.
|
|
76 |
* @param aClean ETrue if current content needs to be cleaned.
|
|
77 |
*/
|
|
78 |
virtual void RefreshL( TBool aClean ) = 0;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Refresh specific content.
|
|
82 |
*
|
|
83 |
* This has the same effect as the publisher would get content update from system.
|
|
84 |
* Publisher publishes content if it is available.
|
|
85 |
* @param aContentId Id of the content item that is requested to republish.
|
|
86 |
* @param aClean ETrue if current content needs to be cleaned.
|
|
87 |
* @return true if content was republished.
|
|
88 |
*/
|
|
89 |
virtual TBool RefreshL( TInt /*aContentId*/, TBool /*aClean*/ ) { return EFalse; }
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Refresh publisher if not suspended.
|
|
93 |
*
|
|
94 |
* This has the same effect as the publisher would get content update from system.
|
|
95 |
* Publisher publishes content if it is available.
|
|
96 |
* @param aClean ETrue if current content needs to be cleaned.
|
|
97 |
*/
|
|
98 |
virtual void RefreshIfActiveL( TBool /*aClean*/ ) {};
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Suspends specific content.
|
|
102 |
*
|
|
103 |
* Publisher suspends content publishing specified by aContentId.
|
|
104 |
* @param aContentId Id of the content item that is requested to suspend.
|
|
105 |
* @param aClean ETrue if current content needs to be cleaned.
|
|
106 |
* @return true if content was suspended.
|
|
107 |
*/
|
|
108 |
virtual TBool SuspendL( TInt /*aContentId*/, TBool /*aClean*/ ) { return EFalse; }
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Refresh specific content with specific priority.
|
|
112 |
*
|
|
113 |
* This has the same effect as the publisher would get content update from system.
|
|
114 |
* Publisher publishes content if it is available and has correct priority.
|
|
115 |
* @param aContentId Id of the content item that is requested to republish.
|
|
116 |
* @param aPriority Priority of the content that needs to be refreshed.
|
|
117 |
* @return true if content was republished.
|
|
118 |
*/
|
|
119 |
virtual TBool RefreshContentWithPriorityL( TInt /*aContentId*/, TInt /*aPriority*/ ) { return EFalse; }
|
|
120 |
};
|
|
121 |
|
|
122 |
#endif // M_AIDEVICESTATUSPUBLISHER_H
|
|
123 |
|
|
124 |
// End of file
|