Symbian3/SDK/Source/GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Wed, 31 Mar 2010 11:11:55 +0100
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
permissions -rw-r--r--
Week 12 contribution of API Specs and fix SDK submission
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept id="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179" xml:lang="en"><title>HTTP
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    13
Utilities Library (InetProtUtils) Example</title><prolog><metadata><keywords/></metadata></prolog><conbody>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    14
<section id="GUID-627EB2DD-530A-5A6E-AC58-854A5C8D636B"><title>Download</title> <p>Click
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    15
on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-0ab18a4d-c1a6-49bc-9420-3200f7ead173.zip" scope="external">ExampleInetProtUtil.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-0ab18a4d-c1a6-49bc-9420-3200f7ead173.html" scope="peer">browse</xref> to view the example code. </p> </section>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
<section><title>Description</title> <p>This example code demonstrates
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    17
the usage of utilities provided by the InetProtUtil API. The users should
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    18
have a prior knowledge of concepts associated with it, such as URLs and URI
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    19
components. </p> <p>The central class is <codeph>CExampleInetProtUtil</codeph>,
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    20
which demonstrates the following functionality: </p> <ul>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    21
<li id="GUID-52A8E18E-25F2-50F1-820D-5A892160F031"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-E3A0AB40-553E-5689-A703-075C75430B29">Creating a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    22
<li id="GUID-C6E9655F-237D-5406-85EF-6D5A0EB5C140"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-FBCF247C-5660-5A72-B837-AFAC9E51FF60">Modifying a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    23
<li id="GUID-1397CABB-FCAB-53D8-94EE-0E9A3353FD21"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-DBB7553C-0334-55CB-A5DE-9A233E88780E">Resolving a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    24
<li id="GUID-9443407C-F9C3-51FF-B3A9-93AB1DC60955"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-C3DE7478-80E4-5E05-90F9-C32E8C2624B2">Parsing a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    25
<li id="GUID-11D5D373-22D0-529D-9B4F-E8DD7470853B"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-F8F98700-948D-542C-9B39-6DE3E257C3F3">Validating a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    26
<li id="GUID-9249C891-4F25-53C8-ACBE-C0FA166D64F6"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-B196045B-6DAF-561F-950C-5CDFB8B854A6">Extracting URI components</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    27
<li id="GUID-8665CD3D-B632-5863-A0D3-BEEEB64CB017"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-D30B9D97-7ADE-58EA-9AC0-8DC2095BCBEC">Retrieving a filename from a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    28
<li id="GUID-29D99927-864E-5FB5-BB61-C96C8636E334"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-20375BA7-F367-5E12-9DC6-F9BDF4146E8A">Adding and removing delimiters from a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    29
<li id="GUID-F956A7AA-CA58-53C5-B08A-19E1575E0CC1"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-363D45CC-AC6E-5397-B825-086919FCBF50">Removing whitespace from a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    30
<li id="GUID-809AF54B-EBD5-5DC5-9A36-4D02721BF1EB"><p><xref href="GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179.dita#GUID-AFAD0F36-330B-50BD-B810-85BE7FA21179/GUID-EC077086-FC68-50ED-8BCC-AFBD58205186">Escape encoding and decoding a URI</xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    31
</ul> <p id="GUID-E3A0AB40-553E-5689-A703-075C75430B29"><b>Creating a URI</b> </p> <codeblock id="GUID-734568B9-1C2F-53A7-9D00-4FDEC52C06C6" xml:space="preserve">void CExampleInetProtUtil::CreateUri();</codeblock> <p>Creates
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    32
a URI with respect to the physical path of a given file. </p> <p>For example,
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    33
the physical path of the file: </p> <p> <codeph>K:/ws/direct/direct.mmp</codeph>  </p> <p>gives
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    34
the following URI file: </p> <p> <codeph>///k/ws/direct/direct.mmp</codeph>  </p> <p>The
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    35
screen output from this example is: </p> <fig id="GUID-2E1622EE-F5BF-57AD-9D1A-49FA6A0450E6">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    36
<image href="GUID-ADCDEFF9-4B1D-5E46-A63B-808192123E15_d0e175527_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    37
</fig> <p id="GUID-FBCF247C-5660-5A72-B837-AFAC9E51FF60"><b>Modifying a URI</b> </p> <codeblock id="GUID-8B77F94A-4DCC-5798-A2A6-DC778272D12B" xml:space="preserve">void CExampleInetProtUtil::ModifyUriComponents();</codeblock> <p>Modifies
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    38
URI components, which involves: </p> <ol id="GUID-505AE129-749E-540C-BAB2-5A079EC29B6B">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    39
<li id="GUID-C4DF42D7-D9BE-5557-A138-B60444172631"><p>Adding URI components,
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    40
where it constructs the URI component by component. For example, you can add
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    41
the following components: </p> <ul>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    42
<li id="GUID-767B1184-E01F-5FAA-BC14-9E12BA1B121B"><p>scheme: <codeph>http</codeph>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    43
<li id="GUID-8F2010FF-238A-53A6-BAB9-790CDDAA7804"><p>host: <codeph>waterlang.org</codeph>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    44
<li id="GUID-19457F90-63E1-59AA-B046-C2BB64AA1EC8"><p>path: <codeph>main_page.html</codeph>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    45
<li id="GUID-151867C7-8F3C-57FB-A2BE-2622CB16813C"><p>port: <codeph>8080</codeph>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    46
</ul> <p>to get the complete URI: </p> <p> <codeph>http://waterlang.org:8080/main_page.html</codeph>  </p> <p>The
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    47
screen output from this example is: </p> <fig id="GUID-C43845C7-9458-546F-A625-857BF63E21A0">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    48
<image href="GUID-6740A668-33A2-52B1-9416-E9F21591D16C_d0e175596_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    49
</fig> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    50
<li id="GUID-E1E71C35-8D25-5F50-ADCD-5441FECEDF67"><p>Removing the specific
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    51
URI component(s) from a constructed URI. For example, the above URI with the
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    52
port number removed: </p> <p> <codeph>http://waterlang.org/main_page.html</codeph>  </p> <p>The
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    53
screen output from this example is: </p> <fig id="GUID-8658720B-DD49-5BF8-B016-0C1FD970E982">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    54
<image href="GUID-817D677C-2422-52B1-8D44-D15A0351FDC6_d0e175615_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    55
</fig> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    56
</ol> <p id="GUID-DBB7553C-0334-55CB-A5DE-9A233E88780E"><b>Resolving a URI</b> </p> <codeblock id="GUID-3782F8CB-BA3D-5F9E-AB48-4596DC2E024E" xml:space="preserve">void CExampleInetProtUtil::ResolveUri();</codeblock> <p>Resolves
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    57
the URI, which involves creation of an absolute <xref href="GUID-9D22BBBA-2DF2-36D2-BD07-5DE56F8541AA.dita"><apiname>CUri</apiname></xref> object
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    58
from a given reference URI. </p> <p>The screen output from this example is: </p> <fig id="GUID-10AC8723-7DAE-5DC9-A568-C3011B9DB040">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    59
<image href="GUID-FB12481D-B3F6-5901-A0DC-DF92BCED3B18_d0e175640_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    60
</fig> <p id="GUID-C3DE7478-80E4-5E05-90F9-C32E8C2624B2"><b>Parsing a URI</b> </p> <codeblock id="GUID-48E262B6-D776-5158-8FFD-1F8C43F9710B" xml:space="preserve">void CExampleInetProtUtil::ParseUri();</codeblock> <p>Parses
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    61
the URI into its components (as given in <xref href="ftp://ftp.rfc-editor.org/in-notes/rfc2396.txt" scope="external">RFC2396</xref>). The five URI components are: </p> <ul>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    62
<li id="GUID-C3E34C3E-82A4-5410-A054-5D05F0E52942"><p>scheme </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    63
<li id="GUID-C4D445B3-B0DB-5969-8E12-38D525C973C2"><p>authority </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    64
<li id="GUID-91A17058-D565-5557-B848-DFA375A0F8D6"><p>path </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    65
<li id="GUID-7ED0DC97-4A46-5307-B2F8-C5BA41AE7C1A"><p>query </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    66
<li id="GUID-2910FC88-DB70-534C-8289-25A4D3DE83E2"><p>fragment. </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    67
</ul> <p>The screen output from this example is: </p> <fig id="GUID-403B3926-A0E1-57A8-ADEF-1ECE198876D1">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    68
<image href="GUID-C31DA918-8DEA-5816-B0A6-4AE90B06DD0D_d0e175690_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    69
</fig> <p id="GUID-F8F98700-948D-542C-9B39-6DE3E257C3F3"><b>Validating a URI</b> </p> <codeblock id="GUID-294998AC-0125-52C0-82EF-C76729E0122C" xml:space="preserve">void CExampleInetProtUtil::ValidateUriComponents();</codeblock> <p>Validates
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    70
a given URI. This function is usually used for URIs with SIP as the scheme. </p> <p>The
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    71
screen output from this example is: </p> <fig id="GUID-16B862C4-804F-5751-ACE4-4C3DDC388617">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    72
<image href="GUID-71B31715-3B6A-50F0-86C1-8F7F76985802_d0e175709_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    73
</fig> <p id="GUID-B196045B-6DAF-561F-950C-5CDFB8B854A6"><b>Extracting URI
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    74
components</b> </p> <codeblock id="GUID-5FBD44E5-F6B9-55C9-BA71-B350B291C666" xml:space="preserve">void CExampleInetProtUtil::ExtractUriComponents();</codeblock> <p>Extracts
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    75
URI components from the given URI. </p> <p>The screen output from this example
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    76
is: </p> <fig id="GUID-C5AB909C-05DF-5570-A343-B7DD1A8B9EB2">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    77
<image href="GUID-E2455472-49FA-5492-B7CB-2C33BD830591_d0e175728_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    78
</fig> <p id="GUID-D30B9D97-7ADE-58EA-9AC0-8DC2095BCBEC"><b>Retrieving a filename
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    79
from a URI</b> </p> <codeblock id="GUID-87962D71-02C6-5553-AB4A-51B3AECC837D" xml:space="preserve">void CExampleInetProtUtil::RetrieveFileName();</codeblock> <p>Extracts
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    80
the actual physical location of the file from its URI. </p> <p>The screen
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    81
output from this example is: </p> <fig id="GUID-45C9AE9D-DBB4-53C3-A547-AB8713039796">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    82
<image href="GUID-C4D0F943-442D-5F3B-BB5E-6B52C33ABBC6_d0e175747_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    83
</fig> <p id="GUID-20375BA7-F367-5E12-9DC6-F9BDF4146E8A"><b>Adding and removing
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    84
delimiters from a URI</b> </p> <codeblock id="GUID-A8A9773C-4657-5A21-8C40-6E4DAEC49850" xml:space="preserve">void CExampleInetProtUtil::ModifyDelimiter();</codeblock> <p>Adds the delimiters to and removes the delimiters from a URI. Before
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    85
doing this ensure that: </p> <ul>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    86
<li id="GUID-072163F7-ECEC-54E5-A664-F4268898DEA9"><p>the delimiter is set
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    87
using <xref href="GUID-F8ED680B-1426-337A-8D78-18D0B7BE1EF2.dita"><apiname>SetDelimiter()</apiname></xref>  </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    88
<li id="GUID-F1482980-93FC-5D5D-A89F-1D16A5F46AAE"><p>the URI has already
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    89
been parsed. </p> </li>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    90
</ul> <p>The screen output from this example is: </p> <fig id="GUID-A7E7FD6F-3A1D-578A-85FE-7F3F771EE046">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    91
<image href="GUID-236C0D1D-AC4C-5C08-9089-1AC59881CD39_d0e175783_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    92
</fig> <p id="GUID-363D45CC-AC6E-5397-B825-086919FCBF50"><b>Removing whitespace
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    93
from a URI</b> </p> <codeblock id="GUID-A3A5053B-B12E-509B-98C7-9EE7095A9E57" xml:space="preserve">void CExampleInetProtUtil::WhiteSpaceRemover();</codeblock> <p>Removes
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    94
the whitespace from the given URI and returns the number of white spaces that
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    95
were removed. </p> <p>The screen output from this example is: </p> <fig id="GUID-0EC52CDC-5D6B-58F1-A817-0674CF66535A">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    96
<image href="GUID-F740BA72-B00E-5D98-BD0F-5937F60460BC_d0e175802_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    97
</fig> <p id="GUID-EC077086-FC68-50ED-8BCC-AFBD58205186"><b>Escape encoding
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    98
and decoding a URI</b> </p> <codeblock id="GUID-C62B11E9-0FE4-5CF4-A96A-5DB0E4E82A33" xml:space="preserve">void CExampleInetProtUtil::EscapeEncodeDecode();</codeblock> <p>Escape encodes the characters in a given URI as escape triplets and decodes
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    99
it to the original one. </p> <p>The screen output from this example is: </p> <fig id="GUID-0AC8D213-9857-56A1-9DC6-E6FBE137B608">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
   100
<image href="GUID-A92CE0FF-113F-55BE-B5EF-7E5C629A4557_d0e175821_href.jpg" placement="inline"/>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
   101
</fig> </section>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
   102
<section><title>Class Summary</title><p><xref href="GUID-E6F8C94C-C74C-329B-BB11-E06F0E83A4BB.dita"><apiname>CUri8</apiname></xref></p><p><xref href="GUID-EB2EEEF1-705B-334D-A4B0-3D0C4CBE2DA1.dita"><apiname>TUriParser8</apiname></xref></p><p><xref href="GUID-9CC256C4-D4A2-3534-9B3C-2FBF1AAE5F51.dita"><apiname>EscapeUtils</apiname></xref></p><p><xref href="GUID-B647B6DA-5FF1-3C11-9ACD-E4A5E70F3596.dita"><apiname>TDelimitedParserBase8</apiname></xref></p><p><xref href="GUID-9FC0E63B-1927-30B0-8A97-E9CB1010FFEE.dita"><apiname>InetProtTextUtils</apiname></xref></p></section>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
   103
</conbody></concept>