Internet Middleware API Reference  Rev 1.0
httpd.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __HTTPD_H__
36 #define __HTTPD_H__
37 
128 #include <stdio.h>
129 #include "FreeRTOS.h"
130 #include "task.h"
131 #include "queue.h"
132 
140 typedef enum
141 {
146 }HTTPD_RESULT;
147 
151 typedef enum
152 {
157 }HTTPD_STATUS;
158 
162 typedef enum
163 {
169 
181 typedef struct
182 {
183  char str_ip_addr[16];
184  char str_port[6];
185  QueueHandle_t fb_queue;
186 }httpd_para;
187 
191 typedef struct
192 {
195 }httpd_fb;
196 
201 #ifdef __cplusplus
202 extern "C"
203 {
204 #endif
205 
229 
316 
391 
423 
424 #ifdef __cplusplus
425 }
426 #endif
427 
432 #endif /* __HTTPD_H__ */
433 
The server execution is stopping.
Definition: httpd.h:155
The user requested the server to stop.
Definition: httpd.h:167
The server execution is in progress.
Definition: httpd.h:154
HTTPD_RESULT
HTTPD result, defines the API return type.
Definition: httpd.h:140
The server did not initiate.
Definition: httpd.h:144
A feedback structure for the HTTP server, provides a feedback when the status is changed.
Definition: httpd.h:191
HTTPD_STOP_REASON reason
The server has stopped with a status of HTTPD_STATUS_STOP.
Definition: httpd.h:194
The operation completed successfully.
Definition: httpd.h:142
HTTPD_STATUS
HTTPD status, indicates the status of the HTTP server.
Definition: httpd.h:151
HTTPD_STATUS httpd_get_status(void)
This function queries the HTTP server&#39;s status.
HTTPD_RESULT httpd_init(void)
This function initiates the HTTP server.
There is not enough memory available for the server operation.
Definition: httpd.h:164
The server execution has stopped.
Definition: httpd.h:156
Configuration parameter details of the HTTP server.
Definition: httpd.h:181
HTTPD_RESULT httpd_stop(void)
This function stops the HTTP server.
HTTPD_STOP_REASON
HTTPD stop reason, indicates the reason why the HTTP server has stopped.
Definition: httpd.h:162
HTTPD_STATUS status
The HTTP server&#39;s status.
Definition: httpd.h:193
QueueHandle_t fb_queue
The queue handle to receive the server&#39;s feedback.
Definition: httpd.h:185
The socket create or bind failed.
Definition: httpd.h:165
HTTPD_RESULT httpd_start(httpd_para *parameter)
This function starts the HTTP server.
The listen socket pipe is broken.
Definition: httpd.h:166
The user needs to wait for a feedback or polling status update.
Definition: httpd.h:143
The operation cannot be completed, the server queue is full.
Definition: httpd.h:145
The server did not initiate.
Definition: httpd.h:153