struct CCL::ISafetyManager

Overview

#include <isafetymanager.h>

struct ISafetyManager: public CCL::IUnknown
{
    // enums

    enum Features;

    // methods

    virtual void CCL_API setSafetyOptions (int features) = 0;
    virtual void CCL_API setValue (CStringRef safetyOptionId, tbool state) = 0;
    virtual tbool CCL_API getValue (CStringRef safetyOptionId) const = 0;
    virtual tresult CCL_API addFilter (IObjectFilter* filter) = 0;
    virtual int CCL_API countFilters () const = 0;
    virtual const IObjectFilter*CCL_API getFilter (int index) const = 0;
    virtual const IObjectFilter&CCL_API getCombinedFilter () const = 0;
    virtual void CCL_API registerAction (CStringRef actionId, StringRef title) = 0;

    virtual void CCL_API beginAction (
        CStringRef actionId,
        const String arguments [],
        int argumentCount
    ) = 0;

    virtual void CCL_API endAction () = 0;
    virtual ICrashReport*CCL_API detectCrash () = 0;
    virtual tresult CCL_API checkStability () = 0;

    virtual void CCL_API reportException (
        void* exceptionInformation,
        const uchar* systemDumpFile
    ) = 0;

    virtual tbool CCL_API handleException () = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

Methods

virtual void CCL_API setValue (CStringRef safetyOptionId, tbool state) = 0

Set the value of a safety option.

virtual tbool CCL_API getValue (CStringRef safetyOptionId) const = 0

Get the current value of a safety option.

virtual tresult CCL_API addFilter (IObjectFilter* filter) = 0

Add an object filter which can be used to filter unsafe objects.

Takes ownership.

virtual int CCL_API countFilters () const = 0

Get the number of object filters.

virtual const IObjectFilter*CCL_API getFilter (int index) const = 0

Get the object filter at given index.

virtual const IObjectFilter&CCL_API getCombinedFilter () const = 0

Get a combined filter which matches if any of the safety manager’s filters matches.

virtual void CCL_API registerAction (CStringRef actionId, StringRef title) = 0

Register an action context id with a localized title.

virtual void CCL_API beginAction (
    CStringRef actionId,
    const String arguments [],
    int argumentCount
) = 0

Register the begin of an action.

virtual void CCL_API endAction () = 0

End a previously registered action.

virtual ICrashReport*CCL_API detectCrash () = 0

Check if the application crashed the last time it ran.

virtual tresult CCL_API checkStability () = 0

Check for unexpected behavior in the current process.

To be called periodically.

virtual void CCL_API reportException (
    void* exceptionInformation,
    const uchar* systemDumpFile
) = 0

Report an exception.

virtual tbool CCL_API handleException () = 0

Handle an exception.

Call in a catch block.