⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _chat_service_searcher_8cpp-source.html

📁 一个聊天的软件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="l00085"></a>00085 <span class="comment">//</span><a name="l00086"></a><a class="code" href="class_c_chat_service_searcher.html#cd96c3f1564cfbcd93a2ce89f92d7d3a">00086</a> <span class="keyword">const</span> TUUID&amp; <a class="code" href="class_c_chat_service_searcher.html#cd96c3f1564cfbcd93a2ce89f92d7d3a">CChatServiceSearcher::ServiceClass</a>()<span class="keyword"> const</span><a name="l00087"></a>00087 <span class="keyword">    </span>{<a name="l00088"></a>00088     <span class="keywordflow">return</span> <a class="code" href="class_c_chat_service_searcher.html#1bc54a0225f7f74e4f2cb7302d5e38ba">iServiceClass</a>;<a name="l00089"></a>00089     }<a name="l00090"></a>00090 <a name="l00091"></a>00091 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00092"></a>00092 <span class="comment">// CChatServiceSearcher::ProtocolList()</span><a name="l00093"></a>00093 <span class="comment">// The list of Protocols required by the service.</span><a name="l00094"></a>00094 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00095"></a>00095 <span class="comment">//</span><a name="l00096"></a>00096  RArray &lt;TChatSdpAttributeParser::TChatSdpAttributeNode&gt;&amp; <a class="code" href="class_c_chat_service_searcher.html#cb57dffc4b0711f6c4ba22a88abc6510">CChatServiceSearcher</a><a name="l00097"></a><a class="code" href="class_c_chat_service_searcher.html#cb57dffc4b0711f6c4ba22a88abc6510">00097</a> <a class="code" href="class_c_chat_service_searcher.html#cb57dffc4b0711f6c4ba22a88abc6510">::ProtocolList</a>()<a name="l00098"></a>00098     {<a name="l00099"></a>00099     <a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html">TChatSdpAttributeParser::TChatSdpAttributeNode</a> attrib;<a name="l00100"></a>00100     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckType );<a name="l00101"></a>00101     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeDES );<a name="l00102"></a>00102     iProtocolArray.Append( attrib );<a name="l00103"></a>00103 <a name="l00104"></a>00104     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckType );<a name="l00105"></a>00105     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeDES );<a name="l00106"></a>00106     iProtocolArray.Append( attrib );<a name="l00107"></a>00107 <a name="l00108"></a>00108     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckValue );<a name="l00109"></a>00109     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeUUID );<a name="l00110"></a>00110     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#fc2d1e44fb7a2749358617eb9c8034ca">SetValue</a>( KL2CAP );<a name="l00111"></a>00111     iProtocolArray.Append( attrib );<a name="l00112"></a>00112 <a name="l00113"></a>00113     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckEnd );<a name="l00114"></a>00114     iProtocolArray.Append( attrib );<a name="l00115"></a>00115   <a name="l00116"></a>00116     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckType );<a name="l00117"></a>00117     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeDES );<a name="l00118"></a>00118     iProtocolArray.Append( attrib );<a name="l00119"></a>00119 <a name="l00120"></a>00120     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckValue );<a name="l00121"></a>00121     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeUUID );<a name="l00122"></a>00122     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#fc2d1e44fb7a2749358617eb9c8034ca">SetValue</a>( KRFCOMM );<a name="l00123"></a>00123     iProtocolArray.Append( attrib );<a name="l00124"></a>00124   <a name="l00125"></a>00125     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::EReadValue );<a name="l00126"></a>00126     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#6e32f35a92af83af7f7250d94be6e1de">SetType</a>( ETypeUint );<a name="l00127"></a>00127     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#fc2d1e44fb7a2749358617eb9c8034ca">SetValue</a>( KRfcommChannel );<a name="l00128"></a>00128     iProtocolArray.Append( attrib );<a name="l00129"></a>00129 <a name="l00130"></a>00130     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckEnd );<a name="l00131"></a>00131     iProtocolArray.Append( attrib );<a name="l00132"></a>00132   <a name="l00133"></a>00133     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::ECheckEnd );<a name="l00134"></a>00134     iProtocolArray.Append( attrib );<a name="l00135"></a>00135 <a name="l00136"></a>00136     attrib.<a class="code" href="class_t_chat_sdp_attribute_parser_1_1_t_chat_sdp_attribute_node.html#156c0e62f47d5ceac7079a53a4c0c546">SetCommand</a>( TChatSdpAttributeParser::EFinished );<a name="l00137"></a>00137     iProtocolArray.Append( attrib );<a name="l00138"></a>00138   <a name="l00139"></a>00139     <span class="keywordflow">return</span> iProtocolArray;<a name="l00140"></a>00140     }<a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00143"></a>00143 <span class="comment">// CChatServiceSearcher::FoundElementL()</span><a name="l00144"></a>00144 <span class="comment">// Read the data element.</span><a name="l00145"></a>00145 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00146"></a>00146 <span class="comment">//</span><a name="l00147"></a><a class="code" href="class_c_chat_service_searcher.html#a8b0373828fe331fbc50b6e0b03a4942">00147</a> <span class="keywordtype">void</span> <a class="code" href="class_c_chat_service_searcher.html#a8b0373828fe331fbc50b6e0b03a4942">CChatServiceSearcher::FoundElementL</a>( TInt aKey, CSdpAttrValue&amp; aValue )<a name="l00148"></a>00148     {<a name="l00149"></a>00149     __ASSERT_ALWAYS( aKey == static_cast&lt;TInt&gt;( KRfcommChannel ), <a name="l00150"></a>00150         Panic( EChatBtServiceSearcherProtocolRead ) );<a name="l00151"></a>00151     <a class="code" href="class_c_chat_service_searcher.html#ca13b175f9849e6ff5ce23ea58682739">iPort</a> = aValue.Uint();<a name="l00152"></a>00152     }<a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00155"></a>00155 <span class="comment">// CChatServiceSearcher::Port()</span><a name="l00156"></a>00156 <span class="comment">// Port connection on the remote machine.</span><a name="l00157"></a>00157 <span class="comment">// ----------------------------------------------------------------------------</span><a name="l00158"></a>00158 <span class="comment">//</span><a name="l00159"></a><a class="code" href="class_c_chat_service_searcher.html#f997177ee5a23aed717d3bc9fb37f5a9">00159</a> TInt <a class="code" href="class_c_chat_service_searcher.html#f997177ee5a23aed717d3bc9fb37f5a9">CChatServiceSearcher::Port</a>()<a name="l00160"></a>00160     {<a name="l00161"></a>00161     <span class="keywordflow">return</span> <a class="code" href="class_c_chat_service_searcher.html#ca13b175f9849e6ff5ce23ea58682739">iPort</a>;<a name="l00162"></a>00162     }<a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="comment">// End of File</span></pre></div><hr><table x-use-null-cells		style="x-cell-content-align: top;				width: 100%;				border-spacing: 0px;				border-spacing: 0px;"		cellspacing=0		width=100%>  <col style="width: 50%;">  <col style="width: 50%;">  <tr style="x-cell-content-align: top;"	valign=top>  <td style="width: 50%;			padding-right: 10px;			padding-left: 10px;			border-right-style: None;			border-left-style: None;			border-top-style: None;			border-bottom-style: None;"	width=50%>  <p style="font-family: Arial;"><small style="font-size: smaller;">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -