Commit a434f16c authored by Garcia's avatar Garcia
Browse files

Add SIP framework, start development based on GNU oSip external library

parent 48ce9483
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line

#include "LibItsHttp_MessageBodyTypes.hh"

#include "http_codec.hh"

#include "loggers.hh"

namespace LibItsHttp__EncdecDeclarations {

    BITSTRING fx__enc__http__message(const LibItsHttp__TypesAndValues::HttpMessage& p) {
      loggers::get_instance().log_msg(">>> fx__enc__http__message: ", (const Base_Type&)p);

        OCTETSTRING os;
        http_codec codec;
        codec.encode(p, os);

        return oct2bit(os);
    }
    INTEGER fx__dec__http__message(BITSTRING& pdu, LibItsHttp__TypesAndValues::HttpMessage& p) {
        loggers::get_instance().log_msg(">>> fx__dec__http__message: ", pdu);

        OCTETSTRING os = bit2oct(pdu);
        http_codec codec;
        codec.decode(os, p);

        return 0;
    }
} // End of namespace LibItsHttp__EncdecDeclarations
+58 −0
Original line number Diff line number Diff line

#include "LibSip_EncdecDeclarations.hh"
#include "LibSip_XMLTypes.hh"

#include "sip_codec_register_request.hh"

#include "loggers.hh"

namespace LibSip__EncdecDeclarations {

    BITSTRING fx__enc__Request(const LibSip__SIPTypesAndValues::Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__REGISTER__Request(const LibSip__SIPTypesAndValues::REGISTER__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__INVITE__Request(const LibSip__SIPTypesAndValues::INVITE__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__OPTIONS__Request(const LibSip__SIPTypesAndValues::OPTIONS__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__BYE__Request(const LibSip__SIPTypesAndValues::BYE__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__CANCEL__Request(const LibSip__SIPTypesAndValues::CANCEL__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__ACK__Request(const LibSip__SIPTypesAndValues::ACK__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__PRACK__Request(const LibSip__SIPTypesAndValues::PRACK__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__NOTIFY__Request(const LibSip__SIPTypesAndValues::NOTIFY__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__SUBSCRIBE__Request(const LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__PUBLISH__Request(const LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__UPDATE__Request(const LibSip__SIPTypesAndValues::UPDATE__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__REFER__Request(const LibSip__SIPTypesAndValues::REFER__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__MESSAGE__Request(const LibSip__SIPTypesAndValues::MESSAGE__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__INFO__Request(const LibSip__SIPTypesAndValues::INFO__Request& p) { return BITSTRING(); }
    BITSTRING fx__enc__Response(const LibSip__SIPTypesAndValues::Response& p) { return BITSTRING(); }
    BITSTRING fx__enc__Raw(const CHARSTRING& p) { return BITSTRING(); }
    BITSTRING fx__enc__SMS(const LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& pdu) { return BITSTRING(); }
    BITSTRING fx__enc__MessageBody(const LibSip__MessageBodyTypes::MessageBody& pdu) { return BITSTRING(); }
    INTEGER fx__dec__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::Request& p) { return INTEGER(0); }

    INTEGER fx__dec__REGISTER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REGISTER__Request& p) {
        loggers::get_instance().log_msg(">>> fx__dec__REGISTER__Request: ", pdu);

        OCTETSTRING os = bit2oct(pdu);
        sip_codec_register_request codec;
        codec.decode(os, p);

        return 0;
    }

    INTEGER fx__dec__INVITE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INVITE__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__OPTIONS__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::OPTIONS__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__BYE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::BYE__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__CANCEL__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::CANCEL__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__ACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::ACK__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__PRACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PRACK__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__NOTIFY__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::NOTIFY__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__SUBSCRIBE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__PUBLISH__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__UPDATE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::UPDATE__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__REFER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REFER__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__MESSAGE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::MESSAGE__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__INFO__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INFO__Request& p) { return INTEGER(0); }
    INTEGER fx__dec__Response(BITSTRING& pdu, LibSip__SIPTypesAndValues::Response& p) { return INTEGER(0); }
    INTEGER fx__dec__SMS(BITSTRING& pdu, LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& p) { return INTEGER(0); }
    INTEGER fx__dec__MessageBody(BITSTRING& pdu, LibSip__MessageBodyTypes::MessageBody& p) { return INTEGER(0); }
} // End of namespace LibSip__EncdecDeclarations
+9 −0
Original line number Diff line number Diff line
#include "LibSip_SMSFunctions.hh"

#include "loggers.hh"

namespace LibSip__SMSFunctions {

  HEXSTRING fx__GetSC__TimeStamp(const INTEGER& p__TimeZone) { return int2hex(0, 14); };

} // End of namespace LibSip__SMSFunctions
+12 −0
Original line number Diff line number Diff line
#include "LibSip_Steps.hh"

#include "loggers.hh"

namespace LibSip__Steps {

  CHARSTRING fx__rndStr() { return CHARSTRING(""); };
  CHARSTRING fx__putInLowercase(const CHARSTRING& p__string) { return CHARSTRING(""); };
  CHARSTRING fx__getIpAddr(const CHARSTRING& p__host__name) { return CHARSTRING(""); };
  CHARSTRING fx__calculateDigestResponse(const CHARSTRING& p__nonce, const CHARSTRING& p__cnonce, const CHARSTRING& p__user, const CHARSTRING& p__realm, const CHARSTRING& p__passwd, const CHARSTRING& p__alg, const CHARSTRING& p__nonceCount, const CHARSTRING& p__method, const CHARSTRING& p__qop, const CHARSTRING& p__URI, const CHARSTRING& p__HEntity) { return CHARSTRING(""); };

} // End of namespace LibSip__Steps
+9 −0
Original line number Diff line number Diff line
#include "LibSip_Templates.hh"

#include "loggers.hh"

namespace LibSip__Templates {

  INTEGER fx__calculateXMLBodyLen(const LibSip__XMLTypes::XmlBody& p__mb) { return INTEGER(0); };

} // End of namespace LibSip__Templates
Loading