|
1 /* |
|
2 * Copyright (c) 2005-2009 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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AUTHEXPRESSION_IMPL_INL |
|
20 #define AUTHEXPRESSION_IMPL_INL |
|
21 |
|
22 #include "authexpression_impl.h" |
|
23 |
|
24 namespace AuthServer { |
|
25 |
|
26 // -------- TSizeStream -------- |
|
27 |
|
28 |
|
29 inline TSizeStream::TSizeStream() |
|
30 /** |
|
31 Initialise the accumulated stream size to zero. |
|
32 */ |
|
33 : iSize(0) |
|
34 { |
|
35 // empty. |
|
36 } |
|
37 |
|
38 |
|
39 inline TInt TSizeStream::Size() const |
|
40 /** |
|
41 Accessor function returns the accumulated |
|
42 stream size in bytes. |
|
43 |
|
44 @return Accumulated stream size in bytes. |
|
45 */ |
|
46 { |
|
47 return iSize; |
|
48 } |
|
49 |
|
50 |
|
51 // -------- CAuthExpressionImpl -------- |
|
52 |
|
53 |
|
54 inline CAuthExpressionImpl::TType CAuthExpressionImpl::Type() const |
|
55 /** |
|
56 Accessor function returns this expression type, i.e. |
|
57 whether it is a plugin ID, a plugin type, an AND expression, |
|
58 or an OR expression. |
|
59 |
|
60 @return This expression's type. |
|
61 @panic AUTHEXPR 64 This object is internally inconsistent |
|
62 when the function is called (debug only.) |
|
63 */ |
|
64 { |
|
65 __ASSERT_DEBUG(Invariant(), Panic(ETyAInvariant)); |
|
66 return iType; |
|
67 } |
|
68 |
|
69 |
|
70 inline const CAuthExpressionImpl* CAuthExpressionImpl::Left() const |
|
71 /** |
|
72 Accessor function returns this expression's left node. |
|
73 |
|
74 @return A non-modifiable pointer to |
|
75 this expression's left node. |
|
76 @panic AUTHEXPR 80 This object is internally inconsistent |
|
77 when this function is called (debug only.) |
|
78 @panic AUTHEXPR 81 This object is not an AND or OR expression |
|
79 (debug only.) |
|
80 @see Right |
|
81 */ |
|
82 { |
|
83 __ASSERT_DEBUG(Invariant(), Panic(ELfInvariant)); |
|
84 __ASSERT_DEBUG(iType == EAnd || iType == EOr, Panic(ELfNotComplex)); |
|
85 return iComb.iLeft; |
|
86 } |
|
87 |
|
88 |
|
89 inline const CAuthExpressionImpl* CAuthExpressionImpl::Right() const |
|
90 /** |
|
91 Accessor function returns this expression's left node. |
|
92 |
|
93 @return A non-modifiable pointer to |
|
94 this expression's right node. |
|
95 @panic AUTHEXPR 96 This object is not an AND or OR expression |
|
96 (debug only.) |
|
97 @see Left |
|
98 */ |
|
99 { |
|
100 __ASSERT_DEBUG(Invariant(), Panic(ERgInvariant)); |
|
101 __ASSERT_DEBUG(iType == EAnd || iType == EOr, Panic(ERgNotComplex)); |
|
102 return iComb.iRight; |
|
103 } |
|
104 |
|
105 |
|
106 inline TAuthPluginType CAuthExpressionImpl::PluginType() const |
|
107 /** |
|
108 Accessor function returns this expression's plugin type. |
|
109 |
|
110 @return This expression's plugin type. |
|
111 @panic AUTHEXPR 112 This object is internally inconsistent |
|
112 when this function is called (debug only.) |
|
113 @panic AUTHEXPR 113 This object does not describe a |
|
114 plugin type (debug only.) |
|
115 */ |
|
116 { |
|
117 __ASSERT_DEBUG(Invariant(), Panic(EPTyInvariant)); |
|
118 __ASSERT_DEBUG(iType == EPluginType, Panic(EPTyNotPluginType)); |
|
119 return iPluginType; |
|
120 } |
|
121 |
|
122 |
|
123 inline TPluginId CAuthExpressionImpl::PluginId() const |
|
124 /** |
|
125 Accessor function returns this expression's plugin ID. |
|
126 |
|
127 @return This expression's plugin ID. |
|
128 @panic AUTHEXPR 128 This object is internally inconsistent |
|
129 when this function is called (debug only.) |
|
130 @panic AUTHEXPR 129 This object does not identify a |
|
131 specific plugin (debug only.) |
|
132 */ |
|
133 { |
|
134 __ASSERT_DEBUG(Invariant(), Panic(EPIdInvariant)); |
|
135 __ASSERT_DEBUG(iType == EPluginId, Panic(EPIdNotPluginId)); |
|
136 return iPluginId; |
|
137 } |
|
138 |
|
139 |
|
140 inline CAuthExpressionImpl* CAuthExpressionImpl::Parent() const |
|
141 /** |
|
142 Accessor function returns this node's parent. |
|
143 |
|
144 @return This node's parent. This is |
|
145 NULL for a root node. |
|
146 @panic AUTHEXPR 144 This object is internally inconsistent |
|
147 when this function is called (debug only.) |
|
148 @internalComponent |
|
149 */ |
|
150 { |
|
151 __ASSERT_DEBUG(Invariant(), Panic(EPPrInvariant)); |
|
152 |
|
153 return iParent; |
|
154 } |
|
155 |
|
156 |
|
157 |
|
158 } // namespace AuthServer { |
|
159 |
|
160 |
|
161 #endif // #ifndef AUTHEXPRESSION_IMPL_INL |
|
162 |