Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
108:18a3702650f3
Parent:
106:a34fcf9f0e02
Child:
109:a5b8264ffbbc
--- a/call_box.cpp	Mon Mar 16 14:05:05 2015 +0000
+++ b/call_box.cpp	Wed Mar 18 13:33:54 2015 +0000
@@ -240,7 +240,7 @@
         this->sip->status = status;
     }else{
         if( debug_cb) debug_msg("Sip equals NULL o.O");
-    }        
+    }
 }
 
 void Call_Box::re_start_timer( void ){
@@ -296,4 +296,42 @@
 int Call_Box::get_sip_port( void ){ return this->sip->get_port(); }
 
 
-int Call_Box::get_timer( void ){ return t.read(); }
\ No newline at end of file
+int Call_Box::get_timer( void ){ return t.read(); }
+
+int Call_Box::get_rtp_port ( void )
+{
+    if( this->sip != NULL ){
+        return this->sip->get_sip_rtp_port();
+    }else{
+        if( debug_cb) debug_msg("Sip equals NULL o.O");
+        return -1;
+    }
+}
+
+void Call_Box::set_rtp_port ( int new_rtp_port )
+{
+    if( this->sip != NULL ){
+        this->sip->set_sip_rtp_port( new_rtp_port );
+    }
+}
+
+void Call_Box::init_rtp_timer ( void )
+{
+    this->rtp_timer.start();   
+}
+
+void Call_Box::reset_rtp_timer ( void )
+{
+    this->rtp_timer.stop();
+    this->rtp_timer.reset();
+}
+
+bool Call_Box::is_rtp_timer_timeout ( void )
+{
+    return ( rtp_timer.read () > RTP_REQUEST_PORT_TIMEOUT ) ? true : false;  
+}
+
+int Call_Box::get_rtp_timer ( void )
+{
+    return ( rtp_timer.read () );
+}
\ No newline at end of file