|
1 /* |
|
2 * Copyright (c) 2007-2007 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: CIAUpdateRendezvous |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IA_UPDATE_RENDEZVOUS_H |
|
21 #define IA_UPDATE_RENDEZVOUS_H |
|
22 |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <e32std.h> |
|
26 |
|
27 class MIAUpdateRendezvousObserver; |
|
28 |
|
29 |
|
30 /** |
|
31 * CIAUpdateRendezvous |
|
32 * |
|
33 * This is a CActive class that observes when another |
|
34 * process completes rendezvous request. |
|
35 * When this observer is informed about the completion, |
|
36 * this class object informs the MIAUpdateRendezvousObserver |
|
37 * about the completion. |
|
38 * |
|
39 * @see MIAUpdateRendezvousObserver |
|
40 * |
|
41 * @since S60 v3.2 |
|
42 */ |
|
43 class CIAUpdateRendezvous : public CActive |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 /** |
|
49 * @param aObserver The information about the completion of |
|
50 * an operation is forwarded to this observer by calling its callback |
|
51 * function. |
|
52 * @return CIAUpdateRendezvous* Newly created object. |
|
53 * |
|
54 * @since S60 v3.2 |
|
55 */ |
|
56 static CIAUpdateRendezvous* NewL( MIAUpdateRendezvousObserver& aObserver ); |
|
57 |
|
58 /** |
|
59 * @see NewL |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 */ |
|
63 static CIAUpdateRendezvous* NewLC( MIAUpdateRendezvousObserver& aObserver ); |
|
64 |
|
65 |
|
66 /** |
|
67 * Destructor |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 */ |
|
71 virtual ~CIAUpdateRendezvous(); |
|
72 |
|
73 |
|
74 /** |
|
75 * Sets this object active for observing a rendezvous operation. |
|
76 * |
|
77 * @param aProcessId Process id of the on-going process whose rendezvous |
|
78 * will be listened here. |
|
79 * |
|
80 * @since S60 v3.2 |
|
81 */ |
|
82 void StartL( const TProcessId& aProcessId ); |
|
83 |
|
84 |
|
85 protected: // CActive |
|
86 |
|
87 /** |
|
88 * @see CActive::DoCancel |
|
89 * |
|
90 * Cancels the operation. |
|
91 * |
|
92 * @since S60 v3.2 |
|
93 */ |
|
94 virtual void DoCancel(); |
|
95 |
|
96 /** |
|
97 * @see CActive::RunL |
|
98 * |
|
99 * When the rendezvous process releases the rendezvous, this function calls |
|
100 * the callback function of the observer. |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 */ |
|
104 virtual void RunL(); |
|
105 |
|
106 |
|
107 protected: |
|
108 |
|
109 /** |
|
110 * @see NewL |
|
111 * |
|
112 * @since S60 v3.2 |
|
113 */ |
|
114 CIAUpdateRendezvous( MIAUpdateRendezvousObserver& aObserver ); |
|
115 |
|
116 /** |
|
117 * @see NewL |
|
118 * |
|
119 * @since S60 v3.2 |
|
120 */ |
|
121 virtual void ConstructL(); |
|
122 |
|
123 |
|
124 /** |
|
125 * @return MIAUpdateRendezvousObserver& The information |
|
126 * about the completion of an operation is forwarded to |
|
127 * this observer by calling its callback function. |
|
128 * Ownership is not transferred. |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 */ |
|
132 MIAUpdateRendezvousObserver& Observer(); |
|
133 |
|
134 /** |
|
135 * @return RProcess& Handle to the process that is listening to the |
|
136 * rendezvous to complete. |
|
137 * |
|
138 * @since S60 v3.2 |
|
139 */ |
|
140 RProcess& RendezvousProcess(); |
|
141 |
|
142 |
|
143 private: |
|
144 |
|
145 // Prevent these if not implemented |
|
146 CIAUpdateRendezvous( const CIAUpdateRendezvous& aObject ); |
|
147 CIAUpdateRendezvous& operator =( const CIAUpdateRendezvous& aObject ); |
|
148 |
|
149 |
|
150 private: // data |
|
151 |
|
152 // The information about the completion of |
|
153 // an operation is forwarded to this observer |
|
154 // by calling its callback function. |
|
155 MIAUpdateRendezvousObserver& iObserver; |
|
156 |
|
157 // The process handle that is listening the rendezvous. |
|
158 RProcess iProcess; |
|
159 }; |
|
160 |
|
161 #endif // IA_UPDATE_RENDEZVOUS_H |