1#ifndef _PRIVMXLIB_ENDPOINT_STORE_STOREAPI_HPP_
2#define _PRIVMXLIB_ENDPOINT_STORE_STOREAPI_HPP_
9#include "privmx/endpoint/core/Connection.hpp"
10#include "privmx/endpoint/store/Types.hpp"
11#include <privmx/endpoint/core/ExtendedPointer.hpp>
55 std::string
createStore(
const std::string& contextId,
const std::vector<core::UserWithPubKey>& users,
57 const std::optional<core::ContainerPolicy>& policies = std::nullopt);
73 void updateStore(
const std::string& storeId,
const std::vector<core::UserWithPubKey>& users,
74 const std::vector<core::UserWithPubKey>& managers,
const core::Buffer& publicMeta,
const core::Buffer& privateMeta,
const int64_t version,
75 const bool force,
const bool forceGenerateNewKey,
76 const std::optional<core::ContainerPolicy>& policies = std::nullopt);
113 const int64_t size,
bool randomWriteSupport =
false);
193 void seekInFile(
const int64_t fileHandle,
const int64_t position);
209 std::vector<std::string>
subscribeFor(
const std::vector<std::string>& subscriptionQueries);
232 StoreApi(
const std::shared_ptr<StoreApiImpl>& impl);
Definition Connection.hpp:22
Definition ExtendedPointer.hpp:16
void updateFileMeta(const std::string &fileId, const core::Buffer &publicMeta, const core::Buffer &privateMeta)
core::PagingList< Store > listStores(const std::string &contextId, const core::PagingQuery &pagingQuery)
void updateStore(const std::string &storeId, const std::vector< core::UserWithPubKey > &users, const std::vector< core::UserWithPubKey > &managers, const core::Buffer &publicMeta, const core::Buffer &privateMeta, const int64_t version, const bool force, const bool forceGenerateNewKey, const std::optional< core::ContainerPolicy > &policies=std::nullopt)
File getFile(const std::string &fileId)
Store getStore(const std::string &storeId)
core::PagingList< File > listFiles(const std::string &storeId, const core::PagingQuery &pagingQuery)
void unsubscribeFrom(const std::vector< std::string > &subscriptionIds)
std::string closeFile(const int64_t fileHandle)
int64_t updateFile(const std::string &fileId, const core::Buffer &publicMeta, const core::Buffer &privateMeta, const int64_t size)
std::vector< std::string > subscribeFor(const std::vector< std::string > &subscriptionQueries)
void writeToFile(const int64_t fileHandle, const core::Buffer &dataChunk, bool truncate=false)
core::Buffer readFromFile(const int64_t fileHandle, const int64_t length)
void seekInFile(const int64_t fileHandle, const int64_t position)
void deleteStore(const std::string &storeId)
static StoreApi create(core::Connection &connection)
std::string createStore(const std::string &contextId, const std::vector< core::UserWithPubKey > &users, const std::vector< core::UserWithPubKey > &managers, const core::Buffer &publicMeta, const core::Buffer &privateMeta, const std::optional< core::ContainerPolicy > &policies=std::nullopt)
int64_t openFile(const std::string &fileId)
int64_t createFile(const std::string &storeId, const core::Buffer &publicMeta, const core::Buffer &privateMeta, const int64_t size, bool randomWriteSupport=false)
void deleteFile(const std::string &fileId)
std::string buildSubscriptionQuery(EventType eventType, EventSelectorType selectorType, const std::string &selectorId)
void syncFile(const int64_t fileHandle)