Xively Official / mbed-libxively-5d6fdd4

Dependents:   xively-jumpstart-demo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers http_layer_parser.h Source File

http_layer_parser.h

Go to the documentation of this file.
00001 // Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved.
00002 // This is part of Xively C library, it is under the BSD 3-Clause license.
00003 
00004 /**
00005  * \file    http_layer_parser.h
00006  * \author  Olgierd Humenczuk
00007  * \brief   Our simple HTTP parser
00008  */
00009 
00010 #ifndef __HTTP_LAYER_PARSER_H__
00011 #define __HTTP_LAYER_PARSER_H__
00012 
00013 #include "xi_macros.h"
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 /**
00020  * \brief  This function takes the pointer to the `http_response_t` structure and
00021  *         fills it with parsed data from the give buffer.
00022  *
00023  *    While the parser looks at headers, satus line and content, it populates given
00024  *    pointer to `http_response_t`.
00025  *
00026  * \return Pointer or null if an error occurred.
00027  *
00028  * \note   It currently won't work against partial data.
00029  */
00030 http_response_t* parse_http( http_response_t* response, const char* data );
00031 
00032 #ifdef __cplusplus
00033 }
00034 #endif
00035 
00036 #endif