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: Container for Request and Type. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_EVTREQUEST_H |
|
20 #define C_EVTREQUEST_H |
|
21 |
|
22 // System Includes |
|
23 #include <e32base.h> |
|
24 |
|
25 // User Includes |
|
26 #include "evtrequesttype.h" |
|
27 #include "evtevent.h" |
|
28 |
|
29 /** |
|
30 * @class CEvtRequest |
|
31 * A class that encapsulates all the Ui Requests from Handler Server. |
|
32 * |
|
33 * This class is used to store information about Ui Request type. |
|
34 * |
|
35 * @since S60 v9.1 |
|
36 */ |
|
37 class CEvtRequest : public CBase |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Constructs a new instance of CEvtRequest. |
|
42 * |
|
43 * @return The new instance of CEvtRequest object. |
|
44 * @leave System wide error code if the object creation fails. |
|
45 */ |
|
46 IMPORT_C static CEvtRequest* NewL(); |
|
47 |
|
48 /** |
|
49 * Constructs a new instance of CEvtRequest Object. |
|
50 * Leaves the created instance on the cleanup stack. |
|
51 * |
|
52 * @return The new instance of CEvtRequest object. |
|
53 * @leave System wide error code if the object creation fails. |
|
54 */ |
|
55 IMPORT_C static CEvtRequest* NewLC(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CEvtRequest(); |
|
61 |
|
62 public: // Get and Set methods |
|
63 |
|
64 /** |
|
65 * Event object for which we have got request. |
|
66 * This Ownership is NOT transferred. |
|
67 * |
|
68 * @since S60 v9.1 |
|
69 * @return Event identifier identifying the Location Event. |
|
70 */ |
|
71 IMPORT_C CEvtEvent& Event(); |
|
72 |
|
73 /** |
|
74 * Set the Event Object for which the request has come. The |
|
75 * ownership of the aEvent will resides with CEvtRequest. |
|
76 * |
|
77 * @since S60 v9.1 |
|
78 * @param[in] aEvent Event object. |
|
79 */ |
|
80 IMPORT_C void SetEventL( CEvtEvent* aEvent ); |
|
81 |
|
82 /** |
|
83 * Gets the Type of Ui request associated with Event. |
|
84 * |
|
85 * @since S60 v9.1 |
|
86 * @return TEvtRequestType Type of Request. |
|
87 */ |
|
88 IMPORT_C TEvtRequestType RequestType() const; |
|
89 |
|
90 /** |
|
91 * Sets the type of the request associated with Event. |
|
92 * |
|
93 * @since S60 v9.1 |
|
94 * @param[in] aRequestType Type of Ui Request. |
|
95 */ |
|
96 IMPORT_C void SetRequestType( |
|
97 const TEvtRequestType aRequestType ); |
|
98 |
|
99 private: // methods |
|
100 /** |
|
101 * Default C++ Constructor. |
|
102 */ |
|
103 CEvtRequest(); |
|
104 |
|
105 /** |
|
106 * Default Copy Constructor. |
|
107 */ |
|
108 CEvtRequest(CEvtRequest& ); |
|
109 |
|
110 /** |
|
111 * Second phase of the two phase constructor. |
|
112 */ |
|
113 void ConstructL(); |
|
114 |
|
115 private: // data |
|
116 |
|
117 /** |
|
118 * Event Object. |
|
119 * Owned. |
|
120 */ |
|
121 CEvtEvent* iEvent; |
|
122 |
|
123 /** |
|
124 * Request Type. |
|
125 */ |
|
126 TEvtRequestType iRequestType; |
|
127 |
|
128 }; |
|
129 |
|
130 #endif // C_EVTREQUEST_H |
|