NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesImpl.c File Reference


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)

Detailed Description

The functions for HttpUtilities driver.

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.


Function Documentation

CHAR8* AsciiStrGetNextToken ( IN CONST CHAR8 *  String,
IN CHAR8  Seperator 
)

Get the next string, which is distinguished by specified seperator.

Parameters:
[in] String Pointer to the string.
[in] Seperator Specified seperator used to distinguish where is the beginning of next string.
Returns:
Pointer to the 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.

Parameters:
[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.
Returns:
Pointer to the queried header field.

NULL if not find this required header field.

Referenced by HttpUtilitiesBuild().

VOID FreeHeaderFields ( IN EFI_HTTP_HEADER *  HeaderFields,
IN UINTN  FieldCount 
)

Free existing HeaderFields.

Parameters:
[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.

Parameters:
[in] String Pointer to the raw string.
[out] FieldName Pointer to header field's name.
[out] FieldValue Pointer to header field's value.
Returns:
Pointer to the next raw string.

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.

Parameters:
[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.
Returns:
TRUE if FieldName is not in DeleteList, that means this header field is valid.

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.

Parameters:
[in] HttpHeader Specified HttpHeader.
[in] FieldName FieldName of this HttpHeader.
[in] FieldValue FieldValue of this HttpHeader.
Return values:
EFI_SUCCESS The FieldName and FieldValue are set into HttpHeader successfully.
EFI_OUT_OF_RESOURCES Failed to allocate resources.

Referenced by HttpUtilitiesBuild(), and HttpUtilitiesParse().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1