A client must perform the following steps to use a service implemented over the server application framework:
Identify the service support provided for the service in the platform.
Include the client-support header of the service support and link to the service support DLL.
Use the service's implementation discovery support to find an implementation to connect to.
Create a new instance of the client-side service, connecting it to a new or existing service application instance as necessary.
Monitor the lifetime of the server application, so that appropriate cleanup can be performed on server application exit.
Use the server application.
The following is an example of a chat service.
void CMyApp::HandleCommandL(aCommand) … case EMyAppCmdStart: iChatter = new(ELeave) CChatter(this); iChatter->ConstructL(TUid::Uid(0x0de630f1)); iServerMonitor = CApaServerAppExitMonitor::NewL(iChatter->iSub, this); break; case EMyAppCmdSend: if (iChatter) iChatter->SendL(_L("hello server")); break;
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.