nova proba

Revision:
27:0772451fb880
diff -r c14d034d7459 -r 0772451fb880 HTML/doHTML.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTML/doHTML.h	Sun Jan 17 23:03:43 2021 +0100
@@ -0,0 +1,94 @@
+#ifndef doHTML_H
+#define doHTML_H
+
+#include "dxml.h"
+
+bool test_FlashDataProbity(void);
+
+
+  class C_HTMLparse
+  {
+   private:
+   
+    char* p_HTMLpage;
+     dxml_t p_rootHTML;
+     dxml_t html_body, html_form, html_table, tr; 
+     dxml_t front_row[3];
+     dxml_t UDPs[10];
+     dxml_t TCPs[10];
+     dxml_t serial[4];
+
+    void load_front_row();
+    void load_second_row();
+    void load_udp_and_tcp(dxml_t& td);
+    void load_serial(dxml_t& td);
+    dxml_t get_serial_option(dxml_t s, int option_idx);
+    void intern_init( void );
+
+    int httpSplitInLines( char *lines[], char * httpresp);
+    char * httpFirstLine( char **descr, char *line);
+    
+    struct S_httpPostValues
+    {
+        char *name;
+        char *value;
+    } s_hpv[100];
+    
+    struct S_httpPostValues *ps_hpv = s_hpv;
+    
+    int extractPostPairs( struct S_httpPostValues ** ps_hpv, char *line);
+      
+    public:
+
+    C_HTMLparse( void );
+    C_HTMLparse( const char *str );
+    
+    
+    const char *get_selected_option( const char *name_option );
+    const char * set_selected_option( const char* name_option, const char* value_option );
+
+    const char * get_BaudRate( void );
+    const char * get_Parity( void );
+    const char * get_StopBits( void );
+    const char * get_DataBits( void );
+
+
+    char *getHTML_free( void );
+
+    
+    const char *get_myIP( void );
+    const char *get_myMASK(void);
+    const char *get_myGATE( void );
+
+    const char *get_myUdpPort( void );
+    const char *get_myTcpPort( void ); 
+    
+    const char *get_UdpIP( int i );    
+    const char *get_UdpPort( int i );
+
+    const char *get_TcpIP( int i );
+    const char *get_TcpPort( int i );
+ 
+ 
+    void set_myIP( const char* str );
+    void set_myMASK( const char* str );
+    void set_myGATE( const char* str );
+ 
+    void set_myUdpPort( const char* str );
+    void set_myTcpPort( const char* str ); 
+ 
+    void set_UdpIP( int i, const char* str );
+    void set_UdpPort( int i, const char* str );
+ 
+    void set_TcpIP( int i, const char* str );
+    void set_TcpPort( int i, const char* str );
+
+
+ 
+    void htmlPOST_fun( void );
+
+
+    char ** doHTTP_freereturn( char * httpcontents);
+
+};
+#endif
\ No newline at end of file