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

Inheritance diagram

 Inheritance diagram of SFBAppHistoryClass

Version

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

Reference

BREW API IAppHistory

Member

Public Functions
SFCError Back( Void )
Move the SFBAppHistory to the previous history entry in the history list/
SFCError Current( SInt32Ptr idx )
Find out where in the history list this instance of SFBAppHistory points.
SFCError Forward( Void )
Move the SFBAppHistory to the next history entry in the history list.
SFCError GetArgs( ACharPtr dest , SInt32Ptr size )
Retrieve the startup argument string for the history entry.
SFCError GetArgs( SFXAnsiStringPtr dest )
Retrieve the startup argument string for the history entry.
SFCError GetClass( AEECLSID* clsid )
Retrieve the AEECLSID of the app history entry the SFBAppHistory is pointed to.
AEECLSID GetClass( Void )
Retrieve the AEECLSID of the app history entry the SFBAppHistory is pointed to.
SFCError GetData( ACharConstPtr name , VoidPtr buf , SInt32Ptr size )
Retrieve history context sensitive data associated with the specified input name stored in previous calls to SFBAppHistory::SetData.
SFCError GetData( SFXAnsiStringConstRef name , SFXBufferPtr buf )
Retrieve history context sensitive data associated with the specified input name stored in previous calls to SFBAppHistory::SetData.
SFCError GetReason( UInt32Ptr reason )
Get the start-reason associated with this history entry.
SFCError GetResumeData( VoidPtr buf , SInt32Ptr size )
A macro call to SFBAppHistory::GetData with no name (NULL) associated with the data.
SFCError GetResumeData( SFXBufferPtr buf )
A macro call to SFBAppHistory::GetData with no name (NULL) associated with the data.
SFCError Insert( AEECLSID clsid , ACharConstPtr args )
Insert a new history entry immediately "Back" of the current entry.
SFCError Insert( AEECLSID clsid , SFXAnsiStringConstRef args )
Insert a new history entry immediately "Back" of the current entry.
SFCError Move( SInt32 idx )
Move a history entry to a new position.
static
SFBAppHistorySmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBAppHistory instance.
static
SFBAppHistorySmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBAppHistory instance.
SFCError Remove( Void )
Remove the current entry from the app history list.
SFCError SetData( ACharConstPtr name , VoidPtr buf , SInt32 size )
Store history context sensitive data associated with the input name.
SFCError SetData( SFXAnsiStringConstRef name , SFXBufferPtr buf )
Store history context sensitive data associated with the input name.
SFCError SetReason( UInt32 reason )
Set the start-reason associated with this history entry.
SFCError SetResumeData( VoidPtr buf , SInt32 size )
A macro call to ,SFBAppHistory::SetData with no name (null) associated with the data.
SFCError SetResumeData( SFXBufferPtr buf )
A macro call to ,SFBAppHistory::SetData with no name (null) associated with the data.
SFCError Top( Void )
Resets the SFBAppHistory to point to the top-visible entry.
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.

SFBAppHistory::Back
Move the SFBAppHistory to the previous history entry in the history list/
[ public ]
SFCError Back(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • No previous history entry exists : ENOSUCH
  • Current item was removed by another user : EINVALIDITEM

Reference

BREW API IAppHistory_Back | SFBAppHistory::Forward


SFBAppHistory::Current
Find out where in the history list this instance of SFBAppHistory points.
[ public ]
SFCError Current(
    SInt32Ptr idx   // filled with the distance from the top-visible app, if the entry has been unlinked, pnIdx is set to -1
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED

Reference

BREW API IAppHistory_Current | SFBAppHistory::Top


SFBAppHistory::Forward
Move the SFBAppHistory to the next history entry in the history list.
[ public ]
SFCError Forward(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • No next history entry exists : ENOSUCH
  • Current item was removed by another user : EINVALIDITEM

Reference

BREW API IAppHistory_Forward | SFBAppHistory::Back


SFBAppHistory::GetArgs
Retrieve the startup argument string for the history entry.
[ public ]
SFCError GetArgs(
    ACharPtr dest    // buffer to fill 
    SInt32Ptr size   // on input, pointer to integer of size in bytes of the buffer, on output, size of pBuffer necessary to hold the arguments 
);
[ public ]
SFCError GetArgs(
    SFXAnsiStringPtr dest   // buffer to fill
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • dest is null: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED

Reference

BREW API IAppHistory_GetArgs


SFBAppHistory::GetClass
Retrieve the AEECLSID of the app history entry the SFBAppHistory is pointed to.
[ public ]
SFCError GetClass(
    AEECLSID* clsid   // pointer to an AEECLSID to be filled with the current entry's class id 
);
[ public ]
AEECLSID GetClass(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED

Reference

BREW API IAppHistory_GetClass


SFBAppHistory::GetData
Retrieve history context sensitive data associated with the specified input name stored in previous calls to SFBAppHistory::SetData.
[ public ]
SFCError GetData(
    ACharConstPtr name   // name associated with the data
    VoidPtr buf          // buffer to fill
    SInt32Ptr size       // on input, pointer to integer of size in bytes of the buffer, on output, size of pBuffer necessary to hold the resume data
);
[ public ]
SFCError GetData(
    SFXAnsiStringConstRef name   // name associated with the data
    SFXBufferPtr buf             // buffer to fill
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • buf is null: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Description

Calling this function with null for the buf will fill size with the size of the buffer.

Reference

BREW API IAppHistory_GetData | SFBAppHistory::SetResumeData | SFBAppHistory::SetData


SFBAppHistory::GetReason
Get the start-reason associated with this history entry.
[ public ]
SFCError GetReason(
    UInt32Ptr reason   // buffer to fill with reason code on return 
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • reason is null: SFERR_INVALID_PARAM
  • If no privilege : EPRIVLEVEL

Reference

BREW API IAppHistory_GetReason | SFBAppHistory::SetReason


SFBAppHistory::GetResumeData
A macro call to SFBAppHistory::GetData with no name (NULL) associated with the data.
[ public ]
SFCError GetResumeData(
    VoidPtr buf      // buffer to fill
    SInt32Ptr size   // on input, pointer to integer of size in bytes of the buffer, on output, size of pBuffer necessary to hold the resume data 
);
[ public ]
SFCError GetResumeData(
    SFXBufferPtr buf   // buffer to fill
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • buf is null: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Reference

BREW API IAppHistory_GetResumeData | SFBAppHistory::GetData |


SFBAppHistory::Insert
Insert a new history entry immediately "Back" of the current entry.
[ public ]
SFCError Insert(
    AEECLSID clsid       //AEECLSID of the requested application
    ACharConstPtr args   // pointer to startup arguments
);
[ public ]
SFCError Insert(
    AEECLSID clsid               // AEECLSID of the requested application
    SFXAnsiStringConstRef args   // pointer to startup arguments
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Description

To insert an entry, the caller must either be an instance of cls or have PL_SYSTEM.

Reference

BREW API IAppHistory_Insert | SFBAppHistory::SetResumeData | SFBAppHistory::SetData


SFBAppHistory::Move
Move a history entry to a new position.
[ public ]
SFCError Move(
    SInt32 idx   // position where this entry needs to be moved to
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL
  • The value specified by the index is larger than the size of current SFBAppHistory : ENOSUCH

Reference

BREW API IAppHistory_Move | SFBAppHistory::Insert | SFBAppHistory::Remove | SFBAppHistory::Current


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

SFBAppHistory::Remove
Remove the current entry from the app history list.
[ public ]
SFCError Remove(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL
  • Item is already deleted : EALREADY

Reference

BREW API IAppHistory_Remove | SFBAppHistory::Top |


SFBAppHistory::SetData
Store history context sensitive data associated with the input name.
[ public ]
SFCError SetData(
    ACharConstPtr name   // name associated with the data
    VoidPtr buf          // buffer to copy
    SInt32 size          // size in bytes of the data
);
[ public ]
SFCError SetData(
    SFXAnsiStringConstRef name   // name associated with the data
    SFXBufferPtr buf             // buffer to copy
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Reference

BREW API IAppHistory_SetData | SFBAppHistory::GetResumeData | SFBAppHistory::GetData


SFBAppHistory::SetReason
Set the start-reason associated with this history entry.
[ public ]
SFCError SetReason(
    UInt32 reason   // reason code
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Reference

BREW API IAppHistory_SetReason | SFBAppHistory::GetReason


SFBAppHistory::SetResumeData
A macro call to ,SFBAppHistory::SetData with no name (null) associated with the data.
[ public ]
SFCError SetResumeData(
    VoidPtr buf   // buffer to copy
    SInt32 size   // size in bytes of the data
);
[ public ]
SFCError SetResumeData(
    SFXBufferPtr buf   // buffer to copy
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED
  • If no privilege : EPRIVLEVEL

Reference

BREW API IAppHistory_SetResumeData | SFBAppHistory::SetData |


SFBAppHistory::Top
Resets the SFBAppHistory to point to the top-visible entry.
[ public ]
SFCError Top(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED

Reference

BREW API IAppHistory_Top | SFBAppHistory::Forward | SFBAppHistory::Back