libsignal-protocol-c  master
signal_protocol_signed_pre_key_store Struct Reference

Public Attributes

int(* load_signed_pre_key )(signal_buffer **record, uint32_t signed_pre_key_id, void *user_data)
 
int(* store_signed_pre_key )(uint32_t signed_pre_key_id, uint8_t *record, size_t record_len, void *user_data)
 
int(* contains_signed_pre_key )(uint32_t signed_pre_key_id, void *user_data)
 
int(* remove_signed_pre_key )(uint32_t signed_pre_key_id, void *user_data)
 
void(* destroy_func )(void *user_data)
 
void * user_data
 

Member Data Documentation

◆ contains_signed_pre_key

int(* signal_protocol_signed_pre_key_store::contains_signed_pre_key) (uint32_t signed_pre_key_id, void *user_data)

Determine whether there is a committed signed PreKey record matching the provided ID.

Parameters
signed_pre_key_idA signed PreKey record ID.
Returns
1 if the store has a record for the signed PreKey ID, 0 otherwise

◆ destroy_func

void(* signal_protocol_signed_pre_key_store::destroy_func) (void *user_data)

Function called to perform cleanup when the data store context is being destroyed.

◆ load_signed_pre_key

int(* signal_protocol_signed_pre_key_store::load_signed_pre_key) (signal_buffer **record, uint32_t signed_pre_key_id, void *user_data)

Load a local serialized signed PreKey record.

Parameters
recordpointer to a newly allocated buffer containing the record, if found. Unset if no record was found. The Signal Protocol library is responsible for freeing this buffer.
signed_pre_key_idthe ID of the local signed PreKey record
Return values
SG_SUCCESSif the key was found
SG_ERR_INVALID_KEY_IDif the key could not be found

◆ remove_signed_pre_key

int(* signal_protocol_signed_pre_key_store::remove_signed_pre_key) (uint32_t signed_pre_key_id, void *user_data)

Delete a SignedPreKeyRecord from local storage.

Parameters
signed_pre_key_idThe ID of the signed PreKey record to remove.
Returns
0 on success, negative on failure

◆ store_signed_pre_key

int(* signal_protocol_signed_pre_key_store::store_signed_pre_key) (uint32_t signed_pre_key_id, uint8_t *record, size_t record_len, void *user_data)

Store a local serialized signed PreKey record.

Parameters
signed_pre_key_idthe ID of the signed PreKey record to store
recordpointer to a buffer containing the serialized record
record_lenlength of the serialized record
Returns
0 on success, negative on failure

◆ user_data

void* signal_protocol_signed_pre_key_store::user_data

User data pointer


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