|
1 /* |
|
2 * Copyright (c) 2002-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: Phonebook 2 SIM service table information. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPSU2SERVICETABLE_H |
|
20 #define TPSU2SERVICETABLE_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32std.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 /** |
|
28 * Phonebook 2 SIM service table information. |
|
29 * Responsible for making service table request to ETel. |
|
30 */ |
|
31 class TPsu2ServiceTable |
|
32 { |
|
33 public: // Interface |
|
34 |
|
35 /** |
|
36 * Sets the service table. |
|
37 * |
|
38 * @param aTable The new service table. |
|
39 */ |
|
40 inline void SetServiceTable( |
|
41 TUint32 aTable ); |
|
42 |
|
43 /** |
|
44 * Offers the service table. |
|
45 * |
|
46 * @return A reference to the SIM or USIM service table. |
|
47 */ |
|
48 inline const TUint32& ServiceTable() const; |
|
49 |
|
50 /** |
|
51 * Resets the service table. |
|
52 */ |
|
53 inline void Reset(); |
|
54 |
|
55 /** |
|
56 * Returns ETrue if all bits aFlags are on. |
|
57 * |
|
58 * @param aFlags A set of flags (TPsu2ServiceTableFlag). |
|
59 * @return ETrue if all the bits in aFlags are on. |
|
60 */ |
|
61 inline TBool IsOn( |
|
62 TUint32 aFlags ); |
|
63 |
|
64 /** |
|
65 * Returns ETrue if all bits in aFlags are off. |
|
66 * |
|
67 * @param aFlags A set of flags (TPsu2ServiceTableFlag). |
|
68 * @return ETrue if all bits in aFlags are off. |
|
69 */ |
|
70 inline TBool IsOff( |
|
71 TUint32 aFlags ); |
|
72 |
|
73 private: // Data |
|
74 /// Own: A set of flags (TPsu2ServiceTableFlag) |
|
75 TUint32 iTable; |
|
76 }; |
|
77 |
|
78 // INLINE FUNCTIONS |
|
79 |
|
80 // -------------------------------------------------------------------------- |
|
81 // TPsu2ServiceTable::SetServiceTable |
|
82 // -------------------------------------------------------------------------- |
|
83 // |
|
84 inline void TPsu2ServiceTable::SetServiceTable( TUint32 aTable ) |
|
85 { |
|
86 iTable = aTable; |
|
87 } |
|
88 |
|
89 // -------------------------------------------------------------------------- |
|
90 // TPsu2ServiceTable::ServiceTable |
|
91 // -------------------------------------------------------------------------- |
|
92 // |
|
93 inline const TUint32& TPsu2ServiceTable::ServiceTable() const |
|
94 { |
|
95 return iTable; |
|
96 } |
|
97 |
|
98 // -------------------------------------------------------------------------- |
|
99 // TPsu2ServiceTable::Reset |
|
100 // -------------------------------------------------------------------------- |
|
101 // |
|
102 inline void TPsu2ServiceTable::Reset() |
|
103 { |
|
104 iTable = 0; |
|
105 } |
|
106 |
|
107 // -------------------------------------------------------------------------- |
|
108 // TPsu2ServiceTable::IsOn |
|
109 // -------------------------------------------------------------------------- |
|
110 // |
|
111 inline TBool TPsu2ServiceTable::IsOn( TUint32 aFlags ) |
|
112 { |
|
113 // Return ETrue if all given flags in aFlags are on |
|
114 return (aFlags == (aFlags & iTable)); |
|
115 } |
|
116 |
|
117 // -------------------------------------------------------------------------- |
|
118 // TPsu2ServiceTable::IsOff |
|
119 // -------------------------------------------------------------------------- |
|
120 // |
|
121 inline TBool TPsu2ServiceTable::IsOff( TUint32 aFlags ) |
|
122 { |
|
123 return (aFlags & iTable) == 0; |
|
124 } |
|
125 |
|
126 #endif // TPSU2SERVICETABLE_H |
|
127 |
|
128 // End of File |