Chapter 10. Client–Server Framework

Symbian OS uses servers to manage resources centrally on behalf of one or more clients. A server does not normally have a graphical user interface (GUI), and, in most cases, runs in its own process to provide protection and modularity. (Servers and clients are always in different threads, although you can have multiple servers in the same process, or even in the same thread.) Fundamentally, a server is simply a command-processing engine – it waits for a command from a client, executes the service that corresponds to the command, returns the results to the client, and then waits for the next command.

A client program uses a server through a client-side implementation class – the programmer invokes the functions of the server through methods in the client class. Each method sends the appropriate command to the server and receives the command results back to return to the caller. The client class handles the details of establishing a session with its associated server, as well as sending commands to the server and receiving responses from it.

Symbian OS uses servers to implement much of its functionality. In fact, many of the Symbian OS API classes are client classes for servers. Many asynchronous functions are also implemented within a server, since the server runs within a separate thread from the client. Here are just a few examples of servers in Symbian OS:

  • The window server provides centralized access to the phone's screen, as well as user input ...

Get Developing Software for Symbian OS: A Beginner's Guide to Creating Symbian OS v9 Smartphone Applications in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.