Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
<?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 task
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-31C19816-ED66-4E99-BF7C-33602C8B4AA2" xml:lang="en"><title>Define
and create a service</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context> <p>The first step in creating a new service is to define what
the service is its use. Services must be implemented over the server application
framework when there is a need for a client and UI service implementation
to be implemented in separate processes. For instance, this may be done to
avoid capability clashes between components. When a new service type is
identified, a new UID must be assigned to identify it. </p><p><b>Define the
APIs</b></p><p>The client and server-side APIs must be implemented through
an IPC protocol. Therefore, usage of complex objects which are difficult to
represent over IPC must be avoided.</p><p>The following example shows the
UID and IPC message IDs for a chat service.</p><codeblock xml:space="preserve">const TUid KInterAppChatType = { 0x01010202 };
enum
{topic
EInterAppChatSend = RApaAppServiceBase::KServiceCmdBase,
EInterAppChatReceive, EInterAppChatCancelReceive
};</codeblock></context>
</taskbody></task>