Introducing the Messaging Library

Posted by Qt Mobility on September 21, 2009 · 3 comments

As part of the Qt Mobility project, we are introducing the Messaging library. This library enables access to messaging services.

Currently Email, SMS and MMS types of messages are supported by the library. We plan to support other types of messages in the future. Services provided by the message library include searching and sorting messages, sending messages, retrieving message data, and launching the preferred messaging client on the system to either display an existing message, compose a new message, or respond to an existing message.

Like other libraries in the Mobility project, this is a cross platform library that enables access to native services. An implementation for QMF, which was recently introduced here on Qt labs, is mostly complete. A Windows implementation based on MAPI and the Outlook Object Model is about half complete, and unoptimized. Subsequently implementations for Symbian, Windows Mobile, Maemo, and other platforms will be completed.

The code is available on Gitorious, and includes documentation and examples. Qt 4.5 is required to compile the project.

One of the examples included is called ‘Keep in touch’. This application demonstrates the searching services provided by the library by finding a list of addresses, and hence people, that messages have not been sent to recently.

Keep in touch example

Predictably the messaging library API contains classes that represent message, message part (MIME/TNEF entities), message address, folder and account objects, additionally identifiers for these objects also exist where appropriate. The API also contains a QMessageServiceAction class, instances of this class, known as ‘service actions’, can be used to send, retrieve, display and compose messages, with progress information being reported when available.

A QMessageStore singleton class, known as ‘the store’ is used to access messaging data on the computer. The store and service actions enable retrieval of message, folder and account objects using identifier objects. Identifiers can be retrieved by using the store or service actions to filter and sort messages, folders and accounts stored on the computer. Additionally the store provides Qt signals for detecting the arrival, modification and deletion of messages on the computer.

Messaging API class diagram

Please feel welcome to send your feedback to qtmobility at trolltech.com.

QShare(this)

Possibly related posts:

  1. Introducing muxcons
  2. Building the future: (re)Introducing the Qt Quick components

3 comments

1 Haso Keric September 21, 2009 at 6:52 pm
 

This is great – it can be done simple via sockets yes but why waist our time when we have Qt which helps us to be more productive and worrry about other things.

Simply nice, good thinking

2 Bummed September 22, 2009 at 3:23 am
 

Where was this a month ago when I was coding “EHLO” MIME etc. for the latest project, arrgh!

3 Adam Higerd September 25, 2009 at 10:32 pm
 

I wonder if it’ll be feasible to hook this up to libpurple.

Comments on this entry are closed.

Previous post:

Next post: