Commit ac38ccbb authored by YannGarcia's avatar YannGarcia
Browse files

Finalizing addition of TITAN submodule and deleteion of LibIts

parent 8ac7f202
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@
#include "http_codec_emtel.hh"
#include "loggers.hh"

#include "LibHttpTypesAndValues.hh"
#include "LibHttp_TypesAndValues.hh"

namespace LibHttp_TestSystem {
namespace LibHttp__TestSystem {

  HttpPort::HttpPort(const char *par_port_name): HttpPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("HttpPort::outgoing_send") {
    // Nothing to do
@@ -92,7 +92,7 @@ namespace LibHttp_TestSystem {

  } // End of user_stop method

  void HttpPort::outgoing_send(const LibHttp_TypesAndValues::HttpMessage& send_par)
  void HttpPort::outgoing_send(const LibHttp__TypesAndValues::HttpMessage& send_par)
  {
    loggers::get_instance().log_msg(">>> HttpPort::outgoing_send: payload=", send_par);
    
@@ -103,7 +103,7 @@ namespace LibHttp_TestSystem {
    loggers::get_instance().set_stop_time(_time_key, duration);
  }

  void HttpPort::receiveMsg (const LibHttp_TypesAndValues::HttpMessage& p_ind, const params& p_params) {
  void HttpPort::receiveMsg (const LibHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params) {
    loggers::get_instance().log_msg(">>> HttpPort::receive_msg: ", p_ind);
    // Sanity check
    if (!p_ind.is_bound()) {
@@ -113,5 +113,5 @@ namespace LibHttp_TestSystem {
    incoming_message(p_ind);
  }
  
}
} // End of namespace LibHttp__TestSystem
+6 −6
Original line number Diff line number Diff line
#pragma once

#include "LibHttpTestSystem.hh"
#include "LibHttp_TestSystem.hh"

#include "layer.hh"
#include "params.hh"

namespace LibHttp_TypesAndValues {
namespace LibHttp__TypesAndValues {
  class HttpMessage;
}

namespace LibHttp_TestSystem {
namespace LibHttp__TestSystem {

  class HttpPort : public HttpPort_BASE {
    params _cfg_params;
@@ -21,7 +21,7 @@ namespace LibHttp_TestSystem {
    ~HttpPort();

    void set_parameter(const char *parameter_name, const char *parameter_value);
    void receiveMsg (const LibHttp_TypesAndValues::HttpMessage& p_ind, const params& p_params);
    void receiveMsg (const LibHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params);

  private:
    /* void Handle_Fd_Event(int fd, boolean is_readable,
@@ -39,8 +39,8 @@ namespace LibHttp_TestSystem {
    void user_stop();

  protected:
    void outgoing_send(const LibHttp_TypesAndValues::HttpMessage& send_par);
    void outgoing_send(const LibHttp__TypesAndValues::HttpMessage& send_par);
  }; // End of class HttpPort

}
} // End of namespace LibHttp__TestSystem
+6 −6
Original line number Diff line number Diff line
@@ -6,13 +6,13 @@

#include "loggers.hh"

#include "LibHttpXmlMessageBodyTypes.hh"
#include "LibHttp_XmlMessageBodyTypes.hh"

#include "urn_ietf_params_xml_ns_geopriv_held.hh"
#include "urn_ietf_params_xml_ns_pidf_geopriv10.hh"

// TODO Unify held_codec for bothHttp & Sip: instead of LibHttp_XmlMessageBodyTypes::XmlBody, use a generic XmlBody common to LibItsHttp & LibSip
int held_codec::encode (const LibHttp_XmlMessageBodyTypes::XmlBody& msg, OCTETSTRING& data)
// TODO Unify held_codec for bothHttp & Sip: instead of LibHttp__XmlMessageBodyTypes::XmlBody, use a generic XmlBody common to LibItsHttp & LibSip
int held_codec::encode (const LibHttp__XmlMessageBodyTypes::XmlBody& msg, OCTETSTRING& data)
{
  loggers::get_instance().log_msg(">>> held_codec::encode: ", (const Base_Type&)msg);

@@ -22,11 +22,11 @@ int held_codec::encode (const LibHttp_XmlMessageBodyTypes::XmlBody& msg, OCTETST
  
  CHARSTRING h("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n");
  encoding_buffer.put_s(h.lengthof(), (const unsigned char*)static_cast<const char*>(h));
  if (msg.ischosen(LibHttp_XmlMessageBodyTypes::XmlBody::ALT_locationRequest)) {
  if (msg.ischosen(LibHttp__XmlMessageBodyTypes::XmlBody::ALT_locationRequest)) {
    const urn__ietf__params__xml__ns__geopriv__held::LocationRequestType& location_request = msg.locationRequest();
    loggers::get_instance().log_msg("held_codec::encode: Process LocationRequestType", (const Base_Type&)location_request);
    location_request.encode(urn__ietf__params__xml__ns__geopriv__held::LocationRequest_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
  } else if  (msg.ischosen(LibHttp_XmlMessageBodyTypes::XmlBody::ALT_locationResponse)) {
  } else if  (msg.ischosen(LibHttp__XmlMessageBodyTypes::XmlBody::ALT_locationResponse)) {
    const urn__ietf__params__xml__ns__geopriv__held::LocationResponseType& location_response = msg.locationResponse();
    loggers::get_instance().log_msg("held_codec::encode: Process LocationResponseType", (const Base_Type&)location_response);
    location_response.encode(urn__ietf__params__xml__ns__geopriv__held::LocationResponse_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
@@ -90,7 +90,7 @@ int held_codec::encode (const LibHttp_XmlMessageBodyTypes::XmlBody& msg, OCTETST
  return 0;
}

int held_codec::decode (const OCTETSTRING& p_data, LibHttp_XmlMessageBodyTypes::XmlBody& msg, params* p_params)
int held_codec::decode (const OCTETSTRING& p_data, LibHttp__XmlMessageBodyTypes::XmlBody& msg, params* p_params)
{
  loggers::get_instance().log_msg(">>> held_codec::decode: p_data=", p_data);

+6 −6
Original line number Diff line number Diff line
#pragma once

#include "codec.hh"
#include "codec_gen.hh"
#include "params.hh"

class Base_Type;
class TTCN_Typedescriptor_t;
class TTCN_Buffer;

namespace LibHttp_XmlMessageBodyTypes {
namespace LibHttp__XmlMessageBodyTypes {
  class XmlBody;
}

class held_codec: public codec <LibHttp_XmlMessageBodyTypes::XmlBody, LibHttp_XmlMessageBodyTypes::XmlBody>
class held_codec: public codec_gen <LibHttp__XmlMessageBodyTypes::XmlBody, LibHttp__XmlMessageBodyTypes::XmlBody>
{
public:
  explicit held_codec() : codec<LibHttp_XmlMessageBodyTypes::XmlBody, LibHttp_XmlMessageBodyTypes::XmlBody>() { };
  explicit held_codec() : codec_gen<LibHttp__XmlMessageBodyTypes::XmlBody, LibHttp__XmlMessageBodyTypes::XmlBody>() { };
  virtual ~held_codec() { };

  virtual int encode (const LibHttp_XmlMessageBodyTypes::XmlBody&, OCTETSTRING& data);
  virtual int decode (const OCTETSTRING& p_data, LibHttp_XmlMessageBodyTypes::XmlBody&, params* p_params = NULL);
  virtual int encode (const LibHttp__XmlMessageBodyTypes::XmlBody&, OCTETSTRING& data);
  virtual int decode (const OCTETSTRING& p_data, LibHttp__XmlMessageBodyTypes::XmlBody&, params* p_params = NULL);

}; // End of class held_codec
+5 −5
Original line number Diff line number Diff line
/*!
 * \file      held_codec_factory.hh
 * \brief     Header file for HELD/IP protocol codec factory.
 * \brief     Header file for HELD/IP protocol codec_gen factory.
 * \author    ETSI STF525
 * \copyright ETSI Copyright Notification
 *            No part may be reproduced except as authorized by written permission.
@@ -26,21 +26,21 @@ public: //! \publicsection
  /*!
   * \brief Default constructor
   *        Create a new instance of the held_codec_factory class
   * \remark The HELD/IP codec identifier is HELD
   * \remark The HELD/IP codec_gen identifier is HELD
   */
  held_codec_factory() {
    // register factory
    codec_stack_builder::register_codec_factory("held_codec", this);
  };
  /*!
   * \fn codec* create_codec(const std::string & type, const std::string & param);
   * \fn codec_gen* create_codec(const std::string & type, const std::string & param);
   * \brief  Create the codecs stack based on the provided codecs stack description
   * \param[in] p_type The provided codecs stack description
   * \param[in] p_params Optional parameters
   * \return 0 on success, -1 otherwise
   * \inline
   */
  inline virtual codec<Record_Type, Record_Type>* create_codec() {
    return (codec<Record_Type, Record_Type>*)new held_codec();
  inline virtual codec_gen<Record_Type, Record_Type>* create_codec() {
    return (codec_gen<Record_Type, Record_Type>*)new held_codec();
  };
}; // End of class held_codec_factory
Loading