Observer interface for clients to get notifications for profile related events.
More...
#include <src/api/mip/upe/policy_profile.h>
|
virtual void | OnAddEngineFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context) |
| Called when adding a new engine caused an error.
|
|
virtual void | OnAddEngineStarting (bool requiresPolicyFetch) |
| Called prior to engine creation to describe whether or not the engine's policy data must be fetched from the server or whether it can be created from locally cached data.
|
|
virtual void | OnAddEngineSuccess (const std::shared_ptr< PolicyEngine > &engine, const std::shared_ptr< void > &context) |
| Called when a new engine was added successfully.
|
|
virtual void | OnDeleteEngineFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context) |
| Called when deleting an engine caused an error.
|
|
virtual void | OnDeleteEngineSuccess (const std::shared_ptr< void > &context) |
| Called when an engine was deleted successfully.
|
|
virtual void | OnListEnginesFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context) |
| Called when listing engines caused an error.
|
|
virtual void | OnListEnginesSuccess (const std::vector< std::string > &engineIds, const std::shared_ptr< void > &context) |
| Called when list of engines was generated successfully.
|
|
virtual void | OnLoadFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context) |
| Called when loading a profile caused an error.
|
|
virtual void | OnLoadSuccess (const std::shared_ptr< PolicyProfile > &profile, const std::shared_ptr< void > &context) |
| Called when profile was loaded successfully.
|
|
virtual void | OnPolicyChanged (const std::string &engineId) |
| Called when the policy has changed for the engine with the given ID, Or when the loaded Custom Sensitivity Types have changed.
|
|
virtual void | OnUnloadEngineFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context) |
| Called when unloading an engine caused an error.
|
|
virtual void | OnUnloadEngineSuccess (const std::shared_ptr< void > &context) |
| Called when an engine was unloaded successfully.
|
|
Observer interface for clients to get notifications for profile related events.
- Note
- All errors inherit from mip::Error.
-
Client should not call the engine back on the thread that calls the observer.
Definition at line 65 of file policy_profile.h.
◆ OnAddEngineFailure()
virtual void PolicyProfile::Observer::OnAddEngineFailure |
( |
const std::exception_ptr & | error, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when adding a new engine caused an error.
- Parameters
-
error | the error that caused the add engine operation to fail. |
context | the context passed to the AddEngineAsync operation. |
Definition at line 152 of file policy_profile.h.
154 { UNUSED(error); UNUSED(context); }
◆ OnAddEngineStarting()
virtual void PolicyProfile::Observer::OnAddEngineStarting |
( |
bool | requiresPolicyFetch | ) |
|
|
inlinevirtual |
Called prior to engine creation to describe whether or not the engine's policy data must be fetched from the server or whether it can be created from locally cached data.
- Parameters
-
requiresPolicyFetch | Describes whether engine data must be fetched via HTTP or if it will be loaded from cache |
- Note
- This optional callback may be used by an application to be informed whether or not an AddEngineAsync operation will require an HTTP operation (with its associated delay) to complete.
Definition at line 144 of file policy_profile.h.
144{ UNUSED(requiresPolicyFetch); }
◆ OnAddEngineSuccess()
virtual void PolicyProfile::Observer::OnAddEngineSuccess |
( |
const std::shared_ptr< PolicyEngine > & | engine, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when a new engine was added successfully.
- Parameters
-
engine | the newly-added engine |
context | the context passed to the AddEngineAsync operation |
Definition at line 131 of file policy_profile.h.
133 { UNUSED(engine); UNUSED(context); }
◆ OnDeleteEngineFailure()
virtual void PolicyProfile::Observer::OnDeleteEngineFailure |
( |
const std::exception_ptr & | error, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when deleting an engine caused an error.
- Parameters
-
error | the error that caused the delete engine operation to fail. |
context | the context passed to the DeleteEngineAsync operation. |
Definition at line 169 of file policy_profile.h.
171 { UNUSED(error); UNUSED(context); }
◆ OnDeleteEngineSuccess()
virtual void PolicyProfile::Observer::OnDeleteEngineSuccess |
( |
const std::shared_ptr< void > & | context | ) |
|
|
inlinevirtual |
Called when an engine was deleted successfully.
- Parameters
-
context | the context passed to the DeleteEngineAsync operation. |
Definition at line 161 of file policy_profile.h.
◆ OnListEnginesFailure()
virtual void PolicyProfile::Observer::OnListEnginesFailure |
( |
const std::exception_ptr & | error, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when listing engines caused an error.
- Parameters
-
error | the error that caused the list engine operation to fail. |
context | the context passed to the ListEnginesAsync operation. |
Definition at line 104 of file policy_profile.h.
106 { UNUSED(error); UNUSED(context); }
◆ OnListEnginesSuccess()
virtual void PolicyProfile::Observer::OnListEnginesSuccess |
( |
const std::vector< std::string > & | engineIds, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when list of engines was generated successfully.
- Parameters
-
engineIds | a list of engine IDs the are available. |
context | the context passed to the ListEnginesAsync operation. |
Definition at line 94 of file policy_profile.h.
96 { UNUSED(engineIds); UNUSED(context); }
◆ OnLoadFailure()
virtual void PolicyProfile::Observer::OnLoadFailure |
( |
const std::exception_ptr & | error, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when loading a profile caused an error.
- Parameters
-
error | the error that caused the load operation to fail. |
context | the context passed to the LoadAsync operation. |
Definition at line 84 of file policy_profile.h.
86 { UNUSED(error); UNUSED(context); }
◆ OnLoadSuccess()
virtual void PolicyProfile::Observer::OnLoadSuccess |
( |
const std::shared_ptr< PolicyProfile > & | profile, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when profile was loaded successfully.
- Parameters
-
profile | the current profile used to start the operation. |
context | the context passed to the LoadAsync operation. |
Definition at line 74 of file policy_profile.h.
76 { UNUSED(profile); UNUSED(context); }
◆ OnPolicyChanged()
virtual void PolicyProfile::Observer::OnPolicyChanged |
( |
const std::string & | engineId | ) |
|
|
inlinevirtual |
Called when the policy has changed for the engine with the given ID, Or when the loaded Custom Sensitivity Types have changed.
- Parameters
-
- Note
- To load the new policy it is necessary to call AddEngineAsync again with the engine ID given.
Definition at line 180 of file policy_profile.h.
◆ OnUnloadEngineFailure()
virtual void PolicyProfile::Observer::OnUnloadEngineFailure |
( |
const std::exception_ptr & | error, |
|
|
const std::shared_ptr< void > & | context ) |
|
inlinevirtual |
Called when unloading an engine caused an error.
- Parameters
-
error | the error that caused the unload engine operation to fail. |
context | the context passed to the UnloadEngineAsync operation. |
Definition at line 121 of file policy_profile.h.
123 { UNUSED(error); UNUSED(context); }
◆ OnUnloadEngineSuccess()
virtual void PolicyProfile::Observer::OnUnloadEngineSuccess |
( |
const std::shared_ptr< void > & | context | ) |
|
|
inlinevirtual |
Called when an engine was unloaded successfully.
- Parameters
-
context | the context passed to the UnloadEngineAsync operation. |
Definition at line 113 of file policy_profile.h.
The documentation for this class was generated from the following file: