Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
363 johboh 1
/*********************************************************************
2
 *
3
 *               HTTP definitions on Microchip TCP/IP Stack
4
 *
5
 *********************************************************************
6
 * FileName:        Http.h
7
 * Dependencies:    None
8
 * Processor:       PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F
9
 * Complier:        Microchip C18 v3.02 or higher
10
 *                  Microchip C30 v2.01 or higher
11
 * Company:         Microchip Technology, Inc.
12
 *
13
 * Software License Agreement
14
 *
15
 * This software is owned by Microchip Technology Inc. ("Microchip")
16
 * and is supplied to you for use exclusively as described in the
17
 * associated software agreement.  This software is protected by
18
 * software and other intellectual property laws.  Any use in
19
 * violation of the software license may subject the user to criminal
20
 * sanctions as well as civil liability.  Copyright 2006 Microchip
21
 * Technology Inc.  All rights reserved.
22
 *
23
 * This software is provided "AS IS."  MICROCHIP DISCLAIMS ALL
24
 * WARRANTIES, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, NOT LIMITED
25
 * TO MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
26
 * INFRINGEMENT.  Microchip shall in no event be liable for special,
27
 * incidental, or consequential damages.
28
 *
29
 *
30
 * Author               Date    Comment
31
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
 * Nilesh Rajbharti     8/14/01 Original (Rev. 1.0)
33
 * Nilesh Rajbharti     2/9/02  Cleanup
34
 * Nilesh Rajbharti     5/22/02 Rev 2.0 (See version.log for detail)
35
********************************************************************/
36
 
37
#ifndef HTTP_H
38
#define HTTP_H
39
 
40
#define HTTP_PORT               (80)
41
 
42
#define HTTP_START_OF_VAR       (0x0000)
43
#define HTTP_END_OF_VAR         (0xFFFF)
44
 
45
 
46
/*********************************************************************
47
 * Function:        void HTTPInit(void)
48
 *
49
 * PreCondition:    TCP must already be initialized.
50
 *
51
 * Input:           None
52
 *
53
 * Output:          HTTP FSM and connections are initialized
54
 *
55
 * Side Effects:    None
56
 *
57
 * Overview:        Set all HTTP connections to Listening state.
58
 *                  Initialize FSM for each connection.
59
 *
60
 * Note:            This function is called only one during lifetime
61
 *                  of the application.
62
 ********************************************************************/
63
void HTTPInit(void);
64
 
65
 
66
/*********************************************************************
67
 * Function:        void HTTPServer(void)
68
 *
69
 * PreCondition:    HTTPInit() must already be called.
70
 *
71
 * Input:           None
72
 *
73
 * Output:          Opened HTTP connections are served.
74
 *
75
 * Side Effects:    None
76
 *
77
 * Overview:        Browse through each connections and let it
78
 *                  handle its connection.
79
 *                  If a connection is not finished, do not process
80
 *                  next connections.  This must be done, all
81
 *                  connections use some static variables that are
82
 *                  common.
83
 *
84
 * Note:            This function acts as a task (similar to one in
85
 *                  RTOS).  This function performs its task in
86
 *                  co-operative manner.  Main application must call
87
 *                  this function repeatdly to ensure all open
88
 *                  or new connections are served on time.
89
 ********************************************************************/
90
void HTTPServer(void);
91
 
92
#if defined(THIS_IS_HTTP_SERVER)
93
    /*
94
     * Main application must implement these callback functions
95
     * to complete Http.c implementation.
96
     */
97
    extern void HTTPExecCmd(BYTE** argv, BYTE argc);
98
#endif
99
 
100
 
101
#endif