19
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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 the License "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: CSysInfoService class implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef _SYSREQUEST_H_
|
|
20 |
#define _SYSREQUEST_H_
|
|
21 |
|
|
22 |
/**
|
|
23 |
* @ref TSysRequest
|
|
24 |
* This is internal class to encapsulate all input parameters in
|
|
25 |
* specifying request.
|
|
26 |
* A request typically contains
|
|
27 |
* 1. Entity.
|
|
28 |
* 2. Key.
|
|
29 |
* 3. @ref TRequestType enumerated request types.
|
|
30 |
* 4. @ref CSysData optional input data Ex. threshold signal
|
|
31 |
* strength for notification.
|
|
32 |
* 5. TransactionID for asynchronous requests.
|
|
33 |
* 6. Observer to handle async response.
|
|
34 |
*
|
|
35 |
* @lib sysinfoservice.lib
|
|
36 |
* @since S60 3.2
|
|
37 |
*/
|
|
38 |
class TSysRequest
|
|
39 |
{
|
|
40 |
public:
|
|
41 |
// Enumeration of possible request types.
|
|
42 |
enum TRequestType
|
|
43 |
{
|
|
44 |
ESynchronous,
|
|
45 |
EASyncONESHOT,
|
|
46 |
ENotification
|
|
47 |
};
|
|
48 |
|
|
49 |
public: // Constructors and destructor
|
|
50 |
/**
|
|
51 |
* C++ default constructor(s).
|
|
52 |
*/
|
|
53 |
inline TSysRequest( const TPtrC aEntity, const TPtrC aKey,
|
|
54 |
TInt32 aTransID,
|
|
55 |
ISystemObserver* aCallback,
|
|
56 |
TRequestType aReqType = ESynchronous);
|
|
57 |
/**
|
|
58 |
* C++ default constructor(s).
|
|
59 |
*/
|
|
60 |
inline TSysRequest( const TDesC& aEntity, const TDesC& aKey,
|
|
61 |
const CSysData* aData,
|
|
62 |
TInt32 aTransactionID,
|
|
63 |
ISystemObserver* aCallback,
|
|
64 |
TRequestType aReqType = ESynchronous);
|
|
65 |
|
|
66 |
public:
|
|
67 |
|
|
68 |
/**
|
|
69 |
* @returns Entity of the System Infomation Identifier.
|
|
70 |
*/
|
|
71 |
inline const TPtrC Entity() const;
|
|
72 |
|
|
73 |
/**
|
|
74 |
* @returns Entity of the System Infomation Identifier.
|
|
75 |
*/
|
|
76 |
inline const TPtrC Key() const;
|
|
77 |
|
|
78 |
/**
|
|
79 |
* @returns Transaction ID associated with the request.
|
|
80 |
*/
|
|
81 |
inline TInt32 TransactionID() const;
|
|
82 |
|
|
83 |
/**
|
|
84 |
* @returns System data.
|
|
85 |
*/
|
|
86 |
inline const CSysData* SystemData() const;
|
|
87 |
|
|
88 |
/**
|
|
89 |
* @returns Type of request @ref TRequestType.
|
|
90 |
*/
|
|
91 |
inline TRequestType RequestType() const;
|
|
92 |
|
|
93 |
/**
|
|
94 |
* @returns observer @ref TRequestType.
|
|
95 |
*/
|
|
96 |
inline ISystemObserver* Observer() const;
|
|
97 |
|
|
98 |
private: //DATA
|
|
99 |
/**
|
|
100 |
* Entity
|
|
101 |
*/
|
|
102 |
const TPtrC iEntity;
|
|
103 |
/**
|
|
104 |
* Key
|
|
105 |
*/
|
|
106 |
const TPtrC iKey;
|
|
107 |
/**
|
|
108 |
* Type of request.
|
|
109 |
*/
|
|
110 |
TRequestType iRequestType;
|
|
111 |
/**
|
|
112 |
* System data.
|
|
113 |
*/
|
|
114 |
const CSysData* iSysData;
|
|
115 |
/**
|
|
116 |
* Transaction ID.
|
|
117 |
*/
|
|
118 |
TInt32 iTransactionID;
|
|
119 |
/**
|
|
120 |
* Observer
|
|
121 |
*/
|
|
122 |
ISystemObserver* iObserver;
|
|
123 |
};
|
|
124 |
|
|
125 |
#include "sysrequest.inl"
|
|
126 |
|
|
127 |
#endif _SYSREQUEST_H_
|
|
128 |
|
|
129 |
//End of file
|