HIVE SDK for C++

HIVE_DataStore.h
1//
2// HIVE_DataStore.hpp
3// HIVE_SDK_Plugin
4//
5// Created by sjyong on 2022/03/03.
6//
7
8
9#ifndef __HIVE_DATA_STORE_H__
10#define __HIVE_DATA_STORE_H__
11
12#include "HIVE_ResultAPI.h"
13#include <map>
14
15using namespace std;
16
17NS_HIVE_BEGIN
18
19class ResultAPI;
20
50class HIVESDK_DLLEXPORT DataStore
51{
52public:
53
54 typedef function<void(ResultAPI const & result)> onSet;
55
56 typedef function<void(ResultAPI const & result, string data)> onGet;
57
58 typedef function<void(ResultAPI const & result, map<string, string> const & myData)> onMyData;
59
60 typedef function<void(ResultAPI const & result, string const & key, map<long long, string> const & usersData)> onUsersData;
61
62
82 static void set(string key, string value, onSet listener);
83
103 static void set(map<string, string> data, onSet listener);
104
116 static void get(string key, onGet listener);
117
129 static void getMyData(onMyData listener);
130
142 static void getUsersData(string key, onUsersData listener);
143
144 // \~korean Native 영역에서 호출된 요청을 처리하기 위한 플러그인 내부 코드
145 // \~english Plug-in internal code to handle requests invoked from the native code.
146 static void executeEngine(picojson::value jsonParam);
147
148};
149
150// MARK: -
151NS_HIVE_END // namespace hive
152
153
154#endif // __HIVE_DATA_STORE_H__
155
156
Hive Data Store uses NoSQL Cloud Database to synchronize and store the data for use on the client,...
Definition: HIVE_DataStore.h:51
static void set(string key, string value, onSet listener)
Add Data
static void getUsersData(string key, onUsersData listener)
Get all data using key
static void get(string key, onGet listener)
Get one of my data
static void set(map< string, string > data, onSet listener)
Add Data
static void getMyData(onMyData listener)
Get all my data
Definition: HIVE_ResultAPI.h:63
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy