diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-AB7E58EB-F698-4CAD-B9BF-ECE712C6DB04.dita --- a/Symbian3/PDK/Source/GUID-AB7E58EB-F698-4CAD-B9BF-ECE712C6DB04.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-AB7E58EB-F698-4CAD-B9BF-ECE712C6DB04.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,42 +1,42 @@ - - - - - -Create -the service class -

Create the server service support class, derived from CApaAppServiceBase or -a suitable System-GUI specialization of this class. This class adapts the -IPC protocol to a set of virtual functions which the server application can -override to implement the service. This class has the following responsibilities:

    -
  • Receiving and decoding the IPC messages from the client

  • -
  • Defining and calling virtual functions which the server application -can override to implement the service

  • -
  • Checking all parameters sent from the client for validity

  • -
  • Supporting the security policy of the server application for this service.

  • -

This example shows a server-side service support class for a chat -service. This class implements the code necessary for sending messages to -the client, but provides a pure virtual Receive() function -for the server application to implement its own handling of messages received -from the client.

class CChatService : public CApaAppServiceBase - { - public: - CChatService(); - ~CChatService(); - void Send(const TDesC& aMessage); - virtual void Receive(TDes& aMessage) = 0; - private: - void ServiceL(const RMessage2& aMessage); - TBool ReceivePending() const; - private: - RMessagePtr2 iReceiveMsg; - TInt iReceiveLen; - }; -
+ + + + + +Create +the service class +

Create the server service support class, derived from CApaAppServiceBase or +a suitable System-GUI specialization of this class. This class adapts the +IPC protocol to a set of virtual functions which the server application can +override to implement the service. This class has the following responsibilities:

    +
  • Receiving and decoding the IPC messages from the client

  • +
  • Defining and calling virtual functions which the server application +can override to implement the service

  • +
  • Checking all parameters sent from the client for validity

  • +
  • Supporting the security policy of the server application for this service.

  • +

This example shows a server-side service support class for a chat +service. This class implements the code necessary for sending messages to +the client, but provides a pure virtual Receive() function +for the server application to implement its own handling of messages received +from the client.

class CChatService : public CApaAppServiceBase + { + public: + CChatService(); + ~CChatService(); + void Send(const TDesC& aMessage); + virtual void Receive(TDes& aMessage) = 0; + private: + void ServiceL(const RMessage2& aMessage); + TBool ReceivePending() const; + private: + RMessagePtr2 iReceiveMsg; + TInt iReceiveLen; + }; +
\ No newline at end of file