33#ifndef API_MIP_STORAGE_DELEGATE_H_
34#define API_MIP_STORAGE_DELEGATE_H_
81 const std::string& path,
83 const std::string& tableName,
84 const std::vector<std::string>& allColumns,
85 const std::vector<std::string>& encryptedColumns,
86 const std::vector<std::string>& keyColumns)
const = 0;
102 bool isRemoteStorage,
103 bool isInMemoryStorageSupported,
106 : mIsRemoteStorage(isRemoteStorage),
107 mIsInMemoryStorageSupported(isInMemoryStorageSupported),
108 mOnDiskExtension(onDiskExtension),
109 mStorageTableVersion(static_cast<unsigned int>(storageTableVersion)) {
111 throw std::invalid_argument(
"Storage table version must be between StorageTableVersion::One and StorageTableVersion::Two");
149 bool mIsRemoteStorage;
150 bool mIsInMemoryStorageSupported;
151 std::string mOnDiskExtension;
152 unsigned int mStorageTableVersion;
Settings used by StorageDelegate.
Definition storage_delegate.h:91
bool IsInMemoryStorageSupported() const
Gets whether the delegate supports in-memory storage.
Definition storage_delegate.h:127
std::string OnDiskExtension() const
Gets the extension that the delegate will use when storing a table on disk.
Definition storage_delegate.h:136
unsigned int GetStorageTableVersion() const
Gets the version of the underlying storage tables that will be created by this StorageDelegate.
Definition storage_delegate.h:143
StorageSettings(bool isRemoteStorage, bool isInMemoryStorageSupported, const std::string &onDiskExtension=GetSqliteExtension(), StorageTableVersion storageTableVersion=StorageTableVersion::One)
Interface for configuring the storage settings.
Definition storage_delegate.h:101
bool IsRemoteStorage() const
Gets whether remote storage is used or not.
Definition storage_delegate.h:120
A class that defines the interface to the MIP SDK storage for caching.
Definition storage_delegate.h:64
virtual StorageSettings GetSettings() const =0
Gets settings used by StorageDelegate.
virtual mip::StorageTableResult CreateStorageTable(const std::string &path, const MipComponent mipComponent, const std::string &tableName, const std::vector< std::string > &allColumns, const std::vector< std::string > &encryptedColumns, const std::vector< std::string > &keyColumns) const =0
Creates an instance of a storage table that MIP uses for caching. If a table already exists & schema ...
A file Containing the common types used by the upe, file and protection modules.
const std::string & GetSqliteExtension()
Definition common_types.h:256
StorageTableVersion
The features available in the storage tables being used.
Definition common_types.h:270
A simple framework to create a response to delegate calls that can result in error.
mip::DelegateResponse< mip::StorageTable > StorageTableResult
A delegate response type for StorageTable.
Definition storage_delegate.h:59
MipComponent
Describes the MIP component to be used in the application.
Definition storage_delegate.h:49
Defines StorageTable interface.