Documentation

Horde_Mapi
in package

Utility functions for dealing with Microsoft MAPI structures.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

copyright

2009-2017 Horde LLC (http://www.horde.org)

author

Michael J Rubinsky mrubinsk@horde.org

Table of Contents

chbo()  : int
Change the byte order of a number. Used to allow big endian machines to decode the timezone blobs, which are encoded in little endian order.
createGoid()  : string
Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29
filetimeToUnixtime()  : int
Converts a Windows FILETIME value to a unix timestamp.
getUidFromGoid()  : string
Obtain the UID from a MAPI GOID.
isLittleEndian()  : bool
Determine if the current machine is little endian.
_flipEndian()  : mixed
_hexToBcint()  : mixed
_win64ToUnix()  : mixed

Methods

chbo()

Change the byte order of a number. Used to allow big endian machines to decode the timezone blobs, which are encoded in little endian order.

public static chbo(int $num) : int
Parameters
$num : int

The number to reverse.

Return values
int

The number, in the reverse byte order.

createGoid()

Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29

public static createGoid(string $uid[, mixed $options = array() ]) : string
Parameters
$uid : string

The UID value to encode.

$options : mixed = array()
Return values
string

A Base64 encoded GOID

filetimeToUnixtime()

Converts a Windows FILETIME value to a unix timestamp.

public static filetimeToUnixtime(string $ft) : int

Adapted from: http://stackoverflow.com/questions/610603/help-me-translate-long-value-expressed-in-hex-back-in-to-a-date-time

Parameters
$ft : string

Binary representation of FILETIME from a pTypDate MAPI property.

Tags
throws
Horde_Mapi_Exception
Return values
int

The unix timestamp.

getUidFromGoid()

Obtain the UID from a MAPI GOID.

public static getUidFromGoid(string $goid) : string

See http://msdn.microsoft.com/en-us/library/hh338153%28v=exchg.80%29.aspx

Parameters
$goid : string

Base64 encoded Global Object Identifier.

Return values
string

The UID

isLittleEndian()

Determine if the current machine is little endian.

public static isLittleEndian() : bool
Return values
bool

True if endianness is little endian, otherwise false.

_flipEndian()

protected static _flipEndian(mixed $str) : mixed
Parameters
$str : mixed
Return values
mixed

_hexToBcint()

protected static _hexToBcint(mixed $str) : mixed
Parameters
$str : mixed
Return values
mixed

_win64ToUnix()

protected static _win64ToUnix(mixed $bci) : mixed
Parameters
$bci : mixed
Return values
mixed

Search results