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

Inheritance diagram

 Inheritance diagram of SFBAppletCtlClass

Version

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

Reference

BREW API IAppletCtl

Member

Public Functions
SFCError BrowseFile( ACharConstPtr file , UInt32 reason )
Start the applet associated with the file type specified (by extension).
SFCError BrowseFile( SFXAnsiStringConstRef file , UInt32 reason )
Start the applet associated with the file type specified (by extension).
SFCError BrowseURL( ACharConstPtr url , UInt32 reason )
Start the applet associated with the URL scheme specified.
SFCError BrowseURL( SFXAnsiStringConstRef url , UInt32 reason )
Start the applet associated with the URL scheme specified.
SFCError CanStart( AEECLSID clsid , VoidPtr buf , SInt32Ptr size )
Determine if the specified applet can start, given the start information.
SFCError CanStart( AEECLSID clsid , SFXBufferPtr buf )
Determine if the specified applet can start, given the start information.
SFCError Control( AEECLSID clsid , SInt32 operation , VoidPtr buf , SInt32Ptr size )
Control the applets.
SFCError Control( AEECLSID clsid , SInt32 operation , SFXBufferPtr buf )
Control the applets.
SFCError GetRunningInfo( AEECLSID clsid , AEEAppItem item , VoidPtr buf , SInt32Ptr size )
Get specific information about one of the currently running applications.
SFCError GetRunningInfo( AEECLSID clsid , AEEAppItem item , SFXBufferPtr buf )
Get specific information about one of the currently running applications.
SFCError GetRunningList( VoidPtr buf , SInt32Ptr size )
Get the list of cass id of the applet running currently.
SFCError GetRunningList( SFXBufferPtr buf )
Get the list of cass id of the applet running currently.
static
SFBAppletCtlSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBAppletCtl instance.
static
SFBAppletCtlSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBAppletCtl instance.
SFCError Start( AEECLSID clsid , VoidPtr buf , SInt32Ptr size )
Start the specified applet class.
SFCError Start( AEECLSID clsid , SFXBufferPtr buf )
Start the specified applet class.
SFCError Stop( AEECLSID clsid )
Stop a currently running applet.
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.

SFBAppletCtl::BrowseFile
Start the applet associated with the file type specified (by extension).
[ public ]
SFCError BrowseFile(
    ACharConstPtr file   // file name
    UInt32 reason        // start reason for the app
);
[ public ]
SFCError BrowseFile(
    SFXAnsiStringConstRef file   // file name
    UInt32 reason                // start reason for the app
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY
  • file does not contain the extension name: SFERR_INVALID_PARAM
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • Applet is expried : EEXPIRED
  • If no privilege : EPRIVLEVEL
  • Applet is unvailable : EFILENOEXISTS
  • OEM or current app won't allow loading this applet : EUNABLETOLOAD
  • Current top visible application will not release control : EITEMBUSY
  • file is null : EBADCLASS
  • No handler for the file extension name : ESCHEMENOTSUPPORTED

Description

The applet will be started and will receive the EVT_BROWSE_FILE event.

Reference

BREW API IAPPLETCTL_BrowseFile | SFBShell::BrowseFile | SFBShell::BrowseURL | SFBAppletCtl::BrowseURL | SFBAppletCtl::Start | SFBAppletCtl::Stop


SFBAppletCtl::BrowseURL
Start the applet associated with the URL scheme specified.
[ public ]
SFCError BrowseURL(
    ACharConstPtr url   // pointer to the URL to be used for starting the app
    UInt32 reason       // start reason for the app
);
[ public ]
SFCError BrowseURL(
    SFXAnsiStringConstRef url   // pointer to the URL to be used for starting the app
    UInt32 reason               // start reason for the app
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • Applet is expried : EEXPIRED
  • If no privilege : EPRIVLEVEL
  • Applet is unvailable : EFILENOEXISTS
  • OEM or current app won't allow loading this applet : EUNABLETOLOAD
  • Current top visible application will not release control : EITEMBUSY
  • url is null : EBADCLASS
  • No handler for this URL scheme : ESCHEMENOTSUPPORTED

Description

The applet will be started and will receive the EVT_BROWSE_URL event.

Reference

BREW API IAPPLETCTL_BrowseURL | SFBShell::BrowseFile | SFBShell::BrowseURL | SFBAppletCtl::BrowseFile | SFBAppletCtl::Start | SFBAppletCtl::Stop


SFBAppletCtl::CanStart
Determine if the specified applet can start, given the start information.
[ public ]
SFCError CanStart(
    AEECLSID clsid   // class id of an applet
    VoidPtr buf      // valid Pointer to a structure of type AppStartInfo
    SInt32Ptr size   // size of buf in byte
);
[ public ]
SFCError CanStart(
    AEECLSID clsid     // class id of an applet
    SFXBufferPtr buf   // valid Pointer to a structure of type AppStartInfo
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • Applet is expried : EEXPIRED
  • Applet is unvailable : EFILENOEXISTS
  • OEM or current app won't allow loading this applet : EUNABLETOLOAD
  • Current top visible application will not release control : EITEMBUSY
  • Current application won't allow app to start : EITEMBUSY
  • url is null : EBADCLASS

Description

If the applet being started is the screen saver app (SSA_SSAVER flag is set) the top visible app will be sent EVT_APP_NO_CLOSE(EVT_BUSY) event.

Reference

BREW API IAPPLETCTL_CanStart | SFBShell::StartApplet


SFBAppletCtl::Control
Control the applets.
[ public ]
SFCError Control(
    AEECLSID clsid     // class id of an applet
    SInt32 operation   // specifies the operation to perform on the specified applet class
    VoidPtr buf        // points to the corresponding information on return
    SInt32Ptr size     // size of buf in byte
);
[ public ]
SFCError Control(
    AEECLSID clsid     // class id of an applet
    SInt32 operation   // specifies the operation to perform on the specified applet class
    SFXBufferPtr buf   // points to the corresponding information on return
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL
  • Applet is expried : EEXPIRED
  • Applet is unvailable : EFILENOEXISTS
  • OEM or current app won't allow loading this applet : EUNABLETOLOAD
  • OEM code won't allow application to start : ENOTALLOWED
  • Current top visible application will not release control : EITEMBUSY
  • The specified cls is now running or the loading is not completed yet : EBADCLASS

Reference

BREW API IAPPLETCTL_Control | SFBShell::StartApplet | SFBAppletCtl::Start | SFBAppletCtl::Stop


SFBAppletCtl::GetRunningInfo
Get specific information about one of the currently running applications.
[ public ]
SFCError GetRunningInfo(
    AEECLSID clsid    // class id of a currently running applet.
    AEEAppItem item   // specifies the Item whose info is needed
    VoidPtr buf       // contains the corresponding information on return
    SInt32Ptr size    // size of buf in byte
);
[ public ]
SFCError GetRunningInfo(
    AEECLSID clsid     // class id of a currently running applet.
    AEEAppItem item    // specifies the Item whose info is needed
    SFXBufferPtr buf   // contains the corresponding information on return
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • The specified cls is now running or the loading is not completed yet : EBADCLASS

Reference

BREW API IAPPLETCTL_GetRunningInfo | SFBAppletCtl::GetRunningList | SFBShell::EnumNextApplet


SFBAppletCtl::GetRunningList
Get the list of cass id of the applet running currently.
[ public ]
SFCError GetRunningList(
    VoidPtr buf      // contains the list of cass id of the applet running currently
    SInt32Ptr size   // size of buf in byte
);
[ public ]
SFCError GetRunningList(
    SFXBufferPtr buf   // contains the list of cass id of the applet running currently
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED

Reference

BREW API IAPPLETCTL_GetRunningList | SFBAppletCtl::GetRunningInfo


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

SFBAppletCtl::Start
Start the specified applet class.
[ public ]
SFCError Start(
    AEECLSID clsid   // class id of the applet to start
    VoidPtr buf      // valid Pointer to a structure of type AppStartInfo
    SInt32Ptr size   // size of buf in byte
);
[ public ]
SFCError Start(
    AEECLSID clsid     // class id of the applet to start
    SFXBufferPtr buf   // valid Pointer to a structure of type AppStartInfo
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • Not supported: SFERR_UNSUPPORTED
  • If failed: SFERR_FAILED
  • Shell class supplied invalid : EBADCLASS
  • Applet has expired : EEXPIRED
  • If no privilege : EPRIVLEVEL
  • Applet is unvailable : EFILENOEXISTS
  • OEM or current app won't allow loading this applet : EUNABLETOLOAD
  • OEM code won't allow application to start : ENOTALLOWED
  • Current top visible application will not release control : EITEMBUSY

Reference

BREW API IAPPLETCTL_Start | SFBShell::StartApplet


SFBAppletCtl::Stop
Stop a currently running applet.
[ public ]
SFCError Stop(
    AEECLSID clsid   // class id of a currently running applet
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If no privilege : EPRIVLEVEL
  • The specified cls is not the applet running currently : EPRIVLEVEL

Reference

BREW API IAPPLETCTL_Stop | SFBShell::StartApplet | SFBAppletCtl::Start