PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBRegistry
Wrapper Class for the IRegistry interface.
#include <SFBRegistry.h.hpp>
class SFBRegistry : public SFBBase;
SFMTYPEDEFWRAPPER(SFBRegistry)

Inheritance diagram

 Inheritance diagram of SFBRegistryClass

Version

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

Reference

BREW API IRegistry

Member

Public Functions
Void Enum( PFNREGENUM notify , VoidPtr data , Bool all )
This function is used to enumerate the registry.
AEECLSID GetHandler( AEECLSID clsType , ACharConstPtr mime )
This function retrieves the currently active registered handler for the base class and mime type.
AEECLSID GetHandler( AEECLSID clsType , SFXAnsiStringConstRef mime )
This function retrieves the currently active registered handler for the base class and mime type.
static
SFBRegistrySmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBRegistry instance.
static
SFBRegistrySmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBRegistry instance.
SFCError SetHandler( AEECLSID clsType , ACharConstPtr mime , AEECLSID clsid )
This function is used register a handler for the mime type and base class. If successfull the hanlder becomes the active handler.
SFCError SetHandler( AEECLSID clsType , SFXAnsiStringConstRef mime , AEECLSID clsid )
This function is used register a handler for the mime type and base class. If successfull the hanlder becomes the active handler.
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.

SFBRegistry::Enum
This function is used to enumerate the registry.
[ public ]
Void Enum(
    PFNREGENUM notify   // Callback function to be called for each item.
    VoidPtr data        // User context pointer for the callback function. 
    Bool all            // If FALSE only the active handlers are enumerated. If TRUE active handlers plus all the handlers present in MIFs.
);

Description

This is a synchronous function, which returns when the enumeration is over. The enumeration is stopped when all the elements have been enumerated or PFNREGENUM returns FALSE.

Reference

BREW API IREGISTRY_Enum


SFBRegistry::GetHandler
This function retrieves the currently active registered handler for the base class and mime type.
[ public ]
AEECLSID GetHandler(
    AEECLSID clsType     // Base class or interface for the registered handler 
    ACharConstPtr mime   // Mime type to be queried. 
);
[ public ]
AEECLSID GetHandler(
    AEECLSID clsType             // Base class or interface for the registered handler 
    SFXAnsiStringConstRef mime   // Mime type to be queried. 
);

Return value

AEECLSID: Class id of the registered handler, or 0 if no registered handler is found for that mime type and base class.

Reference

BREW API IREGISTRY_GetHandler


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

SFBRegistry::SetHandler
This function is used register a handler for the mime type and base class. If successfull the hanlder becomes the active handler.
[ public ]
SFCError SetHandler(
    AEECLSID clsType     // Base class or interface for the handler
    ACharConstPtr mime   // Mime type to be queried
    AEECLSID clsid       // The class id of the handler to be registered
);
[ public ]
SFCError SetHandler(
    AEECLSID clsType             // Base class or interface for the handler
    SFXAnsiStringConstRef mime   // Mime type to be queried
    AEECLSID clsid               // The class id of the handler to be registered
);

Return value

  • SUCCESS: If the handler was registered successfully.
  • EFAILED: If unsuccessful.
  • EPRIVLEVEL: If the application does not have the priviliges to set this handler.
  • EBADCLASS: If the class is unsupported.
  • EALREADY: If the class is already registered and active.

Reference

BREW API IREGISTRY_SetHandler