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

Developer

API Reference

ISHELL_CHECKPRIVLEVEL()

Brew Release
Brew MP 1.0.2
See Also
AEE Privilege Levels Error Codes IFILEMGR_CheckPathAccess IShell ISHELL_AppIsInGroup ISHELL_CreateInstance Privileges
Description
This function checks the privilege level of the currently running application against the specified value. If the privilege level matches, the function returns TRUE. If the privilege level does not match, the function returns FALSE and conditionally terminates the application with a system message.
Params
pIShell
[]:
Pointer to the IShell interface object.
clsIDWant
[]:
Class to verify access for.
bQueryOnly
[]:
If TRUE, this is a query only. If FALSE, the application terminates if it does not have the privileges specified in wPrivWant.
Interface
  • ISHELL
Prototype
  •     boolean ISHELL_CheckPrivLevel
        (
        IShell * pIShell,
        AEECLSID clsIDWant,
        boolean bQueryOnly
        );
    
Return
  • TRUE : The application supports this privilege level mask. FALSE : The application does not support this privilege level.
Side Effect
  • None
Comments
If bQueryOnly is FALSE and the function returns FALSE, no further processing is done on the application while it is terminating. If the high-order word of clsIDWant is 0, the value is treated as a bit-mask of the old-style privilege bits:
  • PL_FILE
  • PL_NETWORK
  • PL_TAPI
  • PL_DOWNLOAD
  • PL_SHARED_WRITE
  • PL_POS_LOCATION
  • PL_SYSTEM
  • PL_WEB
  • PL_RINGER_WRITE
  • PL_SECTORINFO
  • PL_ADDRBOOK
ISHELL_CheckPrivLevel() can be thought of as "ISHELL_AppIsInGroup". An application becomes a member of a "group" in one of three ways: 1. Every application is a member of its own group: the group that is equal to the application's class ID. 2. Each privilege level set in a module's MIF denotes a group; PL_FILE is a group, as is PL_NETWORK. 3. Adding a class ID to the module's "Dependencies" adds the module to the group denoted by that class ID. A return value of AEE_SUCCESS from ISHELL_CheckPrivLevel() does not in itself imply that ISHELL_CreateInstance() will succeed. The classID desired may not be present on the device, may not be instantiable (e.g. PL_FILE), or may be restricted (the applet's class IDs may be instantiated only by the system). Every application is a member of the group 0.