Symbian3/SDK/Source/GUID-D28FA4E1-6A94-4508-95B3-ACE21BCE6EA7.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-D28FA4E1-6A94-4508-95B3-ACE21BCE6EA7" xml:lang="en"><title>Open
C String Utilities Example</title><shortdesc>String Utilities Library Example</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>String manipulation on Symbian platform is bit tricky. Even though Symbian
platform has rich set of APIs for formatting/manipulating strings with both
UNICODE (16 bit variants) and narrow character sets (8-bits), using those
APIs will be bit complex for those who have familiarized Standard C string
manipulations.  When one writes hybrid applications on Symbian platform using
native Symbian APIs as well as Open C APIs, user may need to convert the descriptors
of Symbian platform to standard C character strings and vice versa. Especially,
in case of writing hybrid applications on open C, user will be facing this
conversion problem more frequently. It is really difficult to do these conversions
without the thorough knowledge of Symbian platform descriptors.   OpenCStringUtilitiesEx
is a library, which makes Open C’s developers life easy. OpenCStringUtilitiesEx
is a library, which exports several string- utility APIs for descriptor to
character string conversions and vice versa. With the help of this library,
user will be able to write a hybrid application on Open C, with out knowing
much about the descriptors of Symbian platform. </p>
<section id="GUID-026FD8D6-6C4A-5958-B289-775D4AE1E756-GENID-1-10-1-11-1-1-5-1-3-1-11-1-14-1-3-2"><title>Download</title> <p>Click
on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-ef84586b-da53-4132-b481-aef6ba5a0994.zip" scope="external"> OpenCStringUtilitiesEx.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-ef84586b-da53-4132-b481-aef6ba5a0994.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section id="GUID-7E7C4564-B10E-41F9-8A9D-D8A6C5E9C51C-GENID-1-10-1-11-1-1-5-1-3-1-11-1-14-1-3-3"><title>Design and
Implementation</title> <p>The following sections provide information about
the implementation of the example.</p> <p><b>Capabilities</b> </p>The program
capabilities are defined in: <filepath> stringutils.mmp</filepath>(DLL - library): <codeph>CAPABILITY
NONE</codeph> <filepath>stringutils_example.mmp</filepath> (EXE - application): <codeph>CAPABILITY
NONE</codeph>.<p><b>Module Hierarchy</b></p><p>This application has 2 modules
as below:   String-utils library (OpenCStringUtilitiesLibEx.dll) that exports
set of APIs for the user (OpenCStringUtilitiesLibEx).   An application (EXE)
that demonstrates the usage of Open C APIs and also those APIs exported by
String Utils library. (OpenCStringUtilitiesLibEx)  This example creates a
DLL which exports set of generic APIs that can be used to convert descriptor
of Symbian platform to character string and vice versa.   To give an rough
idea on how to use these APIs, an EXE is provided that calls the APIs of OpenCStringUtilitiesLibEx
and illustrates their uses.</p><p><b>Implementation details of EXE</b> </p>OpenCStringUtilitiesExeEx
is a simple console based C application that uses String-utils library. This
application uses main() as the entry point for the application.It demonstrates
how to use String-utils library (OpenCStringUtilitiesLibEx.dll) APIs.  It
has its own icon and can be launched from the UI both in the emulator and
in the device. <p><b>APIs demonstrated</b></p><p><xref href="GUID-68B65AA3-AE49-390F-A2E2-30D8759F648D.dita"><apiname>tbuf16towchar</apiname></xref></p><p><xref href="GUID-6B38C374-D9EE-30CB-B554-76109A759715.dita"><apiname>tbuf16tochar</apiname></xref>  </p><p><xref href="GUID-CA1AF5CD-E167-3695-880D-D8C011AE1777.dita"><apiname>tbuf8towchar</apiname></xref>  </p><p><xref href="GUID-025329B8-54D2-334B-80B7-B01656B461CA.dita"><apiname>tbufC16towchar</apiname></xref></p><p> <xref href="GUID-E2CFBDCD-2864-3B23-B9E9-B98A16FA4341.dita"><apiname>tbufC8tochar</apiname></xref>  </p><p><xref href="GUID-599A5AA9-703A-3584-8F59-A9DFA1362B4A.dita"><apiname>tbufC16tochar</apiname></xref>  </p><p><xref href="GUID-70F3BC58-C386-3CFE-9A93-EB4F2A637875.dita"><apiname>tbufC8towchar</apiname></xref> </p><p> <xref href="GUID-B5674394-1D74-31BB-AF55-34AAEF9D5749.dita"><apiname>wchartotbuf16</apiname></xref>  </p><p><xref href="GUID-245EA280-238A-371A-AA4E-FF9D056DD288.dita"><apiname>chartotbuf16 </apiname></xref> </p><p><xref href="GUID-B9187887-00EE-3C97-AF98-21E29B27CE14.dita"><apiname>wchartotbuf8</apiname></xref>  </p><p><xref href="GUID-BD53EFB6-CE1E-3CBE-923B-3F3730272B60.dita"><apiname>chartotbuf8</apiname></xref> </p><p> <xref href="GUID-08726C60-7F87-3969-90A1-937ECADA3D88.dita"><apiname>wchartohbufc16</apiname></xref>  </p><p><xref href="GUID-387C67D2-C5D9-36E6-9E49-6917E0287266.dita"><apiname>chartohbufc16</apiname></xref>  </p><p><xref href="GUID-88876C84-4D4E-3FBB-A676-E621D3EC67C8.dita"><apiname>wchartohbufc8</apiname></xref>  </p><p><xref href="GUID-273E4D2E-83D2-3229-B973-16BD96B69C71.dita"><apiname>chartohbufc8</apiname></xref> </p><p> <xref href="GUID-D1E233B3-CB49-3ED2-B8E1-33761D41E501.dita"><apiname>hbufC16towchar</apiname></xref> </p><p> <xref href="GUID-EFBC32AF-3FDB-312E-B8A4-905B0767A743.dita"><apiname>hbufC16tochar</apiname></xref> </p><p> <xref href="GUID-ACAD2625-1E6D-3E13-B3DD-E59E97258F4A.dita"><apiname>hbufC8towchar</apiname></xref>  </p><p><xref href="GUID-8A8B0CC7-9270-346E-A835-5BD70B168204.dita"><apiname>hbufC8tochar</apiname></xref> </p></section>
<section id="GUID-67A72761-1D92-46D1-B1C9-7455978BDE4E-GENID-1-10-1-11-1-1-5-1-3-1-11-1-14-1-3-4"><title>Building and
Using</title> To build the example application, go to the OpenCStringUtilitiesEx\group
directory and build the application.  The definition for the whole application
can be found in the bld.inf file in the group subdirectory of the applications
main directory. </section>
</conbody></concept>