semilimes mcu sdk 1.1.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
6class DcForm
7{
8private:
9 #define headerSize 151
10 #define headerArraySize 2
11 SmeJson json_data;
12 char* json = nullptr;
13 char* jsonArray = nullptr;
14
15public:
16// variable: DcForm.featureType
17// describes the types of the feature
19 char featureType[3][10] = {"contact","groupchat","channel"};
20
21// variable: DcForm.align
22// allows to align all the children form components to a direction
24 char align[3][7] = {"left","center","right"};
25
26// Function: ~DcForm
27
28// distructor of the class, frees up the memory occupied by the array/s
29
30// Prototype:
31// ~DcForm()
32
33// Parameters:
34
35// Returns:
38 {
39 delete[] json;
40 delete[] jsonArray;
41 json = nullptr;
42 jsonArray = nullptr;
43 }
44
45// Function: DcForm.set
46
47// A form message is a complex data component which can be arbitrarily structured using available form components
48
49// Prototype:
50// void DcForm::set(bool submitEnabled, bool retainStatus, char* submitText, char* refName);
51
52// Parameters:
62// Returns:
64 void set(char* recId, char* recFeatureType, bool submitEnabled, bool retainStatus, char* submitText, char* refName, char* align, bool authorizeSubmit, bool hideSubmissionMsg);
65
66// Function: DcForm.addFormComponents
67
68// Add a Form Component to the array
69
70// Prototype:
71// void DcForm::addFormComponents(char* component);
72
73// Parameters:
75
76// Returns:
78 void addFormComponents(char* component);
79
80// Function: DcForm.appendFormComponents
81
82// Append the Form Components to the json message
83
84// Prototype:
85// void DcForm::appendFormComponents();
86
87// Parameters:
88
89// Returns:
92
93
94// Function: DcForm.get
95
96// return the json script
97
98// Prototype:
99// void DcForm::get();
100
101// Parameters:
102
103// Returns:
105 char* get();
106};
107
108#endif
Definition dc_form.h:7
char align[3][7]
Definition dc_form.h:24
void set(char *recId, char *recFeatureType, bool submitEnabled, bool retainStatus, char *submitText, char *refName, char *align, bool authorizeSubmit, bool hideSubmissionMsg)
Definition dc_form.cpp:23
~DcForm()
Definition dc_form.h:37
char * get()
Definition dc_form.cpp:111
char featureType[3][10]
Definition dc_form.h:19
void appendFormComponents()
Definition dc_form.cpp:89
void addFormComponents(char *component)
Definition dc_form.cpp:60