Qt API | Qtopia API | Qtopia Documentation |

## Qtopia - Defined Services

The services below are defined by Trolltech as basic services that may be available on a Qtopia device, and the messages which such services handle.

All services respond to the following messages:

- raise() Bring a user interface for the service to the top of the window stack.
- quit() Remove any user interface for the service. Note that sending this message when the service is not started will start the service (and immediately terminate it).

The following actions are defined for document oriented services:

- Open/mimetype
  - setDocument(QString document)
  - openFile(QString filepath) Version 1.01 only
- View/mimetype
  - setDocument(QString document)
  - viewFile(QString filepath) Version 1.01 only
- Receive/mimetype
  - receiveData(QString filename, QString type)
    - filename = name of file containing data
    - type = MIME type of the data

    The service should delete the file after reading it.

The services defined by Trolltech are:

- Email
  - writeMail() In response to this message, the Email service interacts with the user to complete the email message, and then, if confirmed by the user, send the email message.
  - writeMail(QMap(QString,QString) values)
    - values = set of header names -> value mappings (eg. names are "To", "Subject"), plus optionally a "BODY" -> value mapping giving the body content, plus optionally a "ATTACHMENT<n>" -> value mapping. The attachments value is ...
    In response to this message, the Email service interacts with the user to complete the email message, and then, if confirmed by the user, send the email message.
  - writeMail(QString name,QString email)
    - name = the name of the recipient, or the empty string.
    - email = the email address of the recipient.
    In response to this message, the Email service interacts with the user to complete the email message, and then, if confirmed by the user, send the email message.
- WebAccess
  - openURL(QString url)
    - url = a fully-specified URL
    In response to this message, the WebAccess service retrieves the resource specified by the URL and either displays it to the user, invokes further services to display the resource, or notifies the user that no facility exists for displaying the resource. If the resource cannot be retrieved, the WebAccess notifies the user.
  - retrieveURL(QString url)
    - url = a fully-specified URL
    In response to this message, the WebAccess service retrieves the resource specified by the URL, creates a document containing the resource. Then, if services exist to display the document, the WebAccess service gives the user the option to display the document. If the resource cannot be retrieved, the WebAccess notifies the user.
  - getURL(QString url, QString doclnk)
    - url = a fully-specified URL
    - doclnk = the filename of a .desktop file
    In response to this message, the WebAccess service retrieves the resource specified by the URL, creates a document containing the resource using the given doclnk as the document link file. The document is created even if the resource could not be retrieved. As a result of creating the document, Qtopia will send the QPE/System linkChanged(QString) message, with the doclnk as the argument.
- PlayMedia
  - openURL(QString url, QString mimetype)
    - url = a fully-specified URL
    - mimetype = the mimetype of the media file.
- Contacts
  - addContact(PimContact)
  - addAndEditContact(PimContact)
  - removeContact(PimContact)
  - updateContact(PimContact)
  - showContact(PimContact)
  - beamBusinessCard()
- Calendar
  - raiseToday()
  - newEvent()
  - newEvent(QDataTime,QDataTime,QString,QString)
  - showEvent(QUuid)
  - showEvent(QUuid,QDate)
  - newEvent(QDateTime start, QDateTime end, QString description, QString notes)
    - start = start time for the event (invalid = use default)
    - end = start time for the event (invalid = use default)
    - description = one-line description of the event
    - notes = detailed notes for the event
- Tasks
  - newTask()
  - addTask(PimTask)
  - removeTask(PimTask)
  - updateTask(PimTask)
  - showTask(QUuid)
- TimeMonitor
  - timeChange(QString timezone_id)
    - timezone_id = the new TimeZone id.