PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBBattery
Wrapper Class for the IBattery interface.
#include <SFBBattery.h.hpp>
class SFBBattery : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBBattery)

Inheritance diagram

 Inheritance diagram of SFBBatteryClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API IBattery

Member

Public Functions
SFCError GetBatteryChargerStatus( AEEBatteryChargerStatus* batteryChargerStatus )
Querie the current battery charger status.
SFCError GetBatteryLevel( UInt32Ptr data )
Querie the current battery level.
SFCError GetBatteryStatus( AEEBatteryStatus* batteryStatus )
Querie the current battery status.
SFCError IsExternalPowerPresent( BoolPtr data )
Querie if external power is present.
static
SFBBatterySmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBBattery instance.
static
SFBBatterySmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBBattery instance.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBBattery::GetBatteryChargerStatus
Querie the current battery charger status.
[ public ]
SFCError GetBatteryChargerStatus(
    AEEBatteryChargerStatus* batteryChargerStatus   // placeholder for battery charger status
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • Otherwize : Error code defined in AEEError.h

Reference

BREW API IBATTERY_GetBatteryChargerStatus


SFBBattery::GetBatteryLevel
Querie the current battery level.
[ public ]
SFCError GetBatteryLevel(
    UInt32Ptr data   // placeholder for battery level
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • Otherwize : Error code defined in AEEError.h

Description

Most significant 16 bits give battery level scale whereas least significant 16 bits will give battery level.

Reference

BREW API IBATTERY_GetBatteryLevel


SFBBattery::GetBatteryStatus
Querie the current battery status.
[ public ]
SFCError GetBatteryStatus(
    AEEBatteryStatus* batteryStatus   // placeholder for battery status
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • Otherwize : Error code defined in AEEError.h

Reference

BREW API IBATTERY_GetBatteryStatus


SFBBattery::NewInstance
Create a new SFBBattery instance.
[ public, static ]
SFBBatterySmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBBatterySmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBBattery::IsExternalPowerPresent
Querie if external power is present.
[ public ]
SFCError IsExternalPowerPresent(
    BoolPtr data   // placeholder for information about external power
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • Otherwize : Error code defined in AEEError.h

Reference

BREW API IBATTERY_IsExternalPowerPresent