MIME Recognition Framework Overview

The MIME (Multipurpose Internet Mail Extension) recognition framework enables data type identification.

The MIME recognition framework implements data type recognition using MIME (data) recognizers. The MIME recognizers are ECOM plug-ins. A MIME recognizer reads a small piece of the data. A data type can be recognized by more than one MIME recognizer. The framework uses the concepts of priority and confidence level to determine the data type.

The Application Architecture (AppArc) launches the appropriate application using the MIME framework to handle the data.

It is not guaranteed that an application will be available to handle a data type, even if it was successfully recognized.

Purpose

MIME type recognition enables devices to identify data type in streams or files and start appropriate application automatically.

Key concepts and terms

MIME

MIME (Multipurpose Internet Mail Extension) is an internet standard system for identifying the type of data in a file or stream. Types can include graphics, photos, audio, video files and formatted text.

Priority

The plug-in developer assigns a priority (EHigh, ENormal or ELow) to the data recognizers. A data type can be handled by more than one application and may therefore be recognized by more than one recognizer.

The priority determines the position at which the recognizer is inserted into the recognizer list. The higher priority recognizers are placed at the start of the list. If more than one recognizer recognizes a data type with the same confidence, the recognizer with the higher priority takes precedence. The sequence in which recognizers are invoked by the framework is determined by their priority. High priority recognizers are invoked first.

For more details refer to CApaDataRecognizerType::TRecognizerPriority.

Recognizer list

The MIME recognition framework maintains a list of MIME recognizers. The recognizer list is constructed based on the data types the MIME recognizers claim to support and is ordered by priority.

Confidence level

A MIME recognizer reads a small piece of data from the start of a file or stream. It attempts to match the data with one of its known types. If the match is complete it returns the associated data type with full confidence (ECertain) and if there is no match it returns no data type with no confidence (ENotRecognized). If there is a partial match it can return a data type with an intermediate confidence level (EPossible, EUnlikely, ENotRecognized).

The confidence of MIME recognizers can be expressed in 5 different levels:

  • ECertain

  • EProbable

  • EPossible

  • EUnlikely

  • ENotRecognized

By default, the confidence level of the MIME Recognizer is ECertain.

For more details refer CApaDataRecognizerType::TRecognitionConfidence.

Architecture

MIME recognizers are ECOM plugins, located under \sys\bin\.

Figure: MIME framework architecture

  • AppArc is the main client of the MIME recognition framework.

  • Applications that need data type recognition use the MIME recognition framework via AppArc APIs.

  • The MIME recognition framework delegates the data type identification task to an appropriate MIME recognizer.

  • The MIME recognizer identifies the data type.

  • AppArc launches the application for the identified data type.

APIs

API Description

CApaDataRecognizerType

Is the abstract base class for a recognizer. Recognizers need to define and implement a derived class and provide an implementation of the functions.This class contains the MIME APIs related to MIME recognition framework.

RApaLsSession

A session with the application architecture server. The server provides access to a cached list of the applications on the device. This class contains the AppArc APIs related to MIME recognition framework.

Typical uses

The MIME recognition framework allows the plug-in writers to: