The ACCESS Linux Platform™ middleware Messaging component includes SMS, MMS, Instant Messaging, and Email services, and is managed through the Postal Services component. The Postal Services component provides a centralized framework to manage the various messaging capabilities of a device.
The underlying architecture of Postal Services is based on a client/server model. Messaging protocols are integrated into the server architecture as plug-in components. Postal Services plug-in development and integration within Postal Service architecture are facilitated by a plug-ins toolkit library (PSPDK).
The Postal Services Server communicates with its clients with an IPC mechanism that allows execution within different system processes. Postal Services expose a set of synchronous/asynchronous APIs to allow access to generic or specific messaging protocol services. Asynchronous function-call responses and unsolicited notifications are delivered to clients using a callback mechanism. Client callbacks are executed in the client process context. The Postal Services APIs are designed to enable clients to allocate a minimum of memory, and to limit the number of IPC calls within the server.
Postal Services Architecture
Postal Services provide applications with a set of C interfaces to high-level messaging functionalities. Postal Services provide a centralized framework to manage the various messaging capabilities of a wireless device.
The main goal of Postal Services is to control messaging interfaces within ACCESS Linux Platform by enforcing their consistency, and to facilitate the integration of new messaging protocols. A Postal Services client might be a unified messaging application, presenting to the user an overview of messages exchanged with all available messaging protocols.
The underlying architecture of Postal Services is based on a client/server model. Messaging protocols are integrated to the server architecture as plug-in components. The Postal Services Server communicates with its clients via an IPC mechanism allowing them to be executed within a different system process.
The following figure shows the Postal Services architecture:
Figure 1.1 Postal Services Framework
- PSC: Postal Services Client (e.g., a messaging application)
- PSS: Postal Services Server, the key component of the architecture. The server provides an IPC mechanism which allows communication between clients and PSS plug-ins. The Postal Service server gives client messages to the Postal Services Plug-in Manager for processing.
- PSCL: Postal Services Client Libraries, a set of shared libraries that provide access to Postal Services. All components that use the Postal Services APIs must be dynamically linked with these libraries.
- PSPDK: Postal Services Plug-in Development Kit, a shared library providing helper functions commonly used by the Postal Services plug-ins to communicate with the Postal Services Server, as well as access to the Postal Services Server Database.
- PSPlug-in Mgr: Postal Services Plug-in Manager, a shared library responsible for loading and managing plug-ins, including the management of a plug-ins table which holds load status. This manager is dynamically linked with both the Postal Services Server and the PSPDK.
- PS Plug-ins: Postal Services plug-ins, shared libraries with defined entry points called by the server using the PSPDK. PS Plug-ins are dynamically linked to the PSPDK. They implement the functionalities of the Messaging protocol exposed via Postal Services Client Libraries. PS plug-ins can override and/or reuse the default implementation of the PSCL Generic APIs. Plug-ins are described in "SMS", "MMS", "IMPS", and "Email."
- PSSDB: Postal Services Server Database, the main server database used to store all persistent plug-in data.
Postal Services Libraries
Postal Services Client Library APIs are either synchronous or asynchronous depending on the time they require to be executed. Long operations, such as the submission or retrieval of messages, or searches within the database, are performed asynchronously. The results of asynchronous API calls are returned to Postal Services Clients via defined callback sets with dedicated Postal Services Client Libraries APIs.
Postal Services Client Library APIs
The Generic Postal Services Client Libraries APIs are organized into sub-groups called Service Classes, which are related to messaging features:
- Office APIs — Retrieve the list of available Postal Services (SMS, MMS, IM)
- Account APIs — Manage the Services account (e.g., messaging server addresses, login and password, etc.)
- Envelope APIs — Manage messages
- BodyPart APIs — Manage body parts of the envelopes
- Address APIs — Manage different kinds of messaging addresses
- Session APIs — Manage the connection to a messaging service by using an account, and handle the submission and reception of envelopes
- Folder APIs — Manage the storage and classification of envelopes
- Search APIs — Find envelopes matching some criteria (including sort criteria)
API Documentation
The ACCESS Linux Platform SDK includes the reference documentation for those libraries supplied by ACCESS. This documentation can typically be found here:
/opt/alp-dev/sdk/docs/doxygen/index.html
Note that the Doxygen directory may not be present. If this is the case, you'll need to extract the contents of the doxygen.zip file that you'll find in the directory /opt/alp-dev/sdk/docs/. Open a terminal window and enter the following commands to extract the ACCESS reference documentation:
cd /opt/alp-dev/sdk/docs sudo unzip -d doxygen doxygen.zip
Postal Services provides the following API sets:
- Generic
- The Generic API set provides the functions for all primary Postal Services activities, including starting a postal session, logging into an account, exchanging information with the server for that account, and logging out.
- SMS
- The SMS API set provides functions, constants, and typedefs specific to SMS.
- MMS
- The MMS API set provides functions, constants, and typedefs specific to MMS.
- IMPS
- The IMPS API set provides functions, constants, and typedefs specific to IMPS.
- Email:
- The Email API set includes two sub-libraries containing functions, constants, and typedefs specific to IMAP4 and POP3.
Call Sequences
The following diagrams show examples of call sequences.
Figure 1.2 Open and Connect a Session
As shown in the following figure, after connecting to a session, the postal services flow includes creating an envelope and sending it to an Open Session.
Figure 1.3 Create an Envelope and Send to an Open Session
The following figure shows the flow for retrieving a Sent-To recipient from a sent folder.
Figure 1.4 Retrieve Sent-To Recipient from Sent Folder










