summaryrefslogtreecommitdiff
path: root/lib/ext/Syncroton/Registry.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext/Syncroton/Registry.php')
-rw-r--r--lib/ext/Syncroton/Registry.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/ext/Syncroton/Registry.php b/lib/ext/Syncroton/Registry.php
index 5460f96..f67e2d3 100644
--- a/lib/ext/Syncroton/Registry.php
+++ b/lib/ext/Syncroton/Registry.php
@@ -36,6 +36,7 @@ class Syncroton_Registry extends ArrayObject
const DEFAULT_POLICY = 'default_policy';
const PING_TIMEOUT = 'ping_timeout';
+ const PING_INTERVAL = 'ping_interval';
const QUIET_TIME = 'quiet_time';
const DATABASE = 'database';
@@ -242,6 +243,20 @@ class Syncroton_Registry extends ArrayObject
}
/**
+ * Return maximum ping interval (HeartbeatInterval) value (in seconds)
+ *
+ * @return int
+ */
+ public static function getPingInterval()
+ {
+ if (!self::isRegistered(self::PING_INTERVAL)) {
+ return 3540; // 59 minutes limit defined in Activesync protocol spec.
+ }
+
+ return self::get(self::PING_INTERVAL);
+ }
+
+ /**
* return ping timeout
*
* sleep "ping timeout" seconds between folder checks in Ping and Sync command