Nut/OS  5.0.5
API Reference
mediatypes.h File Reference
#include <isc/list.h>
#include <pro/uhttp/uhttpd.h>
#include <pro/uhttp/streamio.h>
Include dependency graph for mediatypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _MEDIATYPE
 Media type entry structure. More...

Defines

#define MEDIATYPE_EXT_MAXLEN   8
#define MTFLAG_INITIAL   1

Typedefs

typedef struct _MEDIATYPE MEDIA_TYPE_ENTRY
 Media type entry structure type.
typedef int(* MEDIATYPE_HANDLER )(HTTPD_SESSION *, const MEDIA_TYPE_ENTRY *, const char *)

Functions

int MediaTypeInitDefaults (void)
 Initialize the default media types.
int HttpRegisterMediaType (char *ext, char *type, char *subtype, MEDIATYPE_HANDLER handler)
 Register a media type.
MEDIA_TYPE_ENTRYGetMediaTypeEntry (char *path)
 Retrieve the media type entry for a given file name.
int MediaTypeHandlerText (HTTPD_SESSION *hs, const MEDIA_TYPE_ENTRY *mt, const char *path)
 Default handler for text files.
int MediaTypeHandlerBinary (HTTPD_SESSION *hs, const MEDIA_TYPE_ENTRY *mt, const char *path)
 Default handler for binary files.

Define Documentation

#define MEDIATYPE_EXT_MAXLEN   8