|
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: implementation of single request to fw |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "cicpservicerequest.h" |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <ximpbase.h> |
|
23 |
|
24 // --------------------------------------------------------- |
|
25 // CICPServiceRequest::two phase construction |
|
26 // --------------------------------------------------------- |
|
27 |
|
28 CICPServiceRequest* CICPServiceRequest::NewL(TXIMPRequestId& aRequestId, |
|
29 TIMConnProviderEnums::TRequestTypes aType) |
|
30 { |
|
31 CICPServiceRequest* self = CICPServiceRequest::NewLC(aRequestId, aType); |
|
32 CleanupStack::Pop( self ); |
|
33 return self; |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------- |
|
37 // CICPServiceRequest::two phase construction |
|
38 // --------------------------------------------------------- |
|
39 CICPServiceRequest* CICPServiceRequest::NewLC(TXIMPRequestId& aRequestId, |
|
40 TIMConnProviderEnums::TRequestTypes aType) |
|
41 { |
|
42 CICPServiceRequest* self = new (ELeave) CICPServiceRequest(aRequestId, aType); |
|
43 CleanupStack::PushL( self ); |
|
44 self->ConstructL(); |
|
45 return self; |
|
46 } |
|
47 |
|
48 |
|
49 // --------------------------------------------------------- |
|
50 // CICPServiceRequest::~CICPServiceRequest |
|
51 // |
|
52 // --------------------------------------------------------- |
|
53 CICPServiceRequest::~CICPServiceRequest() |
|
54 { |
|
55 |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------- |
|
59 // CICPServiceRequest::ConstructL |
|
60 // |
|
61 // --------------------------------------------------------- |
|
62 void CICPServiceRequest::ConstructL() |
|
63 { |
|
64 |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------- |
|
68 // CICPServiceRequest::CICPServiceRequest |
|
69 // |
|
70 // --------------------------------------------------------- |
|
71 CICPServiceRequest::CICPServiceRequest(TXIMPRequestId& aRequestId, |
|
72 TIMConnProviderEnums::TRequestTypes aType): |
|
73 iRequestId(aRequestId), |
|
74 iReqType(aType) |
|
75 { |
|
76 |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------- |
|
80 // CICPServiceRequest::StartWait |
|
81 // |
|
82 // --------------------------------------------------------- |
|
83 void CICPServiceRequest::StartWait() |
|
84 { |
|
85 if( ! iWait.IsStarted() ) |
|
86 { |
|
87 // codescanner warning can be ignored, we are not starting an active object but |
|
88 // CActiveSchedulerWait. |
|
89 iWait.Start(); |
|
90 } |
|
91 |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------- |
|
95 // CICPServiceRequest::StopWait |
|
96 // |
|
97 // --------------------------------------------------------- |
|
98 void CICPServiceRequest::StopWait() |
|
99 { |
|
100 if(iWait.IsStarted() ) |
|
101 { |
|
102 iWait.AsyncStop(); |
|
103 } |
|
104 } |
|
105 |
|
106 // --------------------------------------------------------- |
|
107 // CICPServiceRequest::GetRequestId |
|
108 // |
|
109 // --------------------------------------------------------- |
|
110 const TXIMPRequestId& CICPServiceRequest::GetRequestId() const |
|
111 { |
|
112 return iRequestId ; |
|
113 } |
|
114 |
|
115 // --------------------------------------------------------- |
|
116 // CICPServiceRequest::IsWaitStarted |
|
117 // |
|
118 // --------------------------------------------------------- |
|
119 TBool CICPServiceRequest::IsWaitStarted() |
|
120 { |
|
121 return iWait.IsStarted() ; |
|
122 } |
|
123 |
|
124 |
|
125 // --------------------------------------------------------- |
|
126 // CICPServiceRequest::SetRequestType |
|
127 // |
|
128 // --------------------------------------------------------- |
|
129 void CICPServiceRequest::SetRequestType(TIMConnProviderEnums::TRequestTypes aType) |
|
130 { |
|
131 iReqType = aType ; |
|
132 } |
|
133 |
|
134 |
|
135 // --------------------------------------------------------- |
|
136 // CICPServiceRequest::RequestType |
|
137 // |
|
138 // --------------------------------------------------------- |
|
139 TIMConnProviderEnums::TRequestTypes CICPServiceRequest::RequestType() const |
|
140 { |
|
141 return iReqType ; |
|
142 } |
|
143 // end of file |