semilimes mcu sdk
1.0.1
semilimes Software Development Kit for microcontrollers
Loading...
Searching...
No Matches
dc_form.h
1
#ifndef _dc_form_
2
#define _dc_form_
3
4
#include "../defines.h"
5
6
class
DcForm
7
{
8
private
:
9
#define headerSize 102
10
#define headerArraySize 2
11
SmeJson json_data;
12
char
* json =
nullptr
;
13
char
* jsonArray =
nullptr
;
14
15
public
:
16
// variable: DcForm.featureType
17
18
// describes the types of the feature
20
char
featureType
[3][10] = {
"contact"
,
"groupchat"
,
"channel"
};
21
22
// Function: ~DcForm
23
24
// distructor of the class, frees up the memory occupied by the array/s
25
26
// Prototype:
27
// ~DcForm()
28
29
// Parameters:
30
31
// Returns:
33
~DcForm
()
34
{
35
delete
[] json;
36
delete
[] jsonArray;
37
json =
nullptr
;
38
jsonArray =
nullptr
;
39
}
40
41
// Function: DcForm.set
42
43
// A form message is a complex data component which can be arbitrarily structured using available form components
44
45
// Prototype:
46
// void DcForm::set(bool submitEnabled, bool retainStatus, char* submitText, char* refName);
47
48
// Parameters:
55
// Returns:
57
void
set
(
char
* recId,
char
* recFeatureType,
bool
submitEnabled,
bool
retainStatus,
char
* submitText,
char
* refName);
58
59
// Function: DcForm.addFormComponents
60
61
// Add a Form Component to the array
62
63
// Prototype:
64
// void DcForm::addFormComponents(char* component);
65
66
// Parameters:
68
69
// Returns:
71
void
addFormComponents
(
char
* component);
72
73
// Function: DcForm.appendFormComponents
74
75
// Append the Form Components to the json message
76
77
// Prototype:
78
// void DcForm::appendFormComponents();
79
80
// Parameters:
81
82
// Returns:
84
void
appendFormComponents
();
85
86
87
// Function: DcForm.get
88
89
// return the json script
90
91
// Prototype:
92
// void DcForm::get();
93
94
// Parameters:
95
96
// Returns:
98
char
*
get
();
99
};
100
101
#endif
DcForm
Definition
dc_form.h:7
DcForm::~DcForm
~DcForm()
Definition
dc_form.h:33
DcForm::get
char * get()
Definition
dc_form.cpp:102
DcForm::featureType
char featureType[3][10]
Definition
dc_form.h:20
DcForm::set
void set(char *recId, char *recFeatureType, bool submitEnabled, bool retainStatus, char *submitText, char *refName)
Definition
dc_form.cpp:20
DcForm::appendFormComponents
void appendFormComponents()
Definition
dc_form.cpp:83
DcForm::addFormComponents
void addFormComponents(char *component)
Definition
dc_form.cpp:54
github
semilimes_mcu_sdk
src
components
dc_form.h
Generated by
1.12.0