Move MGCP_CodecPort to library directory
diff --git a/mgw/MGCP_CodecPort.ttcn b/mgw/MGCP_CodecPort.ttcn
deleted file mode 100644
index 06072af..0000000
--- a/mgw/MGCP_CodecPort.ttcn
+++ /dev/null
@@ -1,65 +0,0 @@
-module MGCP_CodecPort {
-
- import from IPL4asp_PortType all;
- import from IPL4asp_Types all;
- import from MGCP_Types all;
-
- type record MGCP_RecvFrom {
- ConnectionId connId,
- HostName remName,
- PortNumber remPort,
- HostName locName,
- PortNumber locPort,
- MgcpMessage msg
- };
-
- template MGCP_RecvFrom t_MGCP_RecvFrom(template MgcpMessage msg) := {
- connId := ?,
- remName := ?,
- remPort := ?,
- locName := ?,
- locPort := ?,
- msg := msg
- }
-
- type record MGCP_Send {
- ConnectionId connId,
- MgcpMessage msg
- }
-
- template MGCP_Send t_MGCP_Send(template ConnectionId connId, template MgcpMessage msg) := {
- connId := connId,
- msg := msg
- }
-
- private function IPL4_to_MGCP_RecvFrom(in ASP_RecvFrom pin, out MGCP_RecvFrom pout) {
- pout.connId := pin.connId;
- pout.remName := pin.remName;
- pout.remPort := pin.remPort;
- pout.locName := pin.locName;
- pout.locPort := pin.locPort;
- /* FIXME: This should actually be the below:
- pout.msg := dec_MgcpMessage(oct2char(pin.msg)); - see
- https://www.eclipse.org/forums/index.php/t/1088893/
- */
- pout.msg := { response := dec_MgcpResponse(oct2char(pin.msg)) };
- } with { extension "prototype(fast)" };
-
- private function MGCP_to_IPL4_Send(in MGCP_Send pin, out ASP_Send pout) {
- pout.connId := pin.connId;
- pout.proto := { udp := {} };
- pout.msg := char2oct(enc_MgcpMessage(pin.msg));
- } with { extension "prototype(fast)" };
-
- type port MGCP_CODEC_PT message {
- out MGCP_Send;
- in MGCP_RecvFrom,
- ASP_ConnId_ReadyToRelease,
- ASP_Event;
- } with { extension "user IPL4asp_PT
- out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send))
- in(ASP_RecvFrom -> MGCP_RecvFrom: function(IPL4_to_MGCP_RecvFrom);
- ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
- ASP_Event -> ASP_Event: simple)"
- }
-}
diff --git a/mgw/MGCP_CodecPort_CtrlFunct.ttcn b/mgw/MGCP_CodecPort_CtrlFunct.ttcn
deleted file mode 100644
index bc18a70..0000000
--- a/mgw/MGCP_CodecPort_CtrlFunct.ttcn
+++ /dev/null
@@ -1,44 +0,0 @@
-module MGCP_CodecPort_CtrlFunct {
-
- import from MGCP_CodecPort all;
- import from IPL4asp_Types all;
-
- external function f_IPL4_listen(
- inout MGCP_CODEC_PT portRef,
- in HostName locName,
- in PortNumber locPort,
- in ProtoTuple proto,
- in OptionList options := {}
- ) return Result;
-
- external function f_IPL4_connect(
- inout MGCP_CODEC_PT portRef,
- in HostName remName,
- in PortNumber remPort,
- in HostName locName,
- in PortNumber locPort,
- in ConnectionId connId,
- in ProtoTuple proto,
- in OptionList options := {}
- ) return Result;
-
- external function f_IPL4_close(
- inout MGCP_CODEC_PT portRef,
- in ConnectionId id,
- in ProtoTuple proto := { unspecified := {} }
- ) return Result;
-
- external function f_IPL4_setUserData(
- inout MGCP_CODEC_PT portRef,
- in ConnectionId id,
- in UserData userData
- ) return Result;
-
- external function f_IPL4_getUserData(
- inout MGCP_CODEC_PT portRef,
- in ConnectionId id,
- out UserData userData
- ) return Result;
-
-}
-
diff --git a/mgw/MGCP_CodecPort_CtrlFunctDef.cc b/mgw/MGCP_CodecPort_CtrlFunctDef.cc
deleted file mode 100644
index 92dc6fc..0000000
--- a/mgw/MGCP_CodecPort_CtrlFunctDef.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "IPL4asp_PortType.hh"
-#include "MGCP_CodecPort.hh"
-#include "IPL4asp_PT.hh"
-
-namespace MGCP__CodecPort__CtrlFunct {
-
- IPL4asp__Types::Result f__IPL4__listen(
- MGCP__CodecPort::MGCP__CODEC__PT& portRef,
- const IPL4asp__Types::HostName& locName,
- const IPL4asp__Types::PortNumber& locPort,
- const IPL4asp__Types::ProtoTuple& proto,
- const IPL4asp__Types::OptionList& options)
- {
- return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options);
- }
-
- IPL4asp__Types::Result f__IPL4__connect(
- MGCP__CodecPort::MGCP__CODEC__PT& portRef,
- const IPL4asp__Types::HostName& remName,
- const IPL4asp__Types::PortNumber& remPort,
- const IPL4asp__Types::HostName& locName,
- const IPL4asp__Types::PortNumber& locPort,
- const IPL4asp__Types::ConnectionId& connId,
- const IPL4asp__Types::ProtoTuple& proto,
- const IPL4asp__Types::OptionList& options)
- {
- return f__IPL4__PROVIDER__connect(portRef, remName, remPort,
- locName, locPort, connId, proto, options);
- }
-
- IPL4asp__Types::Result f__IPL4__close(
- MGCP__CodecPort::MGCP__CODEC__PT& portRef,
- const IPL4asp__Types::ConnectionId& connId,
- const IPL4asp__Types::ProtoTuple& proto)
- {
- return f__IPL4__PROVIDER__close(portRef, connId, proto);
- }
-
- IPL4asp__Types::Result f__IPL4__setUserData(
- MGCP__CodecPort::MGCP__CODEC__PT& portRef,
- const IPL4asp__Types::ConnectionId& connId,
- const IPL4asp__Types::UserData& userData)
- {
- return f__IPL4__PROVIDER__setUserData(portRef, connId, userData);
- }
-
- IPL4asp__Types::Result f__IPL4__getUserData(
- MGCP__CodecPort::MGCP__CODEC__PT& portRef,
- const IPL4asp__Types::ConnectionId& connId,
- IPL4asp__Types::UserData& userData)
- {
- return f__IPL4__PROVIDER__getUserData(portRef, connId, userData);
- }
-
-}
-
diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh
index 554d575..bbfcc1d 100755
--- a/mgw/gen_links.sh
+++ b/mgw/gen_links.sh
@@ -37,5 +37,5 @@
gen_links $DIR $FILES
DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn"
+FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc"
gen_links $DIR $FILES