Resources | Resources |



Application information in CIF and MIF

A Component Information File (CIF) provides information about an application, including

  • The application's ClassID
  • Any privileges the application has
  • For MOD1, it also contains the name of the function called to create an instance of the class

The CIF can also specify any of the following:

  • Icons for the application that are used on the device's Brew MP menu
  • Copyright information
  • External extensions (libraries) that the application uses
  • Extensions (libraries) that the application exposes for others to use

The CIF is compiled to create the Module Information File (MIF), which is used at runtime.

Component Information File (CIF)

CIFs are written in the LUA language, and are a replacement for the MFX file in BREW. CIFs are compiled into MIF using the CIF compiler, cifc.exe.

The Brew MP Resource Manager provides a UI and a click-to-build interface that you can use to create CIFs. You can also use any text editor to create and manage CIFs. To compile the CIF, use cifc.exe, or the Brew MP build system, which internally invokes cifc.exe. For more information on Resource Manager and cifc.exe, see the Tools Reference in on the Brew MP website.

Generally, using Resource Manager to create CIFs is better suited to developers new to Brew MP. Once you are familiar with the CIF syntax, you can switch to using a text editor and cifc.exe or the Brew MP build system. CIF is basically a programming language, and it's difficult to wrap a UI around it; the text-editing environment provides more flexibility.

Module Information File (MIF)

A MIF contains module-specific information such as privileges, and resources such as applet names, in binary format. The MIF is the component used to identify external dependencies, in the form of external classes and extensions, that the application uses. The MIF is also used to provide classes and functionality to other applications.

CIF example

The following CIF example is from c_basicapp:

include ""

ModRsc {
   id    = 6,
   type  = 1,  --RESTYPE_ENCSTRING (see AEEResType.h)
   data  = EncStringRscData(0x03, "QUALCOMM Incorporated")

ModRsc {
   id    = 7,
   type  = 1,  --RESTYPE_ENCSTRING (see AEEResType.h)
   data  = EncStringRscData(0x03, "Copyright 2009")

ModRsc {
   id    = 8,
   type  = 1,  --RESTYPE_ENCSTRING (see AEEResType.h)
   data  = EncStringRscData(0x03, "")

ModRsc {
   id    = 20,  -- Applet base resource id
   type  = 1,  --RESTYPE_ENCSTRING (see AEEResType.h)
   data  = EncStringRscData(0xff, "C Basic App")

ModRsc {
   id    = 21,
   type  = 6, --RESTYPE_MIMETYPED (see AEEResType.h)
   data  = ImageRscData("image/png", BytesOfFile("c_basicapp_ico.png"))

Applet {
   appletid       =  AEECLSID_C_BASICAPP,
   resbaseid      =  20, -- Applet base resource id
   applethostid   =  0,
   type           =  0,
   privs          = {},