Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions _pjsua.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,26 +1253,6 @@ static PyObject *py_pjsua_transport_get_info(PyObject *pSelf, PyObject *pArgs)
}
}

/*
* py_pjsua_transport_set_enable
*/
static PyObject *py_pjsua_transport_set_enable(PyObject *pSelf,
PyObject *pArgs)
{
pj_status_t status;
int id;
int enabled;

PJ_UNUSED_ARG(pSelf);

if (!PyArg_ParseTuple(pArgs, "ii", &id, &enabled)) {
return NULL;
}
status = pjsua_transport_set_enable(id, enabled);

return Py_BuildValue("i", status);
}

/*
* py_pjsua_transport_close
*/
Expand Down Expand Up @@ -1306,14 +1286,6 @@ static char pjsua_transport_get_info_doc[] =
"void _pjsua.transport_get_info "
"(_pjsua.Transport_ID id, _pjsua.Transport_Info info) "
"Get information about transports.";
static char pjsua_transport_set_enable_doc[] =
"void _pjsua.transport_set_enable "
"(_pjsua.Transport_ID id, int enabled) "
"Disable a transport or re-enable it. "
"By default transport is always enabled after it is created. "
"Disabling a transport does not necessarily close the socket, "
"it will only discard incoming messages and prevent the transport "
"from being used to send outgoing messages.";
static char pjsua_transport_close_doc[] =
"void _pjsua.transport_close (_pjsua.Transport_ID id, int force) "
"Close the transport. If transport is forcefully closed, "
Expand Down Expand Up @@ -4072,10 +4044,6 @@ static PyMethodDef py_pjsua_methods[] =
"transport_get_info", py_pjsua_transport_get_info, METH_VARARGS,
pjsua_transport_get_info_doc
},
{
"transport_set_enable", py_pjsua_transport_set_enable, METH_VARARGS,
pjsua_transport_set_enable_doc
},
{
"transport_close", py_pjsua_transport_close, METH_VARARGS,
pjsua_transport_close_doc
Expand Down
12 changes: 0 additions & 12 deletions pjsua.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,18 +604,6 @@ def info(self):
self._lib._err_check("info()", self, -1, "Invalid transport")
return TransportInfo(ti)

def enable(self):
"""Enable this transport."""
lck = self._lib.auto_lock()
err = _pjsua.transport_set_enable(self._id, True)
self._lib._err_check("enable()", self, err)

def disable(self):
"""Disable this transport."""
lck = self._lib.auto_lock()
err = _pjsua.transport_set_enable(self._id, 0)
self._lib._err_check("disable()", self, err)

def close(self, force=False):
"""Close and destroy this transport.

Expand Down