diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-D5AB2689-44B7-5E81-888A-48C622AAE21B.dita --- a/Symbian3/PDK/Source/GUID-D5AB2689-44B7-5E81-888A-48C622AAE21B.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-D5AB2689-44B7-5E81-888A-48C622AAE21B.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,68 +1,68 @@ - - - - - -Server_App_Minimal: -A Minimal Server Application Example -
Download

Click on the following link to download -the example: ServerApp.zip

Click: browse to view the example code.

-
Description

This example demonstrates a minimal server application making -use of a minimal UI application.

The example application consists -of three sub-projects:

    -
  1. A harness project -which uses the Client API to generate a client request and trigger the server -application

  2. -
  3. A service_support project -consisting of Service Client Support and Service Implementation Support. Both -client-side and server application-side support are built into a single DLL -which encapsulates the IPC protocol between client and server.

  4. -
  5. A server_application project -that provides the entry point into the server application. This sub-project -consists of the Server class and of the actual Application.

  6. -
-
Service support classes

Service Client Support -class (Client API)

Client side service support is provided through -an REikAppServiceBase derived class, RServAppService. -This class implements the following required functions:

    -
  • RApaAppServiceBase::ServiceUid(), -a pure virtual function

  • -
  • RServAppService::Send() which -sends a request to the server

  • -

Service Implementation Support class (Server Implementation API)

A CApaAppServiceBase derived -class, CServAppSession, provides Service Implementation Support -(support for the sessions connected to the server). The main purpose of this -class is to override the pure virtual function CSession2::ServiceL(), -such that a call to the appropriate service support code is made.

In -this example, CServAppSession defines a pure virtual function, Display(), -the functionality of which is implemented in the server application.

-
Server application classes

Server class

The -server class CServAppServer is derived from CEikAppServer and -implements the function CApaAppServer::CreateServiceL(). -This function instantiates a session to handle the client request (by implementing -an appropriate service).

Session class

CMinimalSession is -a CApaAppServiceBase derived class that represents the -session connected to the server. In order to handle the client request, this -session class overrides the pure virtual function CServAppSession::Display(). -Thus, the client request is implemented.

UI classes

Application -class

Document class

Application UI class

View class

These -four classes are almost the same as those in the minimal UI application example. -A couple of slight modifications have been made:

    -
  • CEikApplication::NewAppServerL() has -been overridden in the Application class CExampleApplication to -launch a new server application instance.

  • -
  • CExampleAppView::Draw() has -been altered so that it produces an empty view.

  • -
-
Summary of class hierarchy of the classes used - Key Classes - -

Service Support

RApaAppServiceBase -> REikAppServiceBase -> RServAppService

CApaAppServiceBase -> CServAppSession

Server -Application

CApaAppServer -> CEikAppServer -> CServAppServer

CServAppSession -> CMinimalSession

CApaApplication -> CEikApplication -> CExampleApplication

CEikDocument -> CExampleDocument

CEikAppUi -> CExampleAppUi

CCoeControl -> CExampleAppView

+ + + + + +Server_App_Minimal: +A Minimal Server Application Example +
Download

Click on the following link to download +the example: ServerApp.zip

Click: browse to view the example code.

+
Description

This example demonstrates a minimal server application making +use of a minimal UI application.

The example application consists +of three sub-projects:

    +
  1. A harness project +which uses the Client API to generate a client request and trigger the server +application

  2. +
  3. A service_support project +consisting of Service Client Support and Service Implementation Support. Both +client-side and server application-side support are built into a single DLL +which encapsulates the IPC protocol between client and server.

  4. +
  5. A server_application project +that provides the entry point into the server application. This sub-project +consists of the Server class and of the actual Application.

  6. +
+
Service support classes

Service Client Support +class (Client API)

Client side service support is provided through +an REikAppServiceBase derived class, RServAppService. +This class implements the following required functions:

    +
  • RApaAppServiceBase::ServiceUid(), +a pure virtual function

  • +
  • RServAppService::Send() which +sends a request to the server

  • +

Service Implementation Support class (Server Implementation API)

A CApaAppServiceBase derived +class, CServAppSession, provides Service Implementation Support +(support for the sessions connected to the server). The main purpose of this +class is to override the pure virtual function CSession2::ServiceL(), +such that a call to the appropriate service support code is made.

In +this example, CServAppSession defines a pure virtual function, Display(), +the functionality of which is implemented in the server application.

+
Server application classes

Server class

The +server class CServAppServer is derived from CEikAppServer and +implements the function CApaAppServer::CreateServiceL(). +This function instantiates a session to handle the client request (by implementing +an appropriate service).

Session class

CMinimalSession is +a CApaAppServiceBase derived class that represents the +session connected to the server. In order to handle the client request, this +session class overrides the pure virtual function CServAppSession::Display(). +Thus, the client request is implemented.

UI classes

Application +class

Document class

Application UI class

View class

These +four classes are almost the same as those in the minimal UI application example. +A couple of slight modifications have been made:

    +
  • CEikApplication::NewAppServerL() has +been overridden in the Application class CExampleApplication to +launch a new server application instance.

  • +
  • CExampleAppView::Draw() has +been altered so that it produces an empty view.

  • +
+
Summary of class hierarchy of the classes used + Key Classes + +

Service Support

RApaAppServiceBase -> REikAppServiceBase -> RServAppService

CApaAppServiceBase -> CServAppSession

Server +Application

CApaAppServer -> CEikAppServer -> CServAppServer

CServAppSession -> CMinimalSession

CApaApplication -> CEikApplication -> CExampleApplication

CEikDocument -> CExampleDocument

CEikAppUi -> CExampleAppUi

CCoeControl -> CExampleAppView

\ No newline at end of file