Documentation

Horde_ActiveSync_Policies
in package

Horde_ActiveSync_Policies:: Wraps all functionality related to generating the XML or WBXML for EAS Policies.

Tags
license

http://www.horde.org/licenses/gpl GPLv2

copyright

2010-2020 Horde LLC (http://www.horde.org)

author

Michael J Rubinsky mrubinsk@horde.org

Table of Contents

POLICY_AEFVALUE  = 'MaxInactivityTimeDeviceLock'
POLICY_ALLOW_BLUETOOTH  = 'AllowBluetooth'
POLICY_ALLOW_BROWSER  = 'AllowBrowser'
POLICY_ALLOW_CAMERA  = 'AllowCamera'
POLICY_ALLOW_HTML  = 'AllowHTMLEmail'
POLICY_ALLOW_POPIMAP  = 'AllowPOPIMAPEmail'
POLICY_ALLOW_SDCARD  = 'AllowStorageCard'
POLICY_ALLOW_SMS  = 'AllowTextMessaging'
POLICY_ALLOW_WIFI  = 'AllowWiFi'
POLICY_ATC  = 'AttachmentsEnabled'
POLICY_CODEFREQ  = 'codewordfrequency'
POLICY_COMPLEXITY  = 'AlphanumericDevicePasswordRequired'
POLICY_DEVICE_ENCRYPTION  = 'RequireDeviceEncryption'
POLICY_ENCRYPTION  = 'DeviceEncryptionEnabled'
POLICY_MAX_EMAIL_AGE  = 'MaxEmailAgeFilter'
POLICY_MAXATCSIZE  = 'MaxAttachmentSize'
POLICY_MAXFAILEDATTEMPTS  = 'MaxDevicePasswordFailedAttempts'
POLICY_MINLENGTH  = 'MinDevicePasswordLength'
POLICY_PIN  = 'DevicePasswordEnabled'
POLICY_REQUIRE_SMIME_ENCRYPTED  = 'RequireEncryptedSMIMEMessages'
POLICY_REQUIRE_SMIME_SIGNED  = 'RequireSignedSMIMEMessages'
POLICY_ROAMING_NOPUSH  = 'RequireManualSyncWhenRoaming'
$_defaults  : array<string|int, mixed>
Default policy values used in both 12.0 and 12.1
$_defaults_twelve  : array<string|int, mixed>
Deafaults for 12.0 policies.
$_defaults_twelveone  : array<string|int, mixed>
Defaults used only in 12.1
$_encoder  : Horde_ActiveSync_Wbxml_Encoder
Output stream
$_overrides  : array<string|int, mixed>
Explicitly set policies.
$_policies  : array<string|int, mixed>
Local cache of all policies to send.
$_version  : long
EAS version to support.
__construct()  : mixed
Const'r
getAvailablePolicies()  : array<string|int, mixed>
Return a list of all configurable policy names.
toWbxml()  : mixed
Output the policies as WBXML. Used in EAS Versions >= 12.0
toXml()  : mixed
Output the policies as XML. Only used in EAS Version 2.5. This method only outputs the 2.5 compatible policies.
validatePolicyVersion()  : bool
Determine if the requested policy settings are available for the current version being used.
_getPolicies()  : mixed
_sendPolicy()  : mixed
Output a single policy value

Constants

POLICY_AEFVALUE

public mixed POLICY_AEFVALUE = 'MaxInactivityTimeDeviceLock'

POLICY_ALLOW_BLUETOOTH

public mixed POLICY_ALLOW_BLUETOOTH = 'AllowBluetooth'

POLICY_ALLOW_BROWSER

public mixed POLICY_ALLOW_BROWSER = 'AllowBrowser'

POLICY_ALLOW_CAMERA

public mixed POLICY_ALLOW_CAMERA = 'AllowCamera'

POLICY_ALLOW_HTML

public mixed POLICY_ALLOW_HTML = 'AllowHTMLEmail'

POLICY_ALLOW_POPIMAP

public mixed POLICY_ALLOW_POPIMAP = 'AllowPOPIMAPEmail'

POLICY_ALLOW_SDCARD

public mixed POLICY_ALLOW_SDCARD = 'AllowStorageCard'

POLICY_ALLOW_SMS

public mixed POLICY_ALLOW_SMS = 'AllowTextMessaging'

POLICY_ALLOW_WIFI

public mixed POLICY_ALLOW_WIFI = 'AllowWiFi'

POLICY_ATC

public mixed POLICY_ATC = 'AttachmentsEnabled'

POLICY_CODEFREQ

public mixed POLICY_CODEFREQ = 'codewordfrequency'

POLICY_COMPLEXITY

public mixed POLICY_COMPLEXITY = 'AlphanumericDevicePasswordRequired'

POLICY_DEVICE_ENCRYPTION

public mixed POLICY_DEVICE_ENCRYPTION = 'RequireDeviceEncryption'

POLICY_ENCRYPTION

public mixed POLICY_ENCRYPTION = 'DeviceEncryptionEnabled'

POLICY_MAX_EMAIL_AGE

public mixed POLICY_MAX_EMAIL_AGE = 'MaxEmailAgeFilter'

POLICY_MAXATCSIZE

public mixed POLICY_MAXATCSIZE = 'MaxAttachmentSize'

POLICY_MAXFAILEDATTEMPTS

public mixed POLICY_MAXFAILEDATTEMPTS = 'MaxDevicePasswordFailedAttempts'

POLICY_MINLENGTH

public mixed POLICY_MINLENGTH = 'MinDevicePasswordLength'

POLICY_PIN

public mixed POLICY_PIN = 'DevicePasswordEnabled'

POLICY_REQUIRE_SMIME_ENCRYPTED

public mixed POLICY_REQUIRE_SMIME_ENCRYPTED = 'RequireEncryptedSMIMEMessages'

POLICY_REQUIRE_SMIME_SIGNED

public mixed POLICY_REQUIRE_SMIME_SIGNED = 'RequireSignedSMIMEMessages'

POLICY_ROAMING_NOPUSH

public mixed POLICY_ROAMING_NOPUSH = 'RequireManualSyncWhenRoaming'

Properties

$_defaults

Default policy values used in both 12.0 and 12.1

protected array<string|int, mixed> $_defaults = array(self::POLICY_PIN => \false, self::POLICY_AEFVALUE => '0', self::POLICY_MAXFAILEDATTEMPTS => '5', self::POLICY_CODEFREQ => '0', self::POLICY_MINLENGTH => '5')

$_defaults_twelve

Deafaults for 12.0 policies.

protected array<string|int, mixed> $_defaults_twelve = array(self::POLICY_ATC => '1', self::POLICY_ENCRYPTION => '0', self::POLICY_MAXATCSIZE => '5000000', self::POLICY_COMPLEXITY => '0')

$_defaults_twelveone

Defaults used only in 12.1

protected array<string|int, mixed> $_defaults_twelveone = array( // 1 == Allow/Yes, 0 == Disallow/No. self::POLICY_ALLOW_SDCARD => '1', self::POLICY_ALLOW_CAMERA => '1', self::POLICY_ALLOW_SMS => '1', self::POLICY_ALLOW_WIFI => '1', self::POLICY_ALLOW_BLUETOOTH => '1', self::POLICY_ALLOW_POPIMAP => '1', self::POLICY_ALLOW_BROWSER => '1', self::POLICY_REQUIRE_SMIME_ENCRYPTED => '0', self::POLICY_REQUIRE_SMIME_SIGNED => '0', self::POLICY_DEVICE_ENCRYPTION => '0', self::POLICY_ALLOW_HTML => '1', self::POLICY_MAX_EMAIL_AGE => '0', self::POLICY_ROAMING_NOPUSH => '0', )

$_overrides

Explicitly set policies.

protected array<string|int, mixed> $_overrides

$_policies

Local cache of all policies to send.

protected array<string|int, mixed> $_policies = array()

$_version

EAS version to support.

protected long $_version

Methods

__construct()

Const'r

public __construct([Horde_ActiveSync_Wbxml_Encoder $encoder = null ][, float $version = Horde_ActiveSync::VERSION_TWELVEONE ][, array<string|int, mixed> $policies = array() ]) : mixed
Parameters
$encoder : Horde_ActiveSync_Wbxml_Encoder = null

The output stream encoder

$version : float = Horde_ActiveSync::VERSION_TWELVEONE

The EAS Version.

$policies : array<string|int, mixed> = array()

The policy array.

Return values
mixed

getAvailablePolicies()

Return a list of all configurable policy names.

public getAvailablePolicies() : array<string|int, mixed>
Return values
array<string|int, mixed>

toWbxml()

Output the policies as WBXML. Used in EAS Versions >= 12.0

public toWbxml() : mixed
Return values
mixed

toXml()

Output the policies as XML. Only used in EAS Version 2.5. This method only outputs the 2.5 compatible policies.

public toXml() : mixed
Tags
throws
Horde_ActiveSync_Exception
Return values
mixed

validatePolicyVersion()

Determine if the requested policy settings are available for the current version being used.

public validatePolicyVersion() : bool
Return values
bool

True if policies are available in current version, false otherwise.

_getPolicies()

protected _getPolicies() : mixed
Return values
mixed

_sendPolicy()

Output a single policy value

protected _sendPolicy(string $policy, mixed $value[, bool $nodefault = false ]) : mixed
Parameters
$policy : string

The policy name

$value : mixed

The policy value

$nodefault : bool = false

Don't send the policy if the value is default.

Return values
mixed

Search results