Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
<?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-E189B0C0-AAB5-5472-996B-91043DE0B6D4" xml:lang="en"><title>Package Buffers Overview</title><shortdesc>Allows any value type (a T class) to be encapsulated as
a descriptor, for the purpose of inter-thread data transfer.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-D6ADB133-EB0D-41C5-B513-152ED052BA9F"><title>Architectural
relationships</title> <p>The Client/Server API expects data that is
to be passed between threads to be encapsulated in a descriptor. Package
buffers provide a generic way for the thread providing the data to
do this. The thread receiving the data extracts the original data
from the package.</p> <p>APIs with client/server architectures, such
as telephony and Messaging, define specialised package buffer types
that encapsulate the particular data types that they require to pass
between threads.</p> </section>
<section id="GUID-545604B3-1A3A-4236-AB40-F15E19D40487"><title>Description</title> <p>The API has two key concepts: package buffer descriptor, and
package pointer descriptor. </p> </section>
<section id="GUID-5B34C59B-3D61-48E9-9939-0259E1EC9A64"><title>Package
buffer descriptor</title> <p>The package buffer descriptor creates
a new instance of the type to encapsulate and stores it within the
descriptor. The interface allows a reference to the encapsulated object
to be obtained, so that it can be accessed and modified.</p> <p>The
package buffer descriptor interface is provided by <xref href="GUID-C7A094BD-846F-3ED2-8CCE-C0743DB3712A.dita"><apiname>TPckgBuf</apiname></xref>.</p></section>
<section id="GUID-B12499C9-B385-43CF-8342-06B34150BE67"><title>Package
pointer descriptor</title> <p>The package pointer descriptor refers
to an already existing object. It is otherwise used in a similar way
to the package buffer descriptor.</p> <p>The package pointer descriptor
interface is provided by <xref href="GUID-36B29964-420D-38D0-AF08-4DA70BED8B6E.dita"><apiname>TPckgC</apiname></xref> for const objects,
and <xref href="GUID-4DFB8E64-81FF-3D3B-9694-CE51B11DA69A.dita"><apiname>TPckg</apiname></xref> for non-const objects. </p> </section>
</conbody><related-links>
<link href="GUID-11EEFB3D-0414-5BEB-9D78-56A4B9154008.dita"><linktext>Using
Descriptors</linktext></link>
<link href="GUID-D0D27AEA-FDDB-5F6F-94F6-ADDF5910DC47.dita"><linktext>Client/Server
Overview</linktext></link>
</related-links></concept>