提交 d647132a authored 作者: Michael Jerris's avatar Michael Jerris

swigall (ESL-20)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14751 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 e96aee95
...@@ -129,48 +129,53 @@ class ESLconnection { ...@@ -129,48 +129,53 @@ class ESLconnection {
return ESLconnection_connected($this->_cPtr); return ESLconnection_connected($this->_cPtr);
} }
function __construct() { function getInfo() {
$this->_cPtr=ESLconnection_getInfo($this->_cPtr); $r=ESLconnection_getInfo($this->_cPtr);
return is_resource($r) ? new ESLevent($r) : $r;
} }
function send($cmd) { function send($cmd) {
return ESLconnection_send($this->_cPtr,$cmd); return ESLconnection_send($this->_cPtr,$cmd);
} }
function __construct($cmd) { function sendRecv($cmd) {
$this->_cPtr=ESLconnection_sendRecv($this->_cPtr,$cmd); $r=ESLconnection_sendRecv($this->_cPtr,$cmd);
return is_resource($r) ? new ESLevent($r) : $r;
} }
function __construct($cmd,$arg=null) { function api($cmd,$arg=null) {
switch (func_num_args()) { switch (func_num_args()) {
case 1: $r=ESLconnection_api($this->_cPtr,$cmd); break; case 1: $r=ESLconnection_api($this->_cPtr,$cmd); break;
default: $r=ESLconnection_api($this->_cPtr,$cmd,$arg); default: $r=ESLconnection_api($this->_cPtr,$cmd,$arg);
} }
$this->_cPtr=$r; return is_resource($r) ? new ESLevent($r) : $r;
} }
function __construct($cmd,$arg=null) { function bgapi($cmd,$arg=null) {
switch (func_num_args()) { switch (func_num_args()) {
case 1: $r=ESLconnection_bgapi($this->_cPtr,$cmd); break; case 1: $r=ESLconnection_bgapi($this->_cPtr,$cmd); break;
default: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg); default: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg);
} }
$this->_cPtr=$r; return is_resource($r) ? new ESLevent($r) : $r;
} }
function sendEvent($send_me) { function sendEvent($send_me) {
return ESLconnection_sendEvent($this->_cPtr,$send_me); return ESLconnection_sendEvent($this->_cPtr,$send_me);
} }
function __construct() { function recvEvent() {
$this->_cPtr=ESLconnection_recvEvent($this->_cPtr); $r=ESLconnection_recvEvent($this->_cPtr);
return is_resource($r) ? new ESLevent($r) : $r;
} }
function __construct($ms) { function recvEventTimed($ms) {
$this->_cPtr=ESLconnection_recvEventTimed($this->_cPtr,$ms); $r=ESLconnection_recvEventTimed($this->_cPtr,$ms);
return is_resource($r) ? new ESLevent($r) : $r;
} }
function __construct($header,$value) { function filter($header,$value) {
$this->_cPtr=ESLconnection_filter($this->_cPtr,$header,$value); $r=ESLconnection_filter($this->_cPtr,$header,$value);
return is_resource($r) ? new ESLevent($r) : $r;
} }
function events($etype,$value) { function events($etype,$value) {
......
差异被折叠。
...@@ -1902,7 +1902,7 @@ SWIG_ruby_failed(void) ...@@ -1902,7 +1902,7 @@ SWIG_ruby_failed(void)
} }
/*@SWIG:/usr/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ /*@SWIG:/usr/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
{ {
VALUE obj = args[0]; VALUE obj = args[0];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论