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

📄 class_c_br_ctl_sample_app_link_resolver.html

📁 S60上实现嵌入式浏览器,可以在应用程序中嵌入浏览器,实现IE功能
💻 HTML
📖 第 1 页 / 共 3 页
字号:
        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>MBrCtlLinkContent &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>aBrCtlLinkContent</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Browser plug-in calls this method when the user requests to load content via selecting a link, or any other way. Used with ECapabilityClientNotifyURL <dl compact><dt><b>Since:</b></dt><dd>2.8 </dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>aUrl</em>&nbsp;</td><td>The requested url </td></tr>    <tr><td valign="top"></td><td valign="top"><em>aCurrentUrl</em>&nbsp;</td><td>The url of the current page </td></tr>    <tr><td valign="top"></td><td valign="top"><em>aBrCtlLinkContent</em>&nbsp;</td><td>A callback interface to return the embedded content </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>EFalse, if the browser will resolve the link </dd></dl><p>Definition at line <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00054">54</a> of file <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html">BrCtlSampleAppLinkResolver.cpp</a>.<p>References <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00195">GetFileNameL()</a>, <a class="el" href="_br_ctl_sample_app_link_resolver_8h-source.html#l00106">iFileName</a>, <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00120">IsFileScheme()</a>, <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00138">ReadFileLC()</a>, and <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00162">RecognizeLC()</a>.<div class="fragment"><pre class="fragment"><a name="l00057"></a>00057     {        <a name="l00058"></a>00058     <span class="keywordflow">if</span> (<a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#a5c7ae5a04cfcbe24c0c3a34a0a28a23">IsFileScheme</a>(aUrl))<a name="l00059"></a>00059         {<a name="l00060"></a>00060         <a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#fd74fceb06b713999b023e18fb096b64">GetFileNameL</a>(aUrl);<a name="l00061"></a>00061         HBufC8* buf = <a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#df156861f71492408ba03d67765f304c">ReadFileLC</a>(*<a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#17710d20100c676856cfb8e54134a8c3">iFileName</a>);<a name="l00062"></a>00062         HBufC* contentType = NULL;<a name="l00063"></a>00063         TPtrC p(NULL, 0);<a name="l00064"></a>00064         contentType = <a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#dcdabc123c2479e298b72976d2246663">RecognizeLC</a>(*<a class="code" href="class_c_br_ctl_sample_app_link_resolver.html#17710d20100c676856cfb8e54134a8c3">iFileName</a>, *buf);<a name="l00065"></a>00065         aBrCtlLinkContent.HandleResolveComplete(*contentType, p, buf);        <a name="l00066"></a>00066         CleanupStack::PopAndDestroy(2); <span class="comment">// contentType, buf</span><a name="l00067"></a>00067         <span class="keywordflow">return</span> ETrue;<a name="l00068"></a>00068         }<a name="l00069"></a>00069     <span class="keywordflow">return</span> EFalse;<a name="l00070"></a>00070     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="8f4fd704abc77d389b8ea5fee12290f3"></a><!-- doxytag: member="CBrCtlSampleAppLinkResolver::CancelAll" ref="8f4fd704abc77d389b8ea5fee12290f3" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void CBrCtlSampleAppLinkResolver::CancelAll           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Cancel all outstanding resolving operations <dl compact><dt><b>Since:</b></dt><dd>2.8 </dd></dl><dl compact><dt><b>Returns:</b></dt><dd>void </dd></dl><p>Definition at line <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00077">77</a> of file <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html">BrCtlSampleAppLinkResolver.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00078"></a>00078     {        <a name="l00079"></a>00079     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="9ce34ba0b947863222da3c63d0481044"></a><!-- doxytag: member="CBrCtlSampleAppLinkResolver::ConstructL" ref="9ce34ba0b947863222da3c63d0481044" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void CBrCtlSampleAppLinkResolver::ConstructL           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>By default Symbian 2nd phase constructor is private. <p>Definition at line <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00087">87</a> of file <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html">BrCtlSampleAppLinkResolver.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00088"></a>00088     {<a name="l00089"></a>00089     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="a5c7ae5a04cfcbe24c0c3a34a0a28a23"></a><!-- doxytag: member="CBrCtlSampleAppLinkResolver::IsFileScheme" ref="a5c7ae5a04cfcbe24c0c3a34a0a28a23" args="(const TDesC &amp;aFileName)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">TBool CBrCtlSampleAppLinkResolver::IsFileScheme           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const TDesC &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aFileName</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Find if the scheme if <a href="file://">file://</a> <p>Definition at line <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00120">120</a> of file <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html">BrCtlSampleAppLinkResolver.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00121"></a>00121     {<a name="l00122"></a>00122     _LIT(KFileScheme, <span class="stringliteral">"file://"</span>);<a name="l00123"></a>00123     <span class="keywordflow">if</span> (aFileName.Length() &gt; 0 &amp;&amp; aFileName.Ptr() != NULL)<a name="l00124"></a>00124         {<a name="l00125"></a>00125         <span class="keywordflow">if</span> (aFileName.FindF(KFileScheme) == 0)<a name="l00126"></a>00126             {<a name="l00127"></a>00127             <span class="keywordflow">return</span> ETrue;<a name="l00128"></a>00128             }<a name="l00129"></a>00129         }<a name="l00130"></a>00130     <span class="keywordflow">return</span> EFalse;<a name="l00131"></a>00131     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="df156861f71492408ba03d67765f304c"></a><!-- doxytag: member="CBrCtlSampleAppLinkResolver::ReadFileLC" ref="df156861f71492408ba03d67765f304c" args="(const TDesC &amp;aFileName)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">HBufC8 * CBrCtlSampleAppLinkResolver::ReadFileLC           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const TDesC &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>aFileName</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Read the file. <p>Definition at line <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html#l00138">138</a> of file <a class="el" href="_br_ctl_sample_app_link_resolver_8cpp-source.html">BrCtlSampleAppLinkResolver.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00139"></a>00139     {<a name="l00140"></a>00140     RFs rfs;<a name="l00141"></a>00141     RFile file;<a name="l00142"></a>00142     User::LeaveIfError(rfs.Connect());<a name="l00143"></a>00143     CleanupClosePushL(rfs);<a name="l00144"></a>00144     User::LeaveIfError(file.Open(rfs, aFileName, EFileRead));<a name="l00145"></a>00145     CleanupClosePushL(file);<a name="l00146"></a>00146     TInt size;<a name="l00147"></a>00147     User::LeaveIfError(file.Size(size));<a name="l00148"></a>00148     HBufC8* buf = HBufC8::NewLC(size);<a name="l00149"></a>00149     TPtr8 bufPtr(buf-&gt;Des());<a name="l00150"></a>00150     User::LeaveIfError(file.Read(bufPtr));<a name="l00151"></a>00151     CleanupStack::Pop(); <span class="comment">// buf</span><a name="l00152"></a>00152     CleanupStack::PopAndDestroy(2); <span class="comment">// file, rfs</span><a name="l00153"></a>00153     CleanupStack::PushL(buf);<a name="l00154"></a>00154     <span class="keywordflow">return</span> buf;<a name="l00155"></a>00155     }</pre></div><p>    </td>  </tr></table><a class="anchor" name="dcdabc123c2479e298b72976d2246663"></a><!-- doxytag: member="CBrCtlSampleAppLinkResolver::RecognizeLC" ref="dcdabc123c2479e298b72976d2246663" args="(const TDesC &amp;aFileName, const TDesC8 &amp;aData)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">HBufC * CBrCtlSampleAppLinkResolver::RecognizeLC           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const TDesC &amp;&nbsp;</td>

⌨️ 快捷键说明

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