Overview
Stores provide encrypted block storage, enabling simple file uploading and downloading.
Before working with Stores, follow our Getting Started Guide. It will show you how to set up your project to work with PrivMX Bridge.
Sample code on this page is based on the initial assumptions.
Working with Stores
When working with Stores, you will use the following:
StoreApi
- provides methods used to manage Stores in given Context
Let's modify the program from the First App chapter to connect to the Bridge server, create a Store, and put the first file in it.
CMakeLists.txt
main.cpp
Creating Stores
Creating a basic, unnamed Store, which can act as an encrypted data container:
Hint: You can assign any data to private and public meta fields (e.g. the Store's name), as long as it is serialized and can be given as the core::Buffer
.
Fetching Stores
Getting a list of Stores available for the user in the given Context:
As a result you will receive an object:
Getting a single Store:
A detailed description of the Store
object fields can be found in API Reference.
Modifying Stores
How Updates Work
To update a Store, you must always provide a full list of parameters.
The updateStore(...)
method needs all the parameters as in the createStore(...)
method and a few more. If you want to update
one of the parameters – provide it in a new modified form. If, on the other hand, you want to leave
the parameter unchanged – provide it as it was before.
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.