-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathjUARTAPI.h
72 lines (54 loc) · 1.93 KB
/
jUARTAPI.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/****************************************************************/
// By Bill Hsu
// Shanghai University
// My Blog: http://BillHsu.me
// jUART Project: http://github.com/billhsu/jUART
// Created on: 2013-01-04
/****************************************************************/
/**********************************************************\
Auto-generated jUARTAPI.h
\**********************************************************/
#include <string>
#include <sstream>
#include <boost/weak_ptr.hpp>
#include "JSAPIAuto.h"
#include "BrowserHost.h"
#include "jUART.h"
#include "FBPointers.h"
#ifndef H_jUARTAPI
#define H_jUARTAPI
FB_FORWARD_PTR(SerialAPI);
class jUARTAPI : public FB::JSAPIAuto
{
public:
//
jUARTAPI(const jUARTPtr& plugin, const FB::BrowserHostPtr& host);
///////////////////////////////////////////////////////////////////////////////
/// @fn jUARTAPI::~jUARTAPI()
///
/// @brief Destructor. Remember that this object will not be released until
/// the browser is done with it; this will almost definitely be after
/// the plugin is released.
///////////////////////////////////////////////////////////////////////////////
virtual ~jUARTAPI() {};
jUARTPtr getPlugin();
// Read/Write property ${PROPERTY.ident}
std::string get_testString();
void set_testString(const std::string& val);
// Read-only property ${PROPERTY.ident}
std::string get_version();
// Method echo
FB::variant echo(const FB::variant& msg);
// Event helpers
FB_JSAPI_EVENT(test, 0, ());
FB_JSAPI_EVENT(echo, 2, (const FB::variant&, const int));
// Method test-event
void testEvent();
boost::weak_ptr<SerialAPI> get_Serial();
private:
jUARTWeakPtr m_plugin;
FB::BrowserHostPtr m_host;
std::string m_testString;
SerialAPIPtr m_Serial;
};
#endif // H_jUARTAPI