Skip to Content
Common Design Patterns for Symbian OS: The Foundations of Smartphone Software
book

Common Design Patterns for Symbian OS: The Foundations of Smartphone Software

by Adrian A. I. Issott
December 2008
Intermediate to advanced
443 pages
10h 24m
English
Wiley
Content preview from Common Design Patterns for Symbian OS: The Foundations of Smartphone Software

4.2. Request Completion

Intent

Use TRequestStatus as the basis for event signals sent across thread and process boundaries.

AKA

None known

4.2.1. Problem

4.2.1.1. Context

You wish to propagate warm event signals between an event generator and an event consumer operating within different threads or processes.

4.2.1.2. Summary
  • You wish to reduce the power usage of your component.

  • You want to promote encapsulation of and loose coupling between your event generators and event consumers.

4.2.1.3. Description

An event generator wishes to propagate event signals to an event consumer that is running in a separate thread, possibly in a different process. The fact that a thread boundary is being crossed means Event Mixin (see page 93) can't be used to solve the problem.

In addition, the need to support event signals crossing a process boundary means that a number of other possible solutions, such as function pointers, simply won't work. This is because the Symbian OS kernel enforces memory isolation between processes and so an object in one process cannot be directly accessed from another process. In fact, the only way to send event signals between processes is to involve the kernel in some way.

4.2.1.4. Example

The USB Manager component in Symbian OS uses the transient variant of Client–Server (see page 182) to co-ordinate the support for USB. Being a transient server, it is initialized when a client first creates a session to it. When the first session has been created, there is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Aaron Hillegass, Adam Preble, Nate Chandler

Publisher Resources

ISBN: 9780470516355Purchase book