Symbian3/PDK/Source/GUID-31C19816-ED66-4E99-BF7C-33602C8B4AA2.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?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>