lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Loading...
Searching...
No Matches
lime::callbackUserData< Curve > Struct Template 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< Lime< Curve > > thiz, const limeCallback &callbackRef, 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< Lime< Curve > > thiz, const limeCallback &callbackRef, 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< Lime< Curve > > thiz, const limeCallback &callbackRef, std::shared_ptr< const std::vector< uint8_t > > recipientUserId, std::shared_ptr< std::vector< RecipientData > > recipients, std::shared_ptr< const std::vector< uint8_t > > plainMessage, std::shared_ptr< std::vector< uint8_t > > cipherMessage, lime::EncryptionPolicy policy)
 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< Lime< Curve > > 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 limeCallback callback
 is a lambda closure, not real idea of what is its lifetime but it seems ok to hold it this way
std::shared_ptr< const std::vector< uint8_t > > recipientUserId
 Recipient username. Needed for encryption: get a shared ref to keep params alive.
std::shared_ptr< std::vector< RecipientData > > recipients
 Recipient data vector. Needed for encryption: get a shared ref to keep params alive.
std::shared_ptr< const std::vector< uint8_t > > plainMessage
 plaintext. Needed for encryption: get a shared ref to keep params alive
std::shared_ptr< std::vector< uint8_t > > cipherMessage
 ciphertext buffer. Needed for encryption: get a shared ref to keep params alive
lime::EncryptionPolicy encryptionPolicy
 the encryption policy from the original encryption request(if running an encryption request), copy its value instead of holding a shared_ptr on it
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

template<typename Curve>
struct lime::callbackUserData< Curve >

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

Constructor & Destructor Documentation

◆ callbackUserData() [1/4]

template<typename Curve>
lime::callbackUserData< Curve >::callbackUserData ( std::weak_ptr< Lime< Curve > > thiz,
const limeCallback & callbackRef,
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]

template<typename Curve>
lime::callbackUserData< Curve >::callbackUserData ( std::weak_ptr< Lime< Curve > > thiz,
const limeCallback & callbackRef,
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]

template<typename Curve>
lime::callbackUserData< Curve >::callbackUserData ( std::weak_ptr< Lime< Curve > > thiz,
const limeCallback & callbackRef,
std::shared_ptr< const std::vector< uint8_t > > recipientUserId,
std::shared_ptr< std::vector< RecipientData > > recipients,
std::shared_ptr< const std::vector< uint8_t > > plainMessage,
std::shared_ptr< std::vector< uint8_t > > cipherMessage,
lime::EncryptionPolicy policy )
inline

created at encrypt(getPeerBundle)

◆ callbackUserData() [4/4]

template<typename Curve>
lime::callbackUserData< Curve >::callbackUserData ( callbackUserData< Curve > & a)
delete

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

Member Function Documentation

◆ operator=()

template<typename Curve>
callbackUserData lime::callbackUserData< Curve >::operator= ( callbackUserData< Curve > & a)
delete

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

Member Data Documentation

◆ callback

template<typename Curve>
const limeCallback lime::callbackUserData< Curve >::callback

is a lambda closure, not real idea of what is its lifetime but it seems ok to hold it this way

◆ cipherMessage

template<typename Curve>
std::shared_ptr<std::vector<uint8_t> > lime::callbackUserData< Curve >::cipherMessage

ciphertext buffer. Needed for encryption: get a shared ref to keep params alive

◆ encryptionPolicy

template<typename Curve>
lime::EncryptionPolicy lime::callbackUserData< Curve >::encryptionPolicy

the encryption policy from the original encryption request(if running an encryption request), copy its value instead of holding a shared_ptr on it

◆ limeObj

template<typename Curve>
std::weak_ptr<Lime<Curve> > lime::callbackUserData< Curve >::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

template<typename Curve>
uint16_t lime::callbackUserData< Curve >::OPkBatchSize

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

◆ OPkServerLowLimit

template<typename Curve>
uint16_t lime::callbackUserData< Curve >::OPkServerLowLimit

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

◆ plainMessage

template<typename Curve>
std::shared_ptr<const std::vector<uint8_t> > lime::callbackUserData< Curve >::plainMessage

plaintext. Needed for encryption: get a shared ref to keep params alive

◆ recipients

template<typename Curve>
std::shared_ptr<std::vector<RecipientData> > lime::callbackUserData< Curve >::recipients

Recipient data vector. Needed for encryption: get a shared ref to keep params alive.

◆ recipientUserId

template<typename Curve>
std::shared_ptr<const std::vector<uint8_t> > lime::callbackUserData< Curve >::recipientUserId

Recipient username. Needed for encryption: get a shared ref to keep params alive.


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