Fledge
An open source edge computing platform for industrial users
plugin_data.h
1 #ifndef _PLUGIN_DATA_H
2 #define _PLUGIN_DATA_H
3 /*
4  * Fledge persist plugin data class.
5  *
6  * Copyright (c) 2018 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Massimiliano Pinto
11  */
12 
13 #include <storage_client.h>
14 
16 {
17 
18 public:
19  PluginData(StorageClient* client);
20  ~PluginData() {};
21  // Load data
22  std::string loadStoredData(const std::string& key);
23  // Store data
24  bool persistPluginData(const std::string& key, const std::string& data, const std::string& service_name);
25 
26 private:
27  StorageClient* m_storage;
28  bool m_dataLoaded;
29 };
30 
31 #endif
std::string loadStoredData(const std::string &key)
Load stored data for a given key.
Definition: plugin_data.cpp:34
PluginData(StorageClient *client)
PluginData constructor.
Definition: plugin_data.cpp:24
Definition: plugin_data.h:15
Client for accessing the storage service.
Definition: storage_client.h:43
bool persistPluginData(const std::string &key, const std::string &data, const std::string &service_name)
Store plugin data for a given key.
Definition: plugin_data.cpp:93