ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

Public Member Functions | Private Member Functions | List of all members
HttpCodec Class Reference

`#include <HttpCodec.hh>`

Inheritance diagram for HttpCodec:

## Public Member Functions
| HttpCodec ()
virtual | ~HttpCodec ()
virtual int | encode (const LibItsHttp__TypesAndValues::HttpMessage &, OCTETSTRING &data)
| Encode typed message into an octet string. More...
virtual int | decode (const OCTETSTRING &data, LibItsHttp__TypesAndValues::HttpMessage &, Params *params=NULL)
| Encode typed message into an octet string format. More...
Public Member Functions inherited from Codec< LibItsHttp__TypesAndValues::HttpMessage, LibItsHttp__TypesAndValues::HttpMessage >
| Codec ()
| Reference to Params stack. More...
virtual | ~Codec ()
| Default destructor . More...

## Private Member Functions
int | encode_request (const LibItsHttp__TypesAndValues::Request &p_request, TTCN_Buffer &p_encoding_buffer)
int | decode_headers (TTCN_Buffer &decoding_buffer, LibItsHttp__TypesAndValues::HeaderLines &headers)
int | decode_header (CHARSTRING &header_line, LibItsHttp__TypesAndValues::HeaderLine &header)
int | decode_body (TTCN_Buffer &decoding_buffer, CHARSTRING &body)
int | get_line (TTCN_Buffer &buffer, CHARSTRING &to, const bool concatenate_header_lines=false)

## Additional Inherited Members
Protected Attributes inherited from Codec< LibItsHttp__TypesAndValues::HttpMessage, LibItsHttp__TypesAndValues::HttpMessage >
Params * | _params

## Constructor & Destructor Documentation

## ◆ HttpCodec()

HttpCodec::HttpCodec | ( |  | ) |
| inline explicit

## ◆ ~HttpCodec()

virtual HttpCodec::~HttpCodec | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ decode()

int HttpCodec::decode | ( | const OCTETSTRING & | p_,
|  | LibItsHttp__TypesAndValues::HttpMessage & | p_message,
|  | Params * | p_params = `NULL`
| ) |  |
| virtual

Encode typed message into an octet string format.

Parameters

  [in] | p_data | The message in its octet string
  [out] | p_message | The decoded typed message

Returns
  0 on success, -1 otherwise

Implements Codec< LibItsHttp__TypesAndValues::HttpMessage, LibItsHttp__TypesAndValues::HttpMessage >.

## ◆ decode_body()

int HttpCodec::decode_body | ( | TTCN_Buffer & | decoding_buffer,
|  | CHARSTRING & | body
| ) |  |
| private

## ◆ decode_header()

int HttpCodec::decode_header | ( | CHARSTRING & | header_line,
|  | LibItsHttp__TypesAndValues::HeaderLine & | header
| ) |  |
| private

## ◆ decode_headers()

int HttpCodec::decode_headers | ( | TTCN_Buffer & | decoding_buffer,
|  | LibItsHttp__TypesAndValues::HeaderLines & | headers
| ) |  |
| private

## ◆ encode()

int HttpCodec::encode | ( | const LibItsHttp__TypesAndValues::HttpMessage & | msg,
|  | OCTETSTRING & | data
| ) |  |
| virtual

Encode typed message into an octet string.

Parameters

  [in] | p_message | The typed message to be encoded
  [out] | p_data | The encoding result

Returns
  0 on success, -1 otherwise

Implements Codec< LibItsHttp__TypesAndValues::HttpMessage, LibItsHttp__TypesAndValues::HttpMessage >.

## ◆ encode_request()

int HttpCodec::encode_request | ( | const LibItsHttp__TypesAndValues::Request & | p_request,
|  | TTCN_Buffer & | p_encoding_buffer
| ) |  |
| private

## ◆ get_line()

int HttpCodec::get_line | ( | TTCN_Buffer & | buffer,
|  | CHARSTRING & | to,
|  | const bool | concatenate_header_lines = `false`
| ) |  |
| private

The documentation for this class was generated from the following files:

- /home/vagrant/TriesAndDelete/etsi_its/framework/include/HttpCodec.hh
- /home/vagrant/TriesAndDelete/etsi_its/framework/src/HttpCodec.cc