#ifndef __indy__wallet__included__
#define __indy__wallet__included__
#include "indy_mod.h"
#include "indy_types.h"
typedef indy_error_t (*indyCreateWalletCb)(const char* name,
const char* config,
const char* credentials_json,
const char* metadata);
typedef indy_error_t (*indyOpenWalletCb)(const char* name,
const char* config,
const char* credentials,
indy_handle_t* handle);
typedef indy_error_t (*indyCloseWalletCb)(indy_handle_t handle);
typedef indy_error_t (*indyDeleteWalletCb)(const char* name,
const char* config,
const char* credentials);
typedef indy_error_t (*indyWalletAddRecordCb)(indy_handle_t handle,
const char* type_,
const char* id,
const indy_u8_t * value,
indy_u32_t value_len,
const char* tags_json);
typedef indy_error_t (*indyWalletUpdateRecordValueCb)(indy_handle_t handle,
const char* type_,
const char* id,
const indy_u8_t * value,
indy_u32_t value_len);
typedef indy_error_t (*indyWalletUpdateRecordTagsCb)(indy_handle_t handle,
const char* type_,
const char* id,
const char* tags_json);
typedef indy_error_t (*indyWalletAddRecordTagsCb)(indy_handle_t handle,
const char* type_,
const char* id,
const char* tags_json);
typedef indy_error_t (*indyWalletDeleteRecordTagsCb)(indy_handle_t handle,
const char* type_,
const char* id,
const char* tags_names);
typedef indy_error_t (*indyWalletDeleteRecordCb)(indy_handle_t handle,
const char* type_,
const char* id);
typedef indy_error_t (*indyWalletGetRecordCb)(indy_handle_t handle,
const char* type_,
const char* id,
const char* options_json,
int32_t* record_handle);
typedef indy_error_t (*indyWalletGetRecordIdCb)(indy_handle_t handle,
indy_handle_t record_handle,
char* id);
typedef indy_error_t (*indyWalletGetRecordTypeCb)(indy_handle_t handle,
indy_handle_t record_handle,
char* type_);
typedef indy_error_t (*indyWalletGetRecordValueCb)(indy_handle_t handle,
indy_handle_t record_handle,
indy_u8_t * value,
indy_u32_t value_len);
typedef indy_error_t (*indyWalletGetRecordTagsCb)(indy_handle_t handle,
indy_handle_t record_handle,
char* tags_json);
typedef indy_error_t (*indyWalletFreeRecordCb)(indy_handle_t handle,
indy_handle_t record_handle);
typedef indy_error_t (*indyWalletGetStorageMetadataCb)(indy_handle_t handle,
char* metadata,
indy_handle_t metadata_handle);
typedef indy_error_t (*indyWalletSetStorageMetadataCb)(indy_handle_t handle,
const char* metadata);
typedef indy_error_t (*indyWalletFreeStorageMetadataCb)(indy_handle_t handle,
indy_handle_t metadata_handle);
typedef indy_error_t (*indyWalletOpenSearchCb)(indy_handle_t handle,
const char* type_,
const char* query,
const char* options,
int32_t* search_handle);
typedef indy_error_t (*indyWalletOpenSearchAllCb)(indy_handle_t handle,
indy_handle_t search_handle);
typedef indy_error_t (*indyWalletGetSearchTotalCountCb)(indy_handle_t handle,
indy_handle_t search_handle,
indy_u32_t* total_count);
typedef indy_error_t (*indyWalletFetchSearchNextRecordsCb)(indy_handle_t handle,
indy_handle_t search_handle,
indy_handle_t record_handle);
typedef indy_error_t (*indyWalletFreeSearchCb)(indy_handle_t handle,
indy_handle_t search_handle);
#ifdef __cplusplus
extern "C" {
#endif
extern indy_error_t indy_register_wallet_storage(indy_handle_t command_handle,
const char* type_,
indyCreateWalletCb create_wallet_cb,
indyOpenWalletCb open_wallet_cb,
indyCloseWalletCb close_wallet_cb,
indyDeleteWalletCb delete_wallet_cb,
indyWalletAddRecordCb add_record_cb,
indyWalletUpdateRecordValueCb update_record_value,
indyWalletUpdateRecordTagsCb update_record_tags_cb,
indyWalletAddRecordTagsCb add_record_tags_cb,
indyWalletDeleteRecordTagsCb delete_record_tags_cb,
indyWalletDeleteRecordCb delete_record_cb,
indyWalletGetRecordCb get_record_cb,
indyWalletGetRecordIdCb get_record_id_cb,
indyWalletGetRecordTypeCb get_record_type_cb,
indyWalletGetRecordValueCb get_record_value_cb,
indyWalletGetRecordTagsCb get_records_tags_cb,
indyWalletFreeRecordCb free_record_cb,
indyWalletGetStorageMetadataCb get_storage_metadata_cb,
indyWalletSetStorageMetadataCb set_storage_metadata_cb,
indyWalletFreeStorageMetadataCb free_storage_metadata_cb,
indyWalletOpenSearchCb open_search_cb,
indyWalletOpenSearchAllCb open_search_all_cb,
indyWalletGetSearchTotalCountCb get_search_total_count_cb,
indyWalletFetchSearchNextRecordsCb fetch_search_next_record_cb,
indyWalletFreeSearchCb free_search_cb,
indy_empty_cb cb
);
extern indy_error_t indy_create_wallet(indy_handle_t command_handle,
const char* config,
const char* credentials,
indy_empty_cb cb
);
extern indy_error_t indy_open_wallet(indy_handle_t command_handle,
const char* config,
const char* credentials,
indy_handle_cb cb
);
extern indy_error_t indy_export_wallet(indy_handle_t command_handle,
indy_handle_t wallet_handle,
const char* export_config_json,
indy_empty_cb cb
);
extern indy_error_t indy_import_wallet(indy_handle_t command_handle,
const char* config,
const char* credentials,
const char* import_config_json,
indy_empty_cb cb
);
extern indy_error_t indy_close_wallet(indy_handle_t command_handle,
indy_handle_t wallet_handle,
indy_empty_cb cb
);
extern indy_error_t indy_delete_wallet(indy_handle_t command_handle,
const char* config,
const char* credentials,
indy_empty_cb cb
);
extern indy_error_t indy_generate_wallet_key(indy_handle_t command_handle,
const char *const config,
indy_str_cb cb
);
#ifdef __cplusplus
}
#endif
#endif