lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Loading...
Searching...
No Matches
lime::callbackUserData Struct Reference

structure holding user data while waiting for callback from X3DH server response processing More...

#include <lime_impl.hpp>

Public Member Functions

 callbackUserData (std::weak_ptr< LimeGeneric > thiz, const std::shared_ptr< limeCallback > callback, uint16_t OPkInitialBatchSize=lime::settings::OPk_initialBatchSize)
 created at user create/delete and keys Post. EncryptionPolicy is not used, set it to the default value anyway
 callbackUserData (std::weak_ptr< LimeGeneric > thiz, const std::shared_ptr< limeCallback > callback, uint16_t OPkServerLowLimit, uint16_t OPkBatchSize)
 created at update: getSelfOPks. EncryptionPolicy is not used, set it to the default value anyway
 callbackUserData (std::weak_ptr< LimeGeneric > thiz, const std::shared_ptr< limeCallback > callback, const std::shared_ptr< limeRandomSeedCallback > randomSeedCallback, std::shared_ptr< lime::EncryptionContext > encryptionContext)
 created at encrypt(getPeerBundle)
 callbackUserData (callbackUserData &a)=delete
 do not copy callback data, force passing the pointer around after creation
callbackUserData operator= (callbackUserData &a)=delete
 do not copy callback data, force passing the pointer around after creation

Public Attributes

std::weak_ptr< LimeGeneric > limeObj
 limeObj is owned by the LimeManager, it shall no be destructed, do not own this with a shared_ptr as Lime obj may own the callbackUserData obj thus creating circular reference
const std::shared_ptr< limeCallback > callback
 this is a ptr to a lambda, we may use it several time so we can manage precisely its timelife
const std::shared_ptr< limeRandomSeedCallback > randomSeedCallback
 this is a ptr to a lambda, we may use it several time so we can manage precisely its timelife
std::shared_ptr< lime::EncryptionContext > encryptionContext
 Encryption context :AD, plain and cipher text, encryption policy and recipients.
uint16_t OPkServerLowLimit
 Used when fetching from server self OPk to check if we shall upload more.
uint16_t OPkBatchSize
 Used when fetching from server self OPk : how many will we upload if needed.

Detailed Description

structure holding user data while waiting for callback from X3DH server response processing

Constructor & Destructor Documentation

◆ callbackUserData() [1/4]

lime::callbackUserData::callbackUserData ( std::weak_ptr< LimeGeneric > thiz,
const std::shared_ptr< limeCallback > callback,
uint16_t OPkInitialBatchSize = lime::settings::OPk_initialBatchSize )
inline

created at user create/delete and keys Post. EncryptionPolicy is not used, set it to the default value anyway

◆ callbackUserData() [2/4]

lime::callbackUserData::callbackUserData ( std::weak_ptr< LimeGeneric > thiz,
const std::shared_ptr< limeCallback > callback,
uint16_t OPkServerLowLimit,
uint16_t OPkBatchSize )
inline

created at update: getSelfOPks. EncryptionPolicy is not used, set it to the default value anyway

◆ callbackUserData() [3/4]

lime::callbackUserData::callbackUserData ( std::weak_ptr< LimeGeneric > thiz,
const std::shared_ptr< limeCallback > callback,
const std::shared_ptr< limeRandomSeedCallback > randomSeedCallback,
std::shared_ptr< lime::EncryptionContext > encryptionContext )
inline

created at encrypt(getPeerBundle)

◆ callbackUserData() [4/4]

lime::callbackUserData::callbackUserData ( callbackUserData & a)
delete

do not copy callback data, force passing the pointer around after creation

Member Function Documentation

◆ operator=()

callbackUserData lime::callbackUserData::operator= ( callbackUserData & a)
delete

do not copy callback data, force passing the pointer around after creation

Member Data Documentation

◆ callback

const std::shared_ptr<limeCallback> lime::callbackUserData::callback

this is a ptr to a lambda, we may use it several time so we can manage precisely its timelife

◆ encryptionContext

std::shared_ptr<lime::EncryptionContext> lime::callbackUserData::encryptionContext

Encryption context :AD, plain and cipher text, encryption policy and recipients.

◆ limeObj

std::weak_ptr<LimeGeneric> lime::callbackUserData::limeObj

limeObj is owned by the LimeManager, it shall no be destructed, do not own this with a shared_ptr as Lime obj may own the callbackUserData obj thus creating circular reference

◆ OPkBatchSize

uint16_t lime::callbackUserData::OPkBatchSize

Used when fetching from server self OPk : how many will we upload if needed.

◆ OPkServerLowLimit

uint16_t lime::callbackUserData::OPkServerLowLimit

Used when fetching from server self OPk to check if we shall upload more.

◆ randomSeedCallback

const std::shared_ptr<limeRandomSeedCallback> lime::callbackUserData::randomSeedCallback

this is a ptr to a lambda, we may use it several time so we can manage precisely its timelife


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