olp-cpp-sdk  1.22.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
olp::context::Context Class Reference

Used only for the Android environment to correctly initialize the NetworkAndroid class. More...

#include <Context.h>

Classes

class  Scope
 Initializes the Context class in its constructor (if it is not already initialized) and deinitializes in its destructor (if there are no other Scope instances). More...
 

Public Types

using InitializedCallback = std::function< void()>
 Called when the Context object is initialized. More...
 
using DeinitializedCallback = std::function< void()>
 Called when the Context object is deinitialized. More...
 

Public Member Functions

 Context ()=delete
 The deleted default constructor.
 

Static Public Member Functions

static void addInitializeCallbacks (InitializedCallback initCallback, DeinitializedCallback deinitCalback)
 Registers functions that are called when the context is initialized and destroyed. More...
 

Friends

class Context::Scope
 

Detailed Description

Used only for the Android environment to correctly initialize the NetworkAndroid class.

Initialize the Context class before you send network requests in the Android environment. To use the Context class, cerate the Scope object first.

Member Typedef Documentation

◆ DeinitializedCallback

using olp::context::Context::DeinitializedCallback = std::function<void()>

Called when the Context object is deinitialized.

Controlled by the Scope class.

See also
Scope for more information.

◆ InitializedCallback

using olp::context::Context::InitializedCallback = std::function<void()>

Called when the Context object is initialized.

Controlled by the Scope class.

See also
Scope for more information.

Member Function Documentation

◆ addInitializeCallbacks()

static void olp::context::Context::addInitializeCallbacks ( InitializedCallback  initCallback,
DeinitializedCallback  deinitCalback 
)
static

Registers functions that are called when the context is initialized and destroyed.

Parameters
initCallbackThe InitializedCallback instance.
deinitCalbackThe DeinitializedCallback instance.

The documentation for this class was generated from the following file: