Functions | |
CHAR8 * | AsciiStrGetNextToken (IN CONST CHAR8 *String, IN CHAR8 Seperator) |
VOID | FreeHeaderFields (IN EFI_HTTP_HEADER *HeaderFields, IN UINTN FieldCount) |
EFI_HTTP_HEADER * | FindHttpHeader (IN EFI_HTTP_HEADER *HeaderFields, IN UINTN FieldCount, IN CHAR8 *FieldName) |
BOOLEAN | IsValidHttpHeader (IN CHAR8 *DeleteList[], IN UINTN DeleteCount, IN CHAR8 *FieldName) |
EFI_STATUS | SetFieldNameAndValue (IN EFI_HTTP_HEADER *HttpHeader, IN CHAR8 *FieldName, IN CHAR8 *FieldValue) |
CHAR8 * | GetFieldNameAndValue (IN CHAR8 *String, OUT CHAR8 **FieldName, OUT CHAR8 **FieldValue) |
Copyright (c) 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
CHAR8* AsciiStrGetNextToken | ( | IN CONST CHAR8 * | String, | |
IN CHAR8 | Seperator | |||
) |
Get the next string, which is distinguished by specified seperator.
[in] | String | Pointer to the string. |
[in] | Seperator | Specified seperator used to distinguish where is the beginning of next string. |
NULL if not find or String is NULL.
Referenced by GetFieldNameAndValue().
EFI_HTTP_HEADER* FindHttpHeader | ( | IN EFI_HTTP_HEADER * | HeaderFields, | |
IN UINTN | FieldCount, | |||
IN CHAR8 * | FieldName | |||
) |
Find required header field in HeaderFields.
[in] | HeaderFields | Pointer to array of key/value header pairs. |
[in] | FieldCount | The number of header pairs. |
[in] | FieldName | Pointer to header field's name. |
NULL if not find this required header field.
Referenced by HttpUtilitiesBuild().
VOID FreeHeaderFields | ( | IN EFI_HTTP_HEADER * | HeaderFields, | |
IN UINTN | FieldCount | |||
) |
Free existing HeaderFields.
[in] | HeaderFields | Pointer to array of key/value header pairs waitting for free. |
[in] | FieldCount | The number of header pairs in HeaderFields. |
Referenced by HttpUtilitiesBuild(), and HttpUtilitiesParse().
CHAR8* GetFieldNameAndValue | ( | IN CHAR8 * | String, | |
OUT CHAR8 ** | FieldName, | |||
OUT CHAR8 ** | FieldValue | |||
) |
Get one key/value header pair from the raw string.
[in] | String | Pointer to the raw string. |
[out] | FieldName | Pointer to header field's name. |
[out] | FieldValue | Pointer to header field's value. |
NULL if no key/value header pair from this raw string.
References AsciiStrGetNextToken().
Referenced by HttpUtilitiesParse().
BOOLEAN IsValidHttpHeader | ( | IN CHAR8 * | DeleteList[], | |
IN UINTN | DeleteCount, | |||
IN CHAR8 * | FieldName | |||
) |
Check whether header field called FieldName is in DeleteList.
[in] | DeleteList | Pointer to array of key/value header pairs. |
[in] | DeleteCount | The number of header pairs. |
[in] | FieldName | Pointer to header field's name. |
FALSE if FieldName is in DeleteList, that means this header field is invalid.
Referenced by HttpUtilitiesBuild().
EFI_STATUS SetFieldNameAndValue | ( | IN EFI_HTTP_HEADER * | HttpHeader, | |
IN CHAR8 * | FieldName, | |||
IN CHAR8 * | FieldValue | |||
) |
Set FieldName and FieldValue into specified HttpHeader.
[in] | HttpHeader | Specified HttpHeader. |
[in] | FieldName | FieldName of this HttpHeader. |
[in] | FieldValue | FieldValue of this HttpHeader. |
EFI_SUCCESS | The FieldName and FieldValue are set into HttpHeader successfully. | |
EFI_OUT_OF_RESOURCES | Failed to allocate resources. |
Referenced by HttpUtilitiesBuild(), and HttpUtilitiesParse().