|
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: Implementation of Base class of Operation Object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "lbtaooperationbase.h" |
|
21 #include "lbtlogger.h" |
|
22 |
|
23 // --------------------------------------------------------------------------- |
|
24 // CLbtAOOperationBase::CLbtAOOperationBase |
|
25 // Default C++ Constructor |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CLbtAOOperationBase::CLbtAOOperationBase( |
|
29 MLbtAOObserver& aObserver, |
|
30 const RMessage2& aMessage, |
|
31 CLbtContainer& aContainer, |
|
32 TInt aClientType) |
|
33 : CActive( EPriorityUserInput ), iObserver(aObserver), |
|
34 iContainer(aContainer), iClientType(aClientType) |
|
35 { |
|
36 FUNC_ENTER("CLbtAOOperationBase::CLbtAOOperationBase"); |
|
37 iMessage = aMessage; |
|
38 // These values cannot be accessed once the RMessage::Complete is called |
|
39 // on the iMessage. Hence we store these values for later access. |
|
40 iSecureId = iMessage.SecureId(); |
|
41 |
|
42 // Save the session pointer |
|
43 iSession = iMessage.Session(); |
|
44 |
|
45 // Save the service id |
|
46 iFunction = iMessage.Function(); |
|
47 } |
|
48 |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // CLbtAOOperationBase::CLbtAOOperationBase |
|
52 // C++ Destructor |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 CLbtAOOperationBase::~CLbtAOOperationBase() |
|
56 { |
|
57 FUNC_ENTER("CLbtAOOperationBase::~CLbtAOOperationBase"); |
|
58 iManagerUidArray.Close(); |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // CLbtAOOperationBase::GetSecureId |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 const TSecureId& CLbtAOOperationBase::GetSecureId() |
|
66 { |
|
67 FUNC_ENTER("CLbtAOOperationBase::GetSecureId"); |
|
68 return iSecureId; |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // CLbtAOOperationBase::GetSession |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 const CSession2* CLbtAOOperationBase::GetSession() |
|
76 { |
|
77 FUNC_ENTER("CLbtAOOperationBase::GetSession"); |
|
78 return iMessage.Session(); |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // CLbtCreateTriggerAOOperation::GetFunction |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 TInt CLbtAOOperationBase::GetFunction() |
|
86 { |
|
87 FUNC_ENTER("CLbtAOOperationBase::GetFunction"); |
|
88 return iFunction; |
|
89 } |
|
90 |
|
91 // --------------------------------------------------------------------------- |
|
92 // CLbtAOOperationBase::GetClientType |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 TInt CLbtAOOperationBase::GetClientType() |
|
96 { |
|
97 FUNC_ENTER("CLbtAOOperationBase::GetClientType"); |
|
98 return iClientType; |
|
99 } |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 // CLbtAOOperationBase::GetSubSessionHandle |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 TInt CLbtAOOperationBase::GetSubSessionHandle() |
|
106 { |
|
107 FUNC_ENTER("CLbtAOOperationBase::GetSubSessionHandle"); |
|
108 return iMessage.Int3(); |
|
109 } |
|
110 |
|
111 // --------------------------------------------------------------------------- |
|
112 // CLbtAOOperationBase::TriggerStoreChanged |
|
113 // --------------------------------------------------------------------------- |
|
114 // |
|
115 void CLbtAOOperationBase::TriggerStoreChanged( RArray<TLbtTriggerId>& /*aTriggerIds*/, |
|
116 TLbtTriggerEventMask /*aEventMask*/, |
|
117 TLbtContainerChangedAreaType /*aAreaType*/, |
|
118 RArray<TUid>& aManagerUids ) |
|
119 { |
|
120 for( TInt i=0;i<aManagerUids.Count();i++ ) |
|
121 { |
|
122 iManagerUidArray.Append( aManagerUids[i] ); |
|
123 } |
|
124 } |
|
125 |
|
126 // --------------------------------------------------------------------------- |
|
127 // CLbtAOOperationBase::GetManagerArray |
|
128 // --------------------------------------------------------------------------- |
|
129 // |
|
130 const RArray<TUid>& CLbtAOOperationBase::GetManagerArray() |
|
131 { |
|
132 return iManagerUidArray; |
|
133 } |
|
134 |
|
135 // --------------------------------------------------------------------------- |
|
136 // CLbtAOOperationBase::RunError |
|
137 // --------------------------------------------------------------------------- |
|
138 // |
|
139 TInt CLbtAOOperationBase::RunError( TInt aError ) |
|
140 { |
|
141 iMessage.Complete( aError ); |
|
142 //iObserver.HandleOperationClosureL(this,aError); |
|
143 return KErrNone; |
|
144 } |
|
145 // end of file |