-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiothub.hpp
More file actions
31 lines (24 loc) · 790 Bytes
/
Copy pathiothub.hpp
File metadata and controls
31 lines (24 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// -*- coding: utf-8-unix -*-
#ifndef AZURE_IOTHUB_H
#define AZURE_IOTHUB_H
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <vector>
namespace aziot {
enum class loglevel { trace, info, debug, error };
class iothub {
public:
iothub(const std::string connection_string);
iothub() = delete;
~iothub();
void send(std::map< std::string, std::string > prop, std::shared_ptr< std::vector< uint8_t > > data, std::function< void() >&& fallback);
void send(std::map< std::string, std::string > prop, std::shared_ptr< std::string > str, std::function< void() >&& fallback);
static std::function< void(const aziot::loglevel level, const std::string& msg) > log;
private:
class impl;
std::unique_ptr<impl> _impl;
};
}
#endif // AZURE_IOTHUB_H