API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
ModelListener PFNLISTENER ILISTMODEL_AddListener()
This function allows objects such as widgets and UI controls to attach a listener to the given vector model. The listener includes a callback function that BREW will call whenever the model has changed state, thereby notifying the owner of the listener that data has changed. For example, a collection of MP3 songs might use the vector model to store information about the title, time, genre and the actual encoded data for each stored file -- each, as a variable length item within the model. An "MP3 browser widget" could register as a listener for this model by calling IVectorModel_AddListener(). As new MP3 files are acquired and stored into the vector model, BREW will send out notifications to all registered objects, providing them the opportunity to update their display or react in some other manner. The MP3 browser widget, for example, as a listener of the vector model, might update its display to show the title and length of new songs.
Pointer to the IVectorModel interface object.
Pointer to the ModelListener that will be attached to the object. The ModelListener will contain the PFNLISTENER callback function BREW will call to notify the registering object of changes to the value model.
  •    int IVectorModel_AddListener(IVectorModel *p, ModelListener pl); 
  •    AEE_SUCCESS          - Listener successfully added
       AEE_EBADPARM         - Invalid argument
       ENOMEMORY        - Insufficient memory
Side Effect
  • None