33
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2005 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: API for getting refresh notifications.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef RSATREFRESH_H
|
|
21 |
#define RSATREFRESH_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32std.h>
|
|
25 |
#include <etelsat.h>
|
|
26 |
#include <msatrefreshobserver.h>
|
|
27 |
|
|
28 |
// FORWARD DECLARATIONS
|
|
29 |
class RSatSession;
|
|
30 |
class CSatAllowRefreshMonitor;
|
|
31 |
class CSatRefreshMonitor;
|
|
32 |
|
|
33 |
// CLASS DECLARATION
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Sub-session for getting refresh notifies.
|
|
37 |
*
|
|
38 |
* @lib SatClient.lib
|
|
39 |
* @since Series 60 2.6
|
|
40 |
*/
|
|
41 |
class RSatRefresh : public RSubSessionBase
|
|
42 |
{
|
|
43 |
public: // Constructors and destructor
|
|
44 |
|
|
45 |
/**
|
|
46 |
* C++ default constructor.
|
|
47 |
* @param aObserver Observer, which is notified about
|
|
48 |
* refresh.
|
|
49 |
*/
|
|
50 |
IMPORT_C RSatRefresh( MSatRefreshObserver& aObserver );
|
|
51 |
|
|
52 |
public: // New functions
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Opens the sub-session.
|
|
56 |
* @param aSession Opens the sub-session.
|
|
57 |
*/
|
|
58 |
IMPORT_C void OpenL( const RSatSession& aSession );
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Closes the sub-session. Cancels
|
|
62 |
* the notification if active.
|
|
63 |
*/
|
|
64 |
IMPORT_C void Close();
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Starts the waiting for refresh events.
|
|
68 |
*/
|
|
69 |
IMPORT_C void NotifyFileChangeL();
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Starts the waiting for refresh events.
|
|
73 |
* @param aObservedFiles List of files to be observed for refresh.
|
|
74 |
*/
|
|
75 |
IMPORT_C void NotifyFileChangeL(
|
|
76 |
const TSatRefreshFiles& aObservedFiles );
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Indicates client's refresh actions complete.
|
|
80 |
* @param aAdditionEFRead Client has read additional file(s) from those
|
|
81 |
* implicitly defined by refresh.
|
|
82 |
*/
|
|
83 |
IMPORT_C void RefreshEFRead( TBool aAdditionEFRead ) const;
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Cancels the notification.
|
|
87 |
*/
|
|
88 |
IMPORT_C void Cancel() const;
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Gets the notification of refresh query.
|
|
92 |
* @param aType Refresh type.
|
|
93 |
* @param aChangingFiles List of files to be changed if any.
|
|
94 |
* @param aStatus Request status.
|
|
95 |
*/
|
|
96 |
void NotifyAllowRefresh(
|
|
97 |
TPckg<TSatRefreshType>& aType,
|
|
98 |
TPckg<TSatRefreshFiles>& aChangingFiles,
|
|
99 |
TRequestStatus& aStatus ) const;
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Sends response for refresh quary.
|
|
103 |
* @param aAllow ETrue, refresh is allowed, EFalse refresh not allowed.
|
|
104 |
*/
|
|
105 |
void AllowRefreshL( TBool aAllow ) const;
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Cancels the notification.
|
|
109 |
* @param aStatus Request status.
|
|
110 |
*/
|
|
111 |
void CancelNotifyAllowRefresh( TInt aError = KErrNone ) const;
|
|
112 |
|
|
113 |
/**
|
|
114 |
* Gets the notification of refresh.
|
|
115 |
* @param aType Refresh type.
|
|
116 |
* @param aFiles List of changed files if any.
|
|
117 |
* @param aStatus Request status.
|
|
118 |
*/
|
|
119 |
void NotifyRefresh(
|
|
120 |
TPckg<TSatRefreshType>& aType,
|
|
121 |
TPckg<TSatRefreshFiles>& aFiles,
|
|
122 |
TRequestStatus& aStatus ) const;
|
|
123 |
|
|
124 |
/**
|
|
125 |
* Cancels the notification.
|
|
126 |
*/
|
|
127 |
void CancelNotifyRefresh() const;
|
|
128 |
|
|
129 |
private:
|
|
130 |
|
|
131 |
// Prohibit copy constructor if not deriving from CBase.
|
|
132 |
RSatRefresh( const RSatRefresh& );
|
|
133 |
|
|
134 |
// Prohibit assigment operator if not deriving from CBase.
|
|
135 |
RSatRefresh& operator=( const RSatRefresh& );
|
|
136 |
|
|
137 |
private:
|
|
138 |
|
|
139 |
// Observer of refresh events.
|
|
140 |
MSatRefreshObserver& iObserver;
|
|
141 |
|
|
142 |
// Active object to monitor refresh query.
|
|
143 |
CSatAllowRefreshMonitor* iAllowMonitor;
|
|
144 |
|
|
145 |
// Active object to monitor refresh.
|
|
146 |
CSatRefreshMonitor* iRefreshMonitor;
|
|
147 |
|
|
148 |
//lint -e{1510} Desstruction of objects has been taken care
|
|
149 |
};
|
|
150 |
|
|
151 |
#endif // RSATREFRESH_H
|
|
152 |
|
|
153 |
// End of File
|