Commit 48d4f6ad authored by Morten Ofstad's avatar Morten Ofstad
Browse files

Stubbed out OpenVDS::create.

parent 3681884b
......@@ -28,7 +28,17 @@ namespace OpenVDS
VDSHandle *open(const OpenOptions &options, Error &error)
{
std::unique_ptr<VDSHandle> ret(new VDSHandle());
if (!DownloadAndParseVDSJson(options, *ret.get(), error))
if (!downloadAndParseVDSJson(options, *ret.get(), error))
{
return nullptr;
}
return ret.release();
}
VDSHandle* create(const OpenOptions& options, VolumeDataLayoutDescriptor const &layoutDescriptor, std::vector<VolumeDataAxisDescriptor> const &axisDescriptors, std::vector<VolumeDataChannelDescriptor> const &channelDescriptors, Error &error)
{
std::unique_ptr<VDSHandle> ret(new VDSHandle());
if (!serializeAndUploadVDSJson(options, *ret.get(), error))
{
return nullptr;
}
......
......@@ -21,9 +21,14 @@
#include "openvds_export.h"
#include <string>
#include <vector>
namespace OpenVDS
{
class VolumeDataLayoutDescriptor;
class VolumeDataAxisDescriptor;
class VolumeDataChannelDescriptor;
struct OpenOptions
{
std::string bucket;
......@@ -38,7 +43,9 @@ struct Error
};
struct VDSHandle;
OPENVDS_EXPORT VDSHandle* open(const OpenOptions& options, Error &error);
OPENVDS_EXPORT VDSHandle* create(const OpenOptions& options, VolumeDataLayoutDescriptor const &layoutDescriptor, std::vector<VolumeDataAxisDescriptor> const &axisDescriptors, std::vector<VolumeDataChannelDescriptor> const &channelDescriptors, Error &error);
OPENVDS_EXPORT void destroy(VDSHandle *handle);
}
......
......@@ -664,7 +664,7 @@ static void createVolumeDataLayout(VDSHandle &handle)
}
}
bool DownloadAndParseVDSJson(const OpenOptions& options, VDSHandle& handle, Error& error)
bool downloadAndParseVDSJson(const OpenOptions& options, VDSHandle& handle, Error& error)
{
std::string vdsobject_json;
if (!S3::DownloadJson(options.region, options.bucket, options.key, vdsobject_json, error))
......@@ -706,5 +706,10 @@ bool DownloadAndParseVDSJson(const OpenOptions& options, VDSHandle& handle, Erro
return true;
}
bool serializeAndUploadVDSJson(const OpenOptions& options, VDSHandle& handle, Error& error)
{
return true;
}
}
......@@ -23,7 +23,8 @@
namespace OpenVDS
{
bool DownloadAndParseVDSJson(const OpenOptions &options, VDSHandle &handle, Error &error);
bool downloadAndParseVDSJson(const OpenOptions &options, VDSHandle &handle, Error &error);
bool serializeAndUploadVDSJson(const OpenOptions &options, VDSHandle &handle, Error &error);
}
#endif //PARSEVDSJSON_H
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment