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

Inheritance diagram

 Inheritance diagram of SFBResourceCtlClass

Version

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

Reference

BREW API IResourceCtl

Member

Public Functions
SFCError Acquire( UInt32 reason , UInt32Ptr status )
Acquire control of the resource.
UInt32 Acquire( UInt32 reason )
Acquire control of the resource.
SFCError CanAcquire( UInt32 reason , UInt32Ptr status )
Query whether the caller may acquire control of the resource.
UInt32 CanAcquire( UInt32 reason )
Query whether the caller may acquire control of the resource.
SFCError Free( UInt32Ptr status )
Release the resource.
UInt32 Free( Void )
Release the resource.
UInt32 GetStatus( UInt32Ptr status )
Return the current ownership status of the resource.
UInt32 GetStatus( Void )
Return the current ownership status of the resource.
SFCError OnStatusChangeNotify( UInt32 statusMask , SFXCallbackPtr callback )
Allow the caller to receive a callback when the status of the resource changes.
SFCError SetRelinquishCtl( AEECLSID* clsidList , SInt32 count )
Allow the caller to define a list of class Ids, group ids and/or RESCTL_REASONs for releasing the resource to another requestor.
SFCError SetRelinquishCtlAll( Void )
Set the relinquish control list to allow any requestor to acquire the resource.
SFCError SetRelinquishCtlNone( Void )
Set the relinquish control list to prohibit any requestor from acquiring the resource.
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.

SFBResourceCtl::Acquire
Acquire control of the resource.
[ public ]
SFCError Acquire(
    UInt32 reason      // reason for requesting/holding resource
    UInt32Ptr status   // current RESCTL_STATUS of the resource
);
[ public ]
UInt32 Acquire(
    UInt32 reason   // reason for requesting/holding resource
);

Return value

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

Reference

BREW API IRESOURCECTL_Acquire | SFBResourceCtl::Free


SFBResourceCtl::CanAcquire
Query whether the caller may acquire control of the resource.
[ public ]
SFCError CanAcquire(
    UInt32 reason      // reason for requesting/holding resource
    UInt32Ptr status   // current RESCTL_STATUS of the resource
);
[ public ]
UInt32 CanAcquire(
    UInt32 reason   // reason for requesting/holding resource
);

Return value

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

Reference

BREW API IQOSFLOW_CanAcquire | SFBResourceCtl::Free


SFBResourceCtl::Free
Release the resource.
[ public ]
SFCError Free(
    UInt32Ptr status   // current RESCTL_STATUS of the resource
);
[ public ]
UInt32 Free(Void);

Return value

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

Reference

BREW API IRESOURCECTL_Free | SFBResourceCtl::Acquire


SFBResourceCtl::GetStatus
Return the current ownership status of the resource.
[ public ]
UInt32 GetStatus(
    UInt32Ptr status   // pointer to the last RESCTL_REASON_XXX that specified by SFBResourceCtl::Acquire() or SFBResourceCtl::CanAcquire()
);
[ public ]
UInt32 GetStatus(Void);

Return value

Return the current RESCTL_STATUS of resource.

Reference

BREW API IRESOURCECTL_GetStatus | SFBResourceCtl::Acquire | SFBResourceCtl::CanAcquire


SFBResourceCtl::OnStatusChangeNotify
Allow the caller to receive a callback when the status of the resource changes.
[ public ]
SFCError OnStatusChangeNotify(
    UInt32 statusMask         // RESCTL_STATUS mask
    SFXCallbackPtr callback   // pointer to SFXCallback
);

Return value

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

Description

The caller must re-register on each callback to continue receiving notifications.

Reference

BREW API IRESOURCECTL_OnStatusChangeNotify


SFBResourceCtl::SetRelinquishCtl
Allow the caller to define a list of class Ids, group ids and/or RESCTL_REASONs for releasing the resource to another requestor.
[ public ]
SFCError SetRelinquishCtl(
    AEECLSID* clsidList   // pointer to class/privilege/reason list
    SInt32 count          // number of the elements on the clsidList
);

Return value

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

Reference

BREW API IRESOURCECTL_SetRelinquishCtl | SFBResourceCtl::Acquire | SFBResourceCtl::SetRelinquishCtlAll | SFBResourceCtl::SetRelinquishCtlNone


SFBResourceCtl::SetRelinquishCtlAll
Set the relinquish control list to allow any requestor to acquire the resource.
[ public ]
SFCError SetRelinquishCtlAll(Void);

Return value

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

Reference

BREW API IRESOURCECTL_SetRelinquishCtlAll | SFBResourceCtl::Acquire | SFBResourceCtl::SetRelinquishCtl


SFBResourceCtl::SetRelinquishCtlNone
Set the relinquish control list to prohibit any requestor from acquiring the resource.
[ public ]
SFCError SetRelinquishCtlNone(Void);

Return value

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

Reference

BREW API IRESOURCECTL_SetRelinquishCtlNone | SFBResourceCtl::Acquire | SFBResourceCtl::SetRelinquishCtl