Webserver+3d print

Dependents:   Nucleo

Committer:
Sergunb
Date:
Sat Feb 04 18:15:49 2017 +0000
Revision:
0:8918a71cdbe9
nothing else

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8918a71cdbe9 1 /**
Sergunb 0:8918a71cdbe9 2 * @file http_server_misc.h
Sergunb 0:8918a71cdbe9 3 * @brief HTTP server (miscellaneous functions)
Sergunb 0:8918a71cdbe9 4 *
Sergunb 0:8918a71cdbe9 5 * @section License
Sergunb 0:8918a71cdbe9 6 *
Sergunb 0:8918a71cdbe9 7 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
Sergunb 0:8918a71cdbe9 8 *
Sergunb 0:8918a71cdbe9 9 * This file is part of CycloneTCP Open.
Sergunb 0:8918a71cdbe9 10 *
Sergunb 0:8918a71cdbe9 11 * This program is free software; you can redistribute it and/or
Sergunb 0:8918a71cdbe9 12 * modify it under the terms of the GNU General Public License
Sergunb 0:8918a71cdbe9 13 * as published by the Free Software Foundation; either version 2
Sergunb 0:8918a71cdbe9 14 * of the License, or (at your option) any later version.
Sergunb 0:8918a71cdbe9 15 *
Sergunb 0:8918a71cdbe9 16 * This program is distributed in the hope that it will be useful,
Sergunb 0:8918a71cdbe9 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8918a71cdbe9 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8918a71cdbe9 19 * GNU General Public License for more details.
Sergunb 0:8918a71cdbe9 20 *
Sergunb 0:8918a71cdbe9 21 * You should have received a copy of the GNU General Public License
Sergunb 0:8918a71cdbe9 22 * along with this program; if not, write to the Free Software Foundation,
Sergunb 0:8918a71cdbe9 23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sergunb 0:8918a71cdbe9 24 *
Sergunb 0:8918a71cdbe9 25 * @author Oryx Embedded SARL (www.oryx-embedded.com)
Sergunb 0:8918a71cdbe9 26 * @version 1.7.6
Sergunb 0:8918a71cdbe9 27 **/
Sergunb 0:8918a71cdbe9 28
Sergunb 0:8918a71cdbe9 29 #ifndef _HTTP_SERVER_MISC_H
Sergunb 0:8918a71cdbe9 30 #define _HTTP_SERVER_MISC_H
Sergunb 0:8918a71cdbe9 31
Sergunb 0:8918a71cdbe9 32 //Dependencies
Sergunb 0:8918a71cdbe9 33 #include "http/http_server.h"
Sergunb 0:8918a71cdbe9 34
Sergunb 0:8918a71cdbe9 35 //HTTP server related functions
Sergunb 0:8918a71cdbe9 36 error_t httpReadRequestHeader(HttpConnection *connection);
Sergunb 0:8918a71cdbe9 37 error_t httpParseRequestLine(HttpConnection *connection, char_t *requestLine);
Sergunb 0:8918a71cdbe9 38
Sergunb 0:8918a71cdbe9 39 error_t httpReadHeaderField(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 40 char_t *buffer, size_t size, char_t *firstChar);
Sergunb 0:8918a71cdbe9 41
Sergunb 0:8918a71cdbe9 42 void httpParseHeaderField(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 43 const char_t *name, char_t *value);
Sergunb 0:8918a71cdbe9 44
Sergunb 0:8918a71cdbe9 45 void httpParseConnectionField(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 46 char_t *value);
Sergunb 0:8918a71cdbe9 47
Sergunb 0:8918a71cdbe9 48 void httpParseContentTypeField(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 49 char_t *value);
Sergunb 0:8918a71cdbe9 50
Sergunb 0:8918a71cdbe9 51 error_t httpReadChunkSize(HttpConnection *connection);
Sergunb 0:8918a71cdbe9 52
Sergunb 0:8918a71cdbe9 53 void httpInitResponseHeader(HttpConnection *connection);
Sergunb 0:8918a71cdbe9 54 error_t httpFormatResponseHeader(HttpConnection *connection, char_t *buffer);
Sergunb 0:8918a71cdbe9 55
Sergunb 0:8918a71cdbe9 56 error_t httpSend(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 57 const void *data, size_t length, uint_t flags);
Sergunb 0:8918a71cdbe9 58
Sergunb 0:8918a71cdbe9 59 error_t httpReceive(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 60 void *data, size_t size, size_t *received, uint_t flags);
Sergunb 0:8918a71cdbe9 61
Sergunb 0:8918a71cdbe9 62 void httpGetAbsolutePath(HttpConnection *connection,
Sergunb 0:8918a71cdbe9 63 const char_t *relative, char_t *absolute, size_t maxLen);
Sergunb 0:8918a71cdbe9 64
Sergunb 0:8918a71cdbe9 65 bool_t httpCompExtension(const char_t *filename, const char_t *extension);
Sergunb 0:8918a71cdbe9 66
Sergunb 0:8918a71cdbe9 67 error_t httpDecodePercentEncodedString(const char_t *input,
Sergunb 0:8918a71cdbe9 68 char_t *output, size_t outputSize);
Sergunb 0:8918a71cdbe9 69
Sergunb 0:8918a71cdbe9 70 void httpConvertArrayToHexString(const uint8_t *input,
Sergunb 0:8918a71cdbe9 71 size_t inputLength, char_t *output);
Sergunb 0:8918a71cdbe9 72
Sergunb 0:8918a71cdbe9 73 #endif
Sergunb 0:8918a71cdbe9 74