|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : TSatEventList.cpp |
|
15 // Part of : Common SIM ATK TSY / commonsimatktsy |
|
16 // Event list - related functionality of Sat Tsy |
|
17 // Version : 1.0 |
|
18 // |
|
19 |
|
20 |
|
21 |
|
22 #include "TSatEventList.h" // Class header |
|
23 #include "TfLogger.h" // For TFLOGSTRING |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // TSatEventList::TSatEventList |
|
27 // TSatEventList C++ constructor |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 TSatEventList::TSatEventList |
|
31 ( |
|
32 void |
|
33 ) : iEvents( 0 ) |
|
34 { |
|
35 TFLOGSTRING( "CSAT: TSatEventList::TSatEventList" ); |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // TSatEventList::IsEventEnabled |
|
40 // Check if event is ín the set of enabled events |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 TBool TSatEventList::IsEnabled |
|
44 ( |
|
45 RSat::TEventList aEvent |
|
46 ) const |
|
47 { |
|
48 |
|
49 if( iEvents & TUint32( aEvent ) ) |
|
50 { |
|
51 TFLOGSTRING2( "CSAT: TSatEventList::IsEventEnabled, \ |
|
52 Event Enabled: %d", aEvent ); |
|
53 return ETrue; |
|
54 } |
|
55 else |
|
56 { |
|
57 TFLOGSTRING( "CSAT: TSatEventList::IsEventEnabled, \ |
|
58 Event Not enabled" ); |
|
59 return EFalse; |
|
60 } |
|
61 |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // TSatEventList::RemoveFromEventList |
|
66 // Remove event from set of enabled events |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 void TSatEventList::RemoveFromEventList |
|
70 ( |
|
71 RSat::TEventList aEvent |
|
72 ) |
|
73 { |
|
74 TFLOGSTRING( "CSAT: TSatEventList::RemoveFromEventList" ); |
|
75 iEvents &= ~TUint32( aEvent ); |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // TSatEventList::AddToEventList |
|
80 // Add event to set of enabled events |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 void TSatEventList::AddToEventList |
|
84 ( |
|
85 RSat::TEventList aEvent |
|
86 ) |
|
87 { |
|
88 TFLOGSTRING( "CSAT: TSatEventList::AddToEventList" ); |
|
89 iEvents |= TUint32( aEvent ); |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // TSatEventList::SetEventList |
|
94 // Set the list of enabled events |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void TSatEventList::SetEventList |
|
98 ( |
|
99 TUint32 aEvent |
|
100 ) |
|
101 { |
|
102 TFLOGSTRING2( "CSAT: TSatEventList::SetEventList aEvent:%d", aEvent ); |
|
103 iEvents = aEvent; |
|
104 } |
|
105 |
|
106 // End of File |