Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Flash-storage database management
This module implements a database for static content, which is either stored on Flash or read-only memory of some kind. More...
Data Structures | |
| struct | FlashDBContent |
| A structure to hold all data about content which was found in a database lookup. More... | |
Functions | |
| void | FlashDB_Init () |
| Initialize the flash database module. | |
| int | FlashDB_FindContentType (uint16 index, struct HttpBlob *pResult) |
| Find a content-type in the database. | |
| int | FlashDB_FindContent (struct HttpBlob pResource, struct FlashDBContent *pResult) |
| Lookup content in the database, given a resource identifier. | |
Detailed Description
This module implements a database for static content, which is either stored on Flash or read-only memory of some kind.
The database is pre-compiled using external tools and is stored as a "flat file" in memory. The contents of the database are:
- A list of content-type strings
- A sorted-list of static content entities. Each entity has:
- URL Resource of the content (sort and lookup key)
- Content type number (index into the list of content-types)
- Content binary data
- Additional metadata flags (Compressed, Requires-authentication)
Function Documentation
| int FlashDB_FindContent | ( | struct HttpBlob | pResource, |
| struct FlashDBContent * | pResult | ||
| ) |
Lookup content in the database, given a resource identifier.
- Parameters:
-
pResource The resource as given in the HTTP request [out] pResult Returns the content and its metadata
- Returns:
- nonzero if successful. zero if such a resource was not found.
Definition at line 184 of file FlashDB.cpp.
| int FlashDB_FindContentType | ( | uint16 | index, |
| struct HttpBlob * | pResult | ||
| ) |
Find a content-type in the database.
- Parameters:
-
index The index of the content type in the database [out] pResult Returns the string and its length
- Returns:
- nonzero if successful. zero if index out of range.
Definition at line 163 of file FlashDB.cpp.
| void FlashDB_Init | ( | ) |
Initialize the flash database module.
- Parameters:
-
pDatabase Pointer to the beginning of the database in flash memory
Definition at line 152 of file FlashDB.cpp.
Generated on Wed Jul 13 2022 13:30:51 by
1.7.2