📄 _chat_sdp_attribute_parser_8cpp-source.html
字号:
<a name="l00097"></a>00097 }<a name="l00098"></a>00098 <a name="l00099"></a>00099 <a class="code" href="class_t_chat_sdp_attribute_parser.html#528c8830ba4af2fd5ef6ff1ebd2efe9f">AdvanceL</a>();<a name="l00100"></a>00100 }<a name="l00101"></a>00101 <a name="l00102"></a>00102 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00103"></a>00103 <span class="comment">// TChatSdpAttributeParser::StartListL()</span><a name="l00104"></a>00104 <span class="comment">// Process the start of a data element list.</span><a name="l00105"></a>00105 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00106"></a>00106 <span class="comment">//</span><a name="l00107"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#4b7b6774453ca1580c2f0aebc4002ffe">00107</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#4b7b6774453ca1580c2f0aebc4002ffe">TChatSdpAttributeParser::StartListL</a>( CSdpAttrValueList& <span class="comment">/*aList*/</span> )<a name="l00108"></a>00108 {<a name="l00109"></a>00109 <span class="comment">// no checks done here</span><a name="l00110"></a>00110 }<a name="l00111"></a>00111 <a name="l00112"></a>00112 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00113"></a>00113 <span class="comment">// TChatSdpAttributeParser::EndListL()</span><a name="l00114"></a>00114 <span class="comment">// Process the end of a data element list.</span><a name="l00115"></a>00115 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00116"></a>00116 <span class="comment">//</span><a name="l00117"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#40a01b5f18f581c7b8e9c1907b8bdba1">00117</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#40a01b5f18f581c7b8e9c1907b8bdba1">TChatSdpAttributeParser::EndListL</a>()<a name="l00118"></a>00118 {<a name="l00119"></a>00119 <span class="comment">// check we are at the end of a list</span><a name="l00120"></a>00120 <span class="keywordflow">if</span> ( <a class="code" href="class_t_chat_sdp_attribute_parser.html#06a26af66f62382ad861a56a88e22a2b">iCurrentNode</a>.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#5add53a5e87869faa4572145e57a9be7">Command</a>() != ECheckEnd )<a name="l00121"></a>00121 {<a name="l00122"></a>00122 User::Leave( KErrGeneral );<a name="l00123"></a>00123 }<a name="l00124"></a>00124 <a name="l00125"></a>00125 AdvanceL();<a name="l00126"></a>00126 }<a name="l00127"></a>00127 <a name="l00128"></a>00128 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00129"></a>00129 <span class="comment">// TChatSdpAttributeParser::CheckTypeL()</span><a name="l00130"></a>00130 <span class="comment">// Check the type of the current node is the same as the specified type.</span><a name="l00131"></a>00131 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00132"></a>00132 <span class="comment">//</span><a name="l00133"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#f4272d2abd5aed5a16b71115a76a0c5a">00133</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#f4272d2abd5aed5a16b71115a76a0c5a">TChatSdpAttributeParser::CheckTypeL</a>( TSdpElementType aElementType )<span class="keyword"> const</span><a name="l00134"></a>00134 <span class="keyword"> </span>{<a name="l00135"></a>00135 <span class="keywordflow">if</span> ( <a class="code" href="class_t_chat_sdp_attribute_parser.html#06a26af66f62382ad861a56a88e22a2b">iCurrentNode</a>.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#543a812bf1666d4e2c7bf72452142660">Type</a>() != aElementType )<a name="l00136"></a>00136 {<a name="l00137"></a>00137 User::Leave( KErrGeneral );<a name="l00138"></a>00138 }<a name="l00139"></a>00139 }<a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00142"></a>00142 <span class="comment">// TChatSdpAttributeParser::CheckValueL()</span><a name="l00143"></a>00143 <span class="comment">// Check the value of the current node is the same as the specified type.</span><a name="l00144"></a>00144 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00145"></a>00145 <span class="comment">//</span><a name="l00146"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#0ea935565972e69a5dc8dd49268b0b39">00146</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#0ea935565972e69a5dc8dd49268b0b39">TChatSdpAttributeParser::CheckValueL</a>( CSdpAttrValue& aValue )<span class="keyword"> const</span><a name="l00147"></a>00147 <span class="keyword"> </span>{<a name="l00148"></a>00148 <span class="keywordflow">switch</span> ( aValue.Type() )<a name="l00149"></a>00149 {<a name="l00150"></a>00150 <span class="keywordflow">case</span> ETypeNil:<a name="l00151"></a>00151 Panic( EChatSdpAttributeParserNoValue );<a name="l00152"></a>00152 <span class="keywordflow">break</span>;<a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="keywordflow">case</span> ETypeUint:<a name="l00155"></a>00155 <span class="keywordflow">if</span> ( aValue.Uint() != ( TUint ) <a class="code" href="class_t_chat_sdp_attribute_parser.html#06a26af66f62382ad861a56a88e22a2b">iCurrentNode</a>.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#92eceddf2441d07f407cfede50f48a71">Value</a>() )<a name="l00156"></a>00156 {<a name="l00157"></a>00157 User::Leave( KErrArgument );<a name="l00158"></a>00158 }<a name="l00159"></a>00159 <span class="keywordflow">break</span>;<a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="keywordflow">case</span> ETypeInt:<a name="l00162"></a>00162 <span class="keywordflow">if</span> ( aValue.Int() != iCurrentNode.Value() )<a name="l00163"></a>00163 {<a name="l00164"></a>00164 User::Leave( KErrArgument );<a name="l00165"></a>00165 }<a name="l00166"></a>00166 <span class="keywordflow">break</span>;<a name="l00167"></a>00167 <a name="l00168"></a>00168 <span class="keywordflow">case</span> ETypeBoolean:<a name="l00169"></a>00169 <span class="keywordflow">if</span> ( aValue.Bool() != iCurrentNode.Value() )<a name="l00170"></a>00170 {<a name="l00171"></a>00171 User::Leave( KErrArgument );<a name="l00172"></a>00172 }<a name="l00173"></a>00173 <span class="keywordflow">break</span>;<a name="l00174"></a>00174 <a name="l00175"></a>00175 <span class="keywordflow">case</span> ETypeUUID:<a name="l00176"></a>00176 <span class="keywordflow">if</span> ( aValue.UUID() != TUUID( iCurrentNode.Value() ) )<a name="l00177"></a>00177 {<a name="l00178"></a>00178 User::Leave( KErrArgument );<a name="l00179"></a>00179 }<a name="l00180"></a>00180 <span class="keywordflow">break</span>;<a name="l00181"></a>00181 <a name="l00182"></a>00182 <span class="keywordflow">case</span> ETypeDES:<a name="l00183"></a>00183 <span class="keywordflow">case</span> ETypeDEA:<a name="l00184"></a>00184 Panic( EChatSdpAttributeParserValueIsList );<a name="l00185"></a>00185 <span class="keywordflow">break</span>;<a name="l00186"></a>00186 <a name="l00187"></a>00187 <span class="keywordflow">default</span>:<a name="l00188"></a>00188 Panic( EChatSdpAttributeParserValueTypeUnsupported );<a name="l00189"></a>00189 <span class="keywordflow">break</span>;<a name="l00190"></a>00190 }<a name="l00191"></a>00191 }<a name="l00192"></a>00192 <a name="l00193"></a>00193 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00194"></a>00194 <span class="comment">// TChatSdpAttributeParser::ReadValueL()</span><a name="l00195"></a>00195 <span class="comment">// Pass the data element value to the observer.</span><a name="l00196"></a>00196 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00197"></a>00197 <span class="comment">//</span><a name="l00198"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#61bda7e6ece5da3a9e7f094cbc8c9225">00198</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#61bda7e6ece5da3a9e7f094cbc8c9225">TChatSdpAttributeParser::ReadValueL</a>( CSdpAttrValue& aValue )<span class="keyword"> const</span><a name="l00199"></a>00199 <span class="keyword"> </span>{<a name="l00200"></a>00200 <a class="code" href="class_t_chat_sdp_attribute_parser.html#5598d19cc10719afd28055422087a200">iObserver</a>.<a class="code" href="class_m_chat_sdp_attribute_notifier.html#b081256c1393c2846e7a2dc3ba0fce33">FoundElementL</a>( <a class="code" href="class_t_chat_sdp_attribute_parser.html#06a26af66f62382ad861a56a88e22a2b">iCurrentNode</a>.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#92eceddf2441d07f407cfede50f48a71">Value</a>(), aValue );<a name="l00201"></a>00201 }<a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00204"></a>00204 <span class="comment">// TChatSdpAttributeParser::AdvanceL()</span><a name="l00205"></a>00205 <span class="comment">// Advance to the next node.</span><a name="l00206"></a>00206 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00207"></a>00207 <span class="comment">//</span><a name="l00208"></a><a class="code" href="class_t_chat_sdp_attribute_parser.html#528c8830ba4af2fd5ef6ff1ebd2efe9f">00208</a> <span class="keywordtype">void</span> <a class="code" href="class_t_chat_sdp_attribute_parser.html#528c8830ba4af2fd5ef6ff1ebd2efe9f">TChatSdpAttributeParser::AdvanceL</a>()<a name="l00209"></a>00209 {<a name="l00210"></a>00210 <span class="comment">// check not at end</span><a name="l00211"></a>00211 <span class="keywordflow">if</span> ( <a class="code" href="class_t_chat_sdp_attribute_parser.html#06a26af66f62382ad861a56a88e22a2b">iCurrentNode</a>.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#5add53a5e87869faa4572145e57a9be7">Command</a>() == EFinished )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -