From a3bbd2d78cfde6c165335dd073ccbad952d6bdd7 Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Wed, 27 Feb 2013 07:15:57 +0000 Subject: Re #1616: symbian port of ioqueue & timer git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4374 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/ioqueue_symbian.cpp | 13 +++++++++++++ pjlib/src/pj/timer_symbian.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) (limited to 'pjlib') diff --git a/pjlib/src/pj/ioqueue_symbian.cpp b/pjlib/src/pj/ioqueue_symbian.cpp index f945b2b9..12646214 100644 --- a/pjlib/src/pj/ioqueue_symbian.cpp +++ b/pjlib/src/pj/ioqueue_symbian.cpp @@ -528,6 +528,19 @@ PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool, return PJ_SUCCESS; } +PJ_DEF(pj_status_t) pj_ioqueue_register_sock2(pj_pool_t *pool, + pj_ioqueue_t *ioqueue, + pj_sock_t sock, + pj_grp_lock_t *grp_lock, + void *user_data, + const pj_ioqueue_callback *cb, + pj_ioqueue_key_t **p_key) +{ + PJ_UNUSED_ARG(grp_lock); + + return pj_ioqueue_register_sock(pool, ioqueue, sock, user_data, cb, p_key); +} + /* * Unregister from the I/O Queue framework. */ diff --git a/pjlib/src/pj/timer_symbian.cpp b/pjlib/src/pj/timer_symbian.cpp index ca40a667..4b1d61ba 100644 --- a/pjlib/src/pj/timer_symbian.cpp +++ b/pjlib/src/pj/timer_symbian.cpp @@ -392,6 +392,24 @@ PJ_DEF(pj_status_t) pj_timer_heap_schedule( pj_timer_heap_t *ht, return PJ_SUCCESS; } +PJ_DEF(pj_status_t) pj_timer_heap_schedule_w_grp_lock(pj_timer_heap_t *ht, + pj_timer_entry *entry, + const pj_time_val *delay, + int id_val, + pj_grp_lock_t *grp_lock) +{ + pj_status_t status; + + PJ_UNUSED_ARG(grp_lock); + + status = pj_timer_heap_schedule(ht, entry, delay); + + if (status == PJ_SUCCESS) + entry->id = id_val; + + return status; +} + PJ_DEF(int) pj_timer_heap_cancel( pj_timer_heap_t *ht, pj_timer_entry *entry) { @@ -411,6 +429,17 @@ PJ_DEF(int) pj_timer_heap_cancel( pj_timer_heap_t *ht, } } +PJ_DEF(int) pj_timer_heap_cancel_if_active(pj_timer_heap_t *ht, + pj_timer_entry *entry, + int id_val) +{ + int count = pj_timer_heap_cancel(ht, entry); + if (count == 1) + entry->id = id_val; + + return count; +} + PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, pj_time_val *next_delay ) { -- cgit v1.2.3