Resources | Resources |




An interface is a software contract between an implementing class and the client that uses the interface. Interfaces provide the definition of a particular set of APIs in a functional object. Interfaces are identified by unique 32-bit AEEIIDs, included in the interface definition. For public interfaces, the interface ID should be obtained using the The following is an example of an interface ID definition:

const AEEIID AEEIID_IFoo = 0x00000000; /* not a real IID */
interface IFoo : IQI
    /* interface body */

Brew MP enforces strict rules for interface construction, naming, and life cycle, which ensure platform compatibility and security. APIs are exposed by modules as objects associated with interfaces and classes. See Classes for more information.

There are two kinds of interfaces:

  • Interfaces that use dynamic binding: true run-time interfaces that conform to QCM. These interfaces are commonly referred to as QCM interfaces.
  • Static APIs: conventional C APIs resolved during the link step of the build.

An interface describes how to interact with the instances of the class. The following diagram illustrates the relationship between interfaces and classes, and how objects manifest in memory. The classes and interfaces on the left are defined in the code for the applet; the objects in memory shown on the right are the instantiations of classes that are stored in memory when the applet is executing.