TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HttpStatic.h Source File

HttpStatic.h

00001 //*****************************************************************************
00002 // Copyright (C) 2014 Texas Instruments Incorporated
00003 //
00004 // All rights reserved. Property of Texas Instruments Incorporated.
00005 // Restricted rights to use, duplicate or disclose this code are
00006 // granted through contract.
00007 // The program may not be used without the written permission of
00008 // Texas Instruments Incorporated or against the terms and conditions
00009 // stipulated in the agreement under which this program has been supplied,
00010 // and under no circumstances can it be used with non-TI connectivity device.
00011 //
00012 //*****************************************************************************
00013 
00014 #ifndef _HTTP_STATIC_H_
00015 #define _HTTP_STATIC_H_
00016 
00017 #include "HttpConfig.h"
00018 
00019 #ifdef HTTP_CORE_ENABLE_STATIC
00020 
00021 /**
00022  * @defgroup HttpStatic Static request handler module
00023  * This module implements static content processing for HTTP requests.
00024  * All requests are handled by looking up the URL's resource in the flash database, and returning the content in the response.
00025  * Note this module is only compiled if HTTP_CORE_ENABLE_STATIC is defined in HttpConfig.h
00026  *
00027  * @{
00028  */
00029 
00030 #include "HttpRequest.h"
00031 
00032 #ifdef  __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 /**
00037  * Initialize HttpStatic module state for a new request, and identify the request
00038  * This function examines the specified resource string, and looks it up in the Flash Database.
00039  * If found, it commits to process this request by returning nonzero. Otherwise it returns zero.
00040  * @param uConnection The number of the connection. This value is guaranteed to satisfy: 0 <= uConnection < HTTP_CORE_MAX_CONNECTIONS
00041  * @param resource The resource part of the URL, as specified by the browser in the request, including any query string (and hash).
00042  *                 Note: The resource string exists ONLY during the call to this function. The string pointer should not be copied by this function.
00043  * @return nonzero if request is to be handled by this module. zero if not.
00044  */
00045 int HttpStatic_InitRequest(UINT16 uConnection, struct HttpBlob resource);
00046 
00047 /**
00048  * Process a static-content HTTP request
00049  * This function is called after a request was already initialized, and a Flash content entry was identified during a call to HttpStatic_InitRequest()
00050  * This function calls HttpResponse_*() to send the content data to the browser.
00051  * @param request Pointer to all data available about the request
00052  * @return nonzero if request was handled. zero if not.
00053  */
00054 int HttpStatic_ProcessRequest(struct HttpRequest* request);
00055 
00056 /// @}
00057 
00058 #ifdef  __cplusplus
00059 }
00060 #endif /* __cplusplus */
00061 
00062 #endif // HTTP_CORE_ENABLE_STATIC
00063 
00064 #endif // _HTTP_STATIC_H_
00065