|
1 /* |
|
2 * Copyright (c) 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: This is a class for starting services |
|
15 * provided by CCA contactor service |
|
16 * |
|
17 */ |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 #include "ccacontactorserviceheaders.h" |
|
22 |
|
23 // ================= MEMBER FUNCTIONS ======================= |
|
24 |
|
25 // -------------------------------------------------------------------------- |
|
26 // CCAContactorService::ExecuteServiceL |
|
27 // -------------------------------------------------------------------------- |
|
28 // |
|
29 EXPORT_C CCAContactorService* CCAContactorService::NewL() |
|
30 { |
|
31 CCAContactorService* self = new (ELeave) CCAContactorService(); |
|
32 CleanupStack::PushL(self); |
|
33 self->ConstructL(); |
|
34 CleanupStack::Pop(self); |
|
35 return self; |
|
36 } |
|
37 |
|
38 // -------------------------------------------------------------------------- |
|
39 // Destructor |
|
40 // -------------------------------------------------------------------------- |
|
41 // |
|
42 CCAContactorService::~CCAContactorService() |
|
43 { |
|
44 delete iOperator; |
|
45 } |
|
46 |
|
47 // -------------------------------------------------------------------------- |
|
48 // Constructor |
|
49 // -------------------------------------------------------------------------- |
|
50 // |
|
51 CCAContactorService::CCAContactorService() |
|
52 { |
|
53 } |
|
54 |
|
55 // -------------------------------------------------------------------------- |
|
56 // CCAContactorService::ConstructL |
|
57 // -------------------------------------------------------------------------- |
|
58 // |
|
59 void CCAContactorService::ConstructL() |
|
60 { |
|
61 iOperator = CCCAContactorServiceOperator::NewL(); |
|
62 } |
|
63 |
|
64 // -------------------------------------------------------------------------- |
|
65 // CCAContactorService::ExecuteServiceL |
|
66 // -------------------------------------------------------------------------- |
|
67 // |
|
68 EXPORT_C void CCAContactorService::ExecuteServiceL( |
|
69 const TCSParameter& aParameter) |
|
70 { |
|
71 CCA_DP (KCCAContactorServiceLoggerFile, CCA_L ("CCAContactorService::ExecuteServiceL()")); |
|
72 |
|
73 iCommandIsBeingHandled = ETrue; |
|
74 |
|
75 // All leaves are trapped in op class. |
|
76 iOperator->Execute(aParameter); |
|
77 |
|
78 iCommandIsBeingHandled = EFalse; |
|
79 |
|
80 CCA_DP (KCCAContactorServiceLoggerFile, CCA_L ("CCAContactorService::ExecuteServiceL(): Done.")); |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // CCAContactorService::IsBusy |
|
85 // -------------------------------------------------------------------------- |
|
86 // |
|
87 EXPORT_C TBool CCAContactorService::IsBusy() const |
|
88 { |
|
89 return iCommandIsBeingHandled; |
|
90 } |
|
91 |
|
92 // -------------------------------------------------------------------------- |
|
93 // CCAContactorService::IsSelected |
|
94 // -------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C TBool CCAContactorService::IsSelected() const |
|
97 { |
|
98 return iOperator->IsSelected(); |
|
99 } |
|
100 // End of file |