1
0
This repository has been archived on 2025-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
siadrive/SiaDrive.Api/SiaCommon.h
Scott E. Graves 4ef968180d [Unit Test] SiaCurl::Get() - Basic get test
Added json parser
2017-02-02 21:51:33 -06:00

37 lines
723 B
C++

#pragma once
#include <string>
#include <cstdint>
#include <memory>
#include "json.hpp"
using json = nlohmann::json;
#ifdef _UNICODE
#define String std::wstring
#else
#define String std::wstring
#endif
#define NS_BEGIN(n) namespace n {
#define NS_END1() }
#define NS_END2() NS_END1() }
#define NS_END3() NS_END2() }
#define NS_END4() NS_END3() }
#define NS_END5() NS_END4() }
#define NS_END(c) NS_END##c()
#define Property(type, name, get_access, set_access) \
private:\
type _##name;\
get_access:\
const type& Get##name() const { return _##name;}\
set_access:\
const type& Set##name(const type& value) { _##name = value; return _##name; }
struct SiaHostConfig
{
std::string HostName;
std::uint16_t HostPort;
};