Developer

API Reference

IInterfaceModel

IInterfaceModel is inherited from the IModel interface and is used as a shim for objects
that wish to model data stored in an interface that lacks a formal query interface. Use
of the IInterfaceModel also ensures strict data type enforcement on the data stored in
the model interface (where the IValueModel interface would not). This is particularly
important for standard BREW data types. For example, the bitmap and image widgets rely
on their native BREW interfaces (IBitmap and IImage, respectively) for storing data.
However, neither of these interfaces support a query interface. Thus, changes to the data
stored in these objects may be funneled through IInterfaceModel.
IInterfaceModel provides object reference counting mechanisms that allow objects to manage
their own memory instances. In addition, the interface provides APIs for registering a listener
with a value model, as well as interfaces for manipulating the interface reference information
stored in the model.

Usage

InterfaceModels are used as a wrapper around objects that do not support a query
interface. One possible use for this would be to insert a bitmap into an image widget.
This example details the retrieval of a bitmap (pib) that has already been inserted
into the widget (piw).

Qualcomm and Brew are trademarks of Qualcomm Incorporated, registered in the United States and other countries. Trademarks of Qualcomm Incorporated are used with permission. Other products and brand names may be trademarks or registered trademarks of their respective owners.