-
Notifications
You must be signed in to change notification settings - Fork 0
/
httpd.h
83 lines (69 loc) · 2.52 KB
/
httpd.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
73
74
75
76
77
78
79
80
81
82
83
/*----------------------------------------------------------------------------
Copyright: Radig Ulrich mailto: [email protected]
Author: Radig Ulrich
Remarks:
known Problems: none
Version: 24.10.2007
Description: Webserver Applikation
Dieses Programm ist freie Software. Sie können es unter den Bedingungen der
GNU General Public License, wie von der Free Software Foundation veröffentlicht,
weitergeben und/oder modifizieren, entweder gemäß Version 2 der Lizenz oder
(nach Ihrer Option) jeder späteren Version.
Die Veröffentlichung dieses Programms erfolgt in der Hoffnung,
daß es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE,
sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT
FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.
Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
Programm erhalten haben.
Falls nicht, schreiben Sie an die Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
------------------------------------------------------------------------------*/
#ifndef _HTTPD_H
#define _HTTPD_H
#include <avr/io.h>
#include <avr/pgmspace.h>
#include "stack.h"
#include "base64.h"
#include "analog.h"
#include "wol.h"
#if USE_CAM
#include "camera/cam.h"
#endif //USE_CAM
#define HTTPD_PORT 80
// #define MAX_VAR_ARRAY 20 // ursprünglich 10
#define CONVERSION_BUFFER_LEN 15
//#define HTTP_DEBUG usart_write
#define HTTP_DEBUG(...)
// unsigned int var_array[MAX_VAR_ARRAY];
// -> main.c (Uhrzeit)
extern unsigned char hh;
extern unsigned char mm;
extern unsigned char ss;
typedef struct
{
const char *filename; //Dateiname der Seite
PGM_P page_pointer; //Zeiger auf Speicherinhalt
} WEBPAGE_ITEM;
struct http_table
{
PGM_P old_page_pointer ;
PGM_P new_page_pointer ;
unsigned char *auth_ptr ;
unsigned char *hdr_end_pointer ;
unsigned char http_auth : 1 ;
unsigned char http_header_type : 2 ;
unsigned char first_switch : 1 ;
unsigned char post : 1 ;
unsigned char *post_ptr ;
unsigned char *post_ready_ptr ;
#if USE_CAM
unsigned char cam : 2 ;
#endif //USE_CAM
};
//Prototypen
void httpd (unsigned char);
void httpd_init (void);
void httpd_stack_clear (unsigned char);
void httpd_header_check (unsigned char);
void httpd_data_send (unsigned char);
#endif //_HTTPD_H