Rev

Rev 3215 | Details | Compare with Previous | Last modification | View Log | SVN | Bug Tracker

Rev Author Line No. Line
3227 filatov 1
/*!
2
 * \file      http_layer.hh
3
 * \brief     Header file for ITS HTTP protocol layer.
4
 * \author    ETSI STF549
5
 * \copyright ETSI Copyright Notification
6
 *            No part may be reproduced except as authorized by written permission.
7
 *            The copyright and the foregoing restriction extend to reproduction in all media.
8
 *            All rights reserved.
9
 * \version   0.1
10
 */
11
#pragma once
12
 
13
#include <memory>
14
 
15
#include "t_layer.hh"
16
 
17
#include "http_codec.hh"
18
 
19
namespace LibItsHttp__TestSystem {
20
  class HttpPort;
21
}
22
 
23
namespace LibItsHttp__TypesAndValues {
24
  class HttpMessage; //! Forward declaration of TITAN class
25
}
26
 
27
class OCTETSTRING; //! Forward declaration of TITAN class
28
 
29
/*!
30
 * \class http_layer
31
 * \brief  This class provides a factory class to create an tcp_layer class instance
32
 */
33
class http_layer : public t_layer<LibItsHttp__TestSystem::HttpPort> {
34
  params _params;
35
  http_codec _codec;
36
 
37
public: //! \publicsection
38
  /*!
39
   * \brief Specialised constructor
40
   *        Create a new instance of the http_layer class
41
   * \param[in] p_type \todo
42
   * \param[in] p_param \todo
43
   */
44
  http_layer() : t_layer(), _params() { };
45
  /*!
46
   * \brief Specialised constructor
47
   *        Create a new instance of the http_layer class
48
   * \param[in] p_type \todo
49
   * \param[in] p_param \todo
50
   */
51
  http_layer(const std::string& p_type, const std::string& p_param);
52
  /*!
53
   * \brief Default destructor
54
   */
55
  virtual ~http_layer() { };
56
 
57
  /*!
58
   * \fn void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param);
59
   * \brief Send HTTP message to the lower layers
60
   * \param[in] p_http_message The GeoNetworking message to be sent
61
   * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters
62
   */
63
  void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param);
64
 
65
  /*!
66
   * \virtual
67
   * \fn void send_data(OCTETSTRING& data, params& params);
68
   * \brief Send bytes formated data to the lower layers
69
   * \param[in] p_data The data to be sent
70
   * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters
71
   */
72
  virtual void send_data(OCTETSTRING& data, params& params);
73
  /*!
74
   * \virtual
75
   * \fn void receive_data(OCTETSTRING& data, params& params);
76
   * \brief Receive bytes formated data from the lower layers
77
   * \param[in] p_data The bytes formated data received
78
   * \param[in] p_params Some lower layers parameters values when data was received
79
   */
80
  virtual void receive_data(OCTETSTRING& data, params& info);
81
}; // End of class http_layer
82