summaryrefslogtreecommitdiff
path: root/pjlib/include/pj
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include/pj')
-rw-r--r--pjlib/include/pj/activesock.h15
-rw-r--r--pjlib/include/pj/compat/os_auto.h.in8
2 files changed, 21 insertions, 2 deletions
diff --git a/pjlib/include/pj/activesock.h b/pjlib/include/pj/activesock.h
index c7fc908e..1ebb5a2e 100644
--- a/pjlib/include/pj/activesock.h
+++ b/pjlib/include/pj/activesock.h
@@ -302,6 +302,21 @@ PJ_DECL(pj_status_t) pj_activesock_create_udp(pj_pool_t *pool,
*/
PJ_DECL(pj_status_t) pj_activesock_close(pj_activesock_t *asock);
+#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \
+ PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0
+/**
+ * Set iPhone OS background mode setting. Setting to 1 will enable TCP
+ * active socket to receive incoming data when application is in the
+ * background. Setting to 0 will disable it. Default value of this
+ * setting is PJ_ACTIVESOCK_TCP_IPHONE_OS_BG.
+ *
+ * @param asock The active socket.
+ * @param val The value of background mode setting.
+ *
+ */
+PJ_DECL(void) pj_activesock_set_iphone_os_bg(pj_activesock_t *asock,
+ int val);
+#endif
/**
* Associate arbitrary data with the active socket. Application may
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in
index 6fe3276e..5c5f74bf 100644
--- a/pjlib/include/pj/compat/os_auto.h.in
+++ b/pjlib/include/pj/compat/os_auto.h.in
@@ -169,13 +169,17 @@
/* The type of atomic variable value: */
#undef PJ_ATOMIC_VALUE_TYPE
-/* Append ".local" suffix to the system's hostname? */
#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0
# include "TargetConditionals.h"
# if TARGET_OS_IPHONE
# include "Availability.h"
# ifdef __IPHONE_4_0
-# define PJ_GETHOSTNAME_APPEND_LOCAL_SUFFIX 1
+ /* Append ".local" suffix to the system's hostname? (see ticket #1104) */
+# define PJ_GETHOSTNAME_APPEND_LOCAL_SUFFIX 1
+ /* Is multitasking support available? (see ticket #1107) */
+# define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1
+ /* Enable activesock TCP background mode support */
+# define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1
# endif
# endif
#endif