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 const std::string& contextId,
56 const std::vector<core::UserWithPubKey>& users,
57 const std::vector<core::UserWithPubKey>& managers,
60 const std::optional<core::ContainerPolicy>& policies = std::nullopt
78 const std::string& storeId,
79 const std::vector<core::UserWithPubKey>& users,
80 const std::vector<core::UserWithPubKey>& managers,
83 const int64_t version,
85 const bool forceGenerateNewKey,
86 const std::optional<core::ContainerPolicy>& policies = std::nullopt
124 const std::string& storeId,
128 bool randomWriteSupport =
false
141 const std::string& fileId,
213 void seekInFile(
const int64_t fileHandle,
const int64_t position);
229 std::vector<std::string>
subscribeFor(
const std::vector<std::string>& subscriptionQueries);
245 EventSelectorType selectorType,
246 const std::string& selectorId
256 StoreApi(
const std::shared_ptr<StoreApiImpl>& impl);
Definition Connection.hpp:21
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)