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

Inheritance diagram

 Inheritance diagram of SFBPrivSetClass

Version

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

Reference

BREW API IPrivSet

Member

Public Functions
SFCError CheckPrivilege( AEEPRIVID priv )
Tests whether a privilege is included in the privilege set.
SFCError CreateSubset( AEEPRIVID const * aprivSubset , SInt32 nNumPrivs , SFBPrivSetSmpPtr subset )
Creates a new object that consists of a subset of the privileges in this set.
SFCError GetPrivileges( AEEPRIVID * apriv , SInt32Ptr pnNumPrivs )
Gets an array of IDs for the privileges in this set.
static
SFBPrivSetSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBPrivSet instance.
static
SFBPrivSetSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBPrivSet 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.

SFBPrivSet::CheckPrivilege
Tests whether a privilege is included in the privilege set.
[ public ]
SFCError CheckPrivilege(
    AEEPRIVID priv   // the privilege to check
);

Return value

  • AEE_SUCCESS if privilege is in the set.
  • AEE_EPRIVLEVEL if privilege not present in this set.
  • Other more specific error : if operation fails

Reference

BREW API IPrivSet_CheckPrivilege


SFBPrivSet::CreateSubset
Creates a new object that consists of a subset of the privileges in this set.
[ public ]
SFCError CreateSubset(
    AEEPRIVID const * aprivSubset   // array of privileges to use to create the new IPrivSet 
    SInt32 nNumPrivs                // number of privileges in aprivSubset
    SFBPrivSetSmpPtr subset         // pointer to be filled with new IPrivSet instance 
);

Return value

  • AEE_SUCCESS if privilege granted.
  • AEE_EPRIVLEVEL if a privilege given not present in this instance.
  • Other more specific error : if operation fails.

Description

Each privilege in aprivSubset must be contained by the given IPrivSet, i.e., IPrivSet_CheckPrivilege() must succeed for each privilege given.

Reference

BREW API IPrivSet_CreateSubset


SFBPrivSet::GetPrivileges
Gets an array of IDs for the privileges in this set.
[ public ]
SFCError GetPrivileges(
    AEEPRIVID * apriv      // array of IDs to be filled 
    SInt32Ptr pnNumPrivs   // on input, is the size of apriv, in privileges, on output, contains the number of privileges held by this set
);

Return value

  • AEE_SUCCESS : if all goes well.
  • Other more specific error : if operation fails

Reference

BREW API IPrivSet_GetPrivileges


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