nova proba

Committer:
Bosko Lekovic
Date:
Sun Jan 17 23:03:43 2021 +0100
Revision:
27:0772451fb880
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Bosko Lekovic 27:0772451fb880 1 #ifndef doHTML_H
Bosko Lekovic 27:0772451fb880 2 #define doHTML_H
Bosko Lekovic 27:0772451fb880 3
Bosko Lekovic 27:0772451fb880 4 #include "dxml.h"
Bosko Lekovic 27:0772451fb880 5
Bosko Lekovic 27:0772451fb880 6 bool test_FlashDataProbity(void);
Bosko Lekovic 27:0772451fb880 7
Bosko Lekovic 27:0772451fb880 8
Bosko Lekovic 27:0772451fb880 9 class C_HTMLparse
Bosko Lekovic 27:0772451fb880 10 {
Bosko Lekovic 27:0772451fb880 11 private:
Bosko Lekovic 27:0772451fb880 12
Bosko Lekovic 27:0772451fb880 13 char* p_HTMLpage;
Bosko Lekovic 27:0772451fb880 14 dxml_t p_rootHTML;
Bosko Lekovic 27:0772451fb880 15 dxml_t html_body, html_form, html_table, tr;
Bosko Lekovic 27:0772451fb880 16 dxml_t front_row[3];
Bosko Lekovic 27:0772451fb880 17 dxml_t UDPs[10];
Bosko Lekovic 27:0772451fb880 18 dxml_t TCPs[10];
Bosko Lekovic 27:0772451fb880 19 dxml_t serial[4];
Bosko Lekovic 27:0772451fb880 20
Bosko Lekovic 27:0772451fb880 21 void load_front_row();
Bosko Lekovic 27:0772451fb880 22 void load_second_row();
Bosko Lekovic 27:0772451fb880 23 void load_udp_and_tcp(dxml_t& td);
Bosko Lekovic 27:0772451fb880 24 void load_serial(dxml_t& td);
Bosko Lekovic 27:0772451fb880 25 dxml_t get_serial_option(dxml_t s, int option_idx);
Bosko Lekovic 27:0772451fb880 26 void intern_init( void );
Bosko Lekovic 27:0772451fb880 27
Bosko Lekovic 27:0772451fb880 28 int httpSplitInLines( char *lines[], char * httpresp);
Bosko Lekovic 27:0772451fb880 29 char * httpFirstLine( char **descr, char *line);
Bosko Lekovic 27:0772451fb880 30
Bosko Lekovic 27:0772451fb880 31 struct S_httpPostValues
Bosko Lekovic 27:0772451fb880 32 {
Bosko Lekovic 27:0772451fb880 33 char *name;
Bosko Lekovic 27:0772451fb880 34 char *value;
Bosko Lekovic 27:0772451fb880 35 } s_hpv[100];
Bosko Lekovic 27:0772451fb880 36
Bosko Lekovic 27:0772451fb880 37 struct S_httpPostValues *ps_hpv = s_hpv;
Bosko Lekovic 27:0772451fb880 38
Bosko Lekovic 27:0772451fb880 39 int extractPostPairs( struct S_httpPostValues ** ps_hpv, char *line);
Bosko Lekovic 27:0772451fb880 40
Bosko Lekovic 27:0772451fb880 41 public:
Bosko Lekovic 27:0772451fb880 42
Bosko Lekovic 27:0772451fb880 43 C_HTMLparse( void );
Bosko Lekovic 27:0772451fb880 44 C_HTMLparse( const char *str );
Bosko Lekovic 27:0772451fb880 45
Bosko Lekovic 27:0772451fb880 46
Bosko Lekovic 27:0772451fb880 47 const char *get_selected_option( const char *name_option );
Bosko Lekovic 27:0772451fb880 48 const char * set_selected_option( const char* name_option, const char* value_option );
Bosko Lekovic 27:0772451fb880 49
Bosko Lekovic 27:0772451fb880 50 const char * get_BaudRate( void );
Bosko Lekovic 27:0772451fb880 51 const char * get_Parity( void );
Bosko Lekovic 27:0772451fb880 52 const char * get_StopBits( void );
Bosko Lekovic 27:0772451fb880 53 const char * get_DataBits( void );
Bosko Lekovic 27:0772451fb880 54
Bosko Lekovic 27:0772451fb880 55
Bosko Lekovic 27:0772451fb880 56 char *getHTML_free( void );
Bosko Lekovic 27:0772451fb880 57
Bosko Lekovic 27:0772451fb880 58
Bosko Lekovic 27:0772451fb880 59 const char *get_myIP( void );
Bosko Lekovic 27:0772451fb880 60 const char *get_myMASK(void);
Bosko Lekovic 27:0772451fb880 61 const char *get_myGATE( void );
Bosko Lekovic 27:0772451fb880 62
Bosko Lekovic 27:0772451fb880 63 const char *get_myUdpPort( void );
Bosko Lekovic 27:0772451fb880 64 const char *get_myTcpPort( void );
Bosko Lekovic 27:0772451fb880 65
Bosko Lekovic 27:0772451fb880 66 const char *get_UdpIP( int i );
Bosko Lekovic 27:0772451fb880 67 const char *get_UdpPort( int i );
Bosko Lekovic 27:0772451fb880 68
Bosko Lekovic 27:0772451fb880 69 const char *get_TcpIP( int i );
Bosko Lekovic 27:0772451fb880 70 const char *get_TcpPort( int i );
Bosko Lekovic 27:0772451fb880 71
Bosko Lekovic 27:0772451fb880 72
Bosko Lekovic 27:0772451fb880 73 void set_myIP( const char* str );
Bosko Lekovic 27:0772451fb880 74 void set_myMASK( const char* str );
Bosko Lekovic 27:0772451fb880 75 void set_myGATE( const char* str );
Bosko Lekovic 27:0772451fb880 76
Bosko Lekovic 27:0772451fb880 77 void set_myUdpPort( const char* str );
Bosko Lekovic 27:0772451fb880 78 void set_myTcpPort( const char* str );
Bosko Lekovic 27:0772451fb880 79
Bosko Lekovic 27:0772451fb880 80 void set_UdpIP( int i, const char* str );
Bosko Lekovic 27:0772451fb880 81 void set_UdpPort( int i, const char* str );
Bosko Lekovic 27:0772451fb880 82
Bosko Lekovic 27:0772451fb880 83 void set_TcpIP( int i, const char* str );
Bosko Lekovic 27:0772451fb880 84 void set_TcpPort( int i, const char* str );
Bosko Lekovic 27:0772451fb880 85
Bosko Lekovic 27:0772451fb880 86
Bosko Lekovic 27:0772451fb880 87
Bosko Lekovic 27:0772451fb880 88 void htmlPOST_fun( void );
Bosko Lekovic 27:0772451fb880 89
Bosko Lekovic 27:0772451fb880 90
Bosko Lekovic 27:0772451fb880 91 char ** doHTTP_freereturn( char * httpcontents);
Bosko Lekovic 27:0772451fb880 92
Bosko Lekovic 27:0772451fb880 93 };
Bosko Lekovic 27:0772451fb880 94 #endif