Back to index

d-push  2.0
Static Public Member Functions | Public Attributes | Static Private Member Functions | Static Private Attributes
ZPush Class Reference

List of all members.

Static Public Member Functions

static CheckConfig ()
 Verifies configuration.
static CheckAdvancedConfig ()
 Verifies Timezone, StateMachine and Backend configuration.
static GetStateMachine ()
 Returns the StateMachine object which has to be an IStateMachine implementation.
static GetDeviceManager ($initialize=true)
 Returns the DeviceManager object.
static GetTopCollector ()
 Returns the Top data collector object.
static IncludeBackend ($backendname)
 Loads a backend file.
static GetSearchProvider ()
 Returns the SearchProvider object which has to be an ISearchProvider implementation.
static GetBackend ()
 Returns the Backend for this request the backend has to be an IBackend implementation.
static GetAdditionalSyncFolders ()
 Returns additional folder objects which should be synchronized to the device.
static GetAdditionalSyncFolderStore ($folderid, $noDebug=false)
 Returns additional folder objects which should be synchronized to the device.
static getSyncObjectFromFolderClass ($folderclass)
 Returns a SyncObject class name for a folder class.
static getDefaultFolderTypeFromFolderClass ($folderclass)
 Returns the default foldertype for a folder class.
static GetFolderClassFromFolderType ($foldertype)
 Returns the folder class for a foldertype.
static PrintZPushLegal ($message="", $additionalMessage="")
 Prints the Z-Push legal header to STDOUT Using this breaks ActiveSync synchronization if wbxml is expected.
static GetLatestSupportedASVersion ()
 Indicates the latest AS version supported by Z-Push.
static GetSupportedASVersion ()
 Indicates which is the highest AS version supported by the backend.
static GetServerHeader ()
 Returns AS server header.
static GetSupportedProtocolVersions ($valueOnly=false)
 Returns AS protocol versions which are supported.
static GetSupportedCommands ()
 Returns AS commands which are supported.
static GetRequestHandlerForCommand ($commandCode)
 Loads and instantiates a request processor for a command.
static CommandNeedsAuthentication ($commandCode)
 Indicates if a commands requires authentication or not.
static CommandNeedsProvisioning ($commandCode)
 Indicates if the Provisioning check has to be forced on these commands.
static CommandNeedsPlainInput ($commandCode)
 Indicates if these commands expect plain text input instead of wbxml.
static HierarchyCommand ($commandCode)
 Indicates if the comand to be executed operates on the hierarchy.

Public Attributes

const UNAUTHENTICATED = 1
const UNPROVISIONED = 2
const NOACTIVESYNCCOMMAND = 3
const WEBSERVICECOMMAND = 4
const HIERARCHYCOMMAND = 5
const PLAININPUT = 6
const REQUESTHANDLER = 7
const CLASS_NAME = 1
const CLASS_REQUIRESPROTOCOLVERSION = 2
const CLASS_DEFAULTTYPE = 3
const CLASS_OTHERTYPES = 4
const ASV_1 = "1.0"
const ASV_2 = "2.0"
const ASV_21 = "2.1"
const ASV_25 = "2.5"
const ASV_12 = "12.0"
const ASV_121 = "12.1"
const ASV_14 = "14.0"
const COMMAND_SYNC = 0
 Command codes for base64 encoded requests (AS >= 12.1)
const COMMAND_SENDMAIL = 1
const COMMAND_SMARTFORWARD = 2
const COMMAND_SMARTREPLY = 3
const COMMAND_GETATTACHMENT = 4
const COMMAND_FOLDERSYNC = 9
const COMMAND_FOLDERCREATE = 10
const COMMAND_FOLDERDELETE = 11
const COMMAND_FOLDERUPDATE = 12
const COMMAND_MOVEITEMS = 13
const COMMAND_GETITEMESTIMATE = 14
const COMMAND_MEETINGRESPONSE = 15
const COMMAND_SEARCH = 16
const COMMAND_SETTINGS = 17
const COMMAND_PING = 18
const COMMAND_ITEMOPERATIONS = 19
const COMMAND_PROVISION = 20
const COMMAND_RESOLVERECIPIENTS = 21
const COMMAND_VALIDATECERT = 22
const COMMAND_GETHIERARCHY = -1
const COMMAND_CREATECOLLECTION = -2
const COMMAND_DELETECOLLECTION = -3
const COMMAND_MOVECOLLECTION = -4
const COMMAND_NOTIFY = -5
const COMMAND_WEBSERVICE_DEVICE = -100

Static Private Member Functions

static checkCommandOptions ($commandCode, $option)
 Checks access types of a command.

Static Private Attributes

static $supportedASVersions
static $supportedCommands
static $classes
static $stateMachine
static $searchProvider
static $deviceManager
static $topCollector
static $backend
static $addSyncFolders

Detailed Description

Definition at line 45 of file zpush.php.


Member Function Documentation

static ZPush::CheckAdvancedConfig ( ) [static]

Verifies Timezone, StateMachine and Backend configuration.

public

Returns:
boolean FatalMisconfigurationException

Definition at line 250 of file zpush.php.

                                                 {
        global $specialLogUsers, $additionalFolders;

        if (!is_array($specialLogUsers))
            throw new FatalMisconfigurationException("The WBXML log users is not an array.");

        if (!defined('SINK_FORCERECHECK')) {
            define('SINK_FORCERECHECK', 300);
        }
        else if (SINK_FORCERECHECK !== false && (!is_int(SINK_FORCERECHECK) || SINK_FORCERECHECK < 1))
            throw new FatalMisconfigurationException("The SINK_FORCERECHECK value must be 'false' or a number higher than 0.");

        // the check on additional folders will not throw hard errors, as this is probably changed on live systems
        if (isset($additionalFolders) && !is_array($additionalFolders))
            ZLog::Write(LOGLEVEL_ERROR, "ZPush::CheckConfig() : The additional folders synchronization not available as array.");
        else {
            self::$addSyncFolders = array();

            // process configured data
            foreach ($additionalFolders as $af) {

                if (!is_array($af) || !isset($af['store']) || !isset($af['folderid']) || !isset($af['name']) || !isset($af['type'])) {
                    ZLog::Write(LOGLEVEL_ERROR, "ZPush::CheckConfig() : the additional folder synchronization is not configured correctly. Missing parameters. Entry will be ignored.");
                    continue;
                }

                if ($af['store'] == "" || $af['folderid'] == "" || $af['name'] == "" || $af['type'] == "") {
                    ZLog::Write(LOGLEVEL_WARN, "ZPush::CheckConfig() : the additional folder synchronization is not configured correctly. Empty parameters. Entry will be ignored.");
                    continue;
                }

                if (!in_array($af['type'], array(SYNC_FOLDER_TYPE_USER_CONTACT, SYNC_FOLDER_TYPE_USER_APPOINTMENT, SYNC_FOLDER_TYPE_USER_TASK, SYNC_FOLDER_TYPE_USER_MAIL))) {
                    ZLog::Write(LOGLEVEL_ERROR, sprintf("ZPush::CheckConfig() : the type of the additional synchronization folder '%s is not permitted.", $af['name']));
                    continue;
                }

                $folder = new SyncFolder();
                $folder->serverid = $af['folderid'];
                $folder->parentid = 0;                  // only top folders are supported
                $folder->displayname = $af['name'];
                $folder->type = $af['type'];
                // save store as custom property which is not streamed directly to the device
                $folder->NoBackendFolder = true;
                $folder->Store = $af['store'];
                self::$addSyncFolders[$folder->serverid] = $folder;
            }

        }

        ZLog::Write(LOGLEVEL_DEBUG, sprintf("Used timezone '%s'", date_default_timezone_get()));

        // get the statemachine, which will also try to load the backend.. This could throw errors
        self::GetStateMachine();
    }

Here is the call graph for this function:

static ZPush::checkCommandOptions ( commandCode,
option 
) [static, private]

Checks access types of a command.

Parameters:
string$commandCodea commandCode
string$optione.g. self::UNAUTHENTICATED

private

Exceptions:
FatalNotImplementedException
Returns:
object StateMachine

Definition at line 746 of file zpush.php.

                                                                       {
        if ($commandCode === false) return false;

        if (!array_key_exists($commandCode, self::$supportedCommands))
            throw new FatalNotImplementedException(sprintf("Command '%s' is not supported", Utils::GetCommandFromCode($commandCode)));

        $capa = self::$supportedCommands[$commandCode];
        $defcapa = in_array($option, $capa, true);

        // if not looking for a default capability, check if the command is supported since a previous AS version
        if (!$defcapa) {
            $verkey = array_search($option, self::$supportedASVersions, true);
            if ($verkey !== false && ($verkey >= array_search($capa[0], self::$supportedASVersions))) {
                $defcapa = true;
            }
        }

        return $defcapa;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::CheckConfig ( ) [static]

Verifies configuration.

public

Returns:
boolean
Exceptions:
FatalMisconfigurationException

Definition at line 193 of file zpush.php.

                                         {
        // check the php version
        if (version_compare(phpversion(),'5.1.0') < 0)
            throw new FatalException("The configured PHP version is too old. Please make sure at least PHP 5.1 is used.");

        // some basic checks
        if (!defined('BASE_PATH'))
            throw new FatalMisconfigurationException("The BASE_PATH is not configured. Check if the config.php file is in place.");

        if (substr(BASE_PATH, -1,1) != "/")
            throw new FatalMisconfigurationException("The BASE_PATH should terminate with a '/'");

        if (!file_exists(BASE_PATH))
            throw new FatalMisconfigurationException("The configured BASE_PATH does not exist or can not be accessed.");

        if (defined('BASE_PATH_CLI') && file_exists(BASE_PATH_CLI))
            define('REAL_BASE_PATH', BASE_PATH_CLI);
        else
            define('REAL_BASE_PATH', BASE_PATH);

        if (!defined('LOGFILEDIR'))
            throw new FatalMisconfigurationException("The LOGFILEDIR is not configured. Check if the config.php file is in place.");

        if (substr(LOGFILEDIR, -1,1) != "/")
            throw new FatalMisconfigurationException("The LOGFILEDIR should terminate with a '/'");

        if (!file_exists(LOGFILEDIR))
            throw new FatalMisconfigurationException("The configured LOGFILEDIR does not exist or can not be accessed.");

        if (!touch(LOGFILE))
            throw new FatalMisconfigurationException("The configured LOGFILE can not be modified.");

        if (!touch(LOGERRORFILE))
            throw new FatalMisconfigurationException("The configured LOGFILE can not be modified.");

        // set time zone
        // code contributed by Robert Scheck (rsc) - more information: https://developer.berlios.de/mantis/view.php?id=479
        if(function_exists("date_default_timezone_set")) {
            if(defined('TIMEZONE') ? constant('TIMEZONE') : false) {
                if (! @date_default_timezone_set(TIMEZONE))
                    throw new FatalMisconfigurationException(sprintf("The configured TIMEZONE '%s' is not valid. Please check supported timezones at http://www.php.net/manual/en/timezones.php", constant('TIMEZONE')));
            }
            else if(!ini_get('date.timezone')) {
                date_default_timezone_set('Europe/Amsterdam');
            }
        }

        return true;
    }
static ZPush::CommandNeedsAuthentication ( commandCode) [static]

Indicates if a commands requires authentication or not.

Parameters:
int$commandCodepublic
Returns:
boolean

Definition at line 688 of file zpush.php.

                                                                    {
        $stat = ! self::checkCommandOptions($commandCode, self::UNAUTHENTICATED);
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::CommandNeedsAuthentication(%d): %s", $commandCode, Utils::PrintAsString($stat)));
        return $stat;
    }

Here is the call graph for this function:

static ZPush::CommandNeedsPlainInput ( commandCode) [static]

Indicates if these commands expect plain text input instead of wbxml.

Parameters:
string$commandCodepublic
Returns:
boolean

Definition at line 716 of file zpush.php.

                                                                {
        $stat = self::checkCommandOptions($commandCode, self::PLAININPUT);
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::CommandNeedsPlainInput(%d): %s", $commandCode, Utils::PrintAsString($stat)));
        return $stat;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::CommandNeedsProvisioning ( commandCode) [static]

Indicates if the Provisioning check has to be forced on these commands.

Parameters:
string$commandCodepublic
Returns:
boolean

Definition at line 702 of file zpush.php.

                                                                  {
        $stat = ! self::checkCommandOptions($commandCode, self::UNPROVISIONED);
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::CommandNeedsProvisioning(%s): %s", $commandCode, Utils::PrintAsString($stat)));
        return $stat;
    }

Here is the call graph for this function:

static ZPush::GetAdditionalSyncFolders ( ) [static]

Returns additional folder objects which should be synchronized to the device.

public

Returns:
array

Definition at line 458 of file zpush.php.

                                                      {
        // TODO if there are any user based folders which should be synchronized, they have to be returned here as well!!
        return self::$addSyncFolders;
    }

Here is the caller graph for this function:

static ZPush::GetAdditionalSyncFolderStore ( folderid,
noDebug = false 
) [static]

Returns additional folder objects which should be synchronized to the device.

Parameters:
string$folderid
boolean$noDebug(opt) by default, debug message is shown

public

Returns:
string

Definition at line 472 of file zpush.php.

                                                                                     {
        $val = (isset(self::$addSyncFolders[$folderid]->Store))? self::$addSyncFolders[$folderid]->Store : false;
        if (!$noDebug)
            ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::GetAdditionalSyncFolderStore('%s'): '%s'", $folderid, Utils::PrintAsString($val)));
        return $val;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetBackend ( ) [static]

Returns the Backend for this request the backend has to be an IBackend implementation.

public

Returns:
object IBackend implementation

Definition at line 437 of file zpush.php.

                                        {
        // if the backend is not yet loaded, load backend drivers and instantiate it
        if (!isset(ZPush::$backend)) {
            // Initialize our backend
            $ourBackend = @constant('BACKEND_PROVIDER');
            self::IncludeBackend($ourBackend);

            if (class_exists($ourBackend))
                ZPush::$backend = new $ourBackend();
            else
                throw new FatalMisconfigurationException(sprintf("Backend provider '%s' can not be loaded. Check configuration!", $ourBackend));
        }
        return ZPush::$backend;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::getDefaultFolderTypeFromFolderClass ( folderclass) [static]

Returns the default foldertype for a folder class.

Parameters:
string$folderclassfolderclass sent by the mobile

public

Returns:
string

Definition at line 507 of file zpush.php.

                                                                             {
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::getDefaultFolderTypeFromFolderClass('%s'): '%d'", $folderclass, self::$classes[$folderclass][self::CLASS_DEFAULTTYPE]));
        return self::$classes[$folderclass][self::CLASS_DEFAULTTYPE];
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetDeviceManager ( initialize = true) [static]

Returns the DeviceManager object.

Parameters:
boolean$initialize(opt) default true: initializes the DeviceManager if not already done

public

Returns:
object DeviceManager

Definition at line 343 of file zpush.php.

                                                                {
        if (!isset(ZPush::$deviceManager) && $initialize)
            ZPush::$deviceManager = new DeviceManager();

        return ZPush::$deviceManager;
    }

Here is the caller graph for this function:

static ZPush::GetFolderClassFromFolderType ( foldertype) [static]

Returns the folder class for a foldertype.

Parameters:
string$foldertypepublic
Returns:
string/false false if no class for this type is available

Definition at line 520 of file zpush.php.

                                                                     {
        $class = false;
        foreach (self::$classes as $aClass => $cprops) {
            if ($cprops[self::CLASS_DEFAULTTYPE] == $foldertype || in_array($foldertype, $cprops[self::CLASS_OTHERTYPES])) {
                $class = $aClass;
                break;
            }
        }
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::GetFolderClassFromFolderType('%s'): %s", $foldertype, Utils::PrintAsString($class)));
        return $class;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Indicates the latest AS version supported by Z-Push.

public

Returns:
string

Definition at line 583 of file zpush.php.

                                                         {
        return end(self::$supportedASVersions);
    }

Here is the caller graph for this function:

static ZPush::GetRequestHandlerForCommand ( commandCode) [static]

Loads and instantiates a request processor for a command.

Parameters:
int$commandCodepublic
Returns:
RequestProcessor sub-class

Definition at line 660 of file zpush.php.

                                                                     {
        if (!array_key_exists($commandCode, self::$supportedCommands) ||
            !array_key_exists(self::REQUESTHANDLER, self::$supportedCommands[$commandCode]) )
            throw new FatalNotImplementedException(sprintf("Command '%s' has no request handler or class", Utils::GetCommandFromCode($commandCode)));

        $class = self::$supportedCommands[$commandCode][self::REQUESTHANDLER];
        if ($class == "Webservice")
            $handlerclass = REAL_BASE_PATH . "lib/webservice/webservice.php";
        else
            $handlerclass = REAL_BASE_PATH . "lib/request/" . strtolower($class) . ".php";

        if (is_file($handlerclass))
            include($handlerclass);

        if (class_exists($class))
            return new $class();
        else
            throw new FatalNotImplementedException(sprintf("Request handler '%s' can not be loaded", $class));
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetSearchProvider ( ) [static]

Returns the SearchProvider object which has to be an ISearchProvider implementation.

public

Returns:
object implementation of ISearchProvider
Exceptions:
FatalMisconfigurationException,FatalNotImplementedException

Definition at line 404 of file zpush.php.

                                               {
        if (!isset(ZPush::$searchProvider)) {
            // is a global searchprovider configured ? It will  outrank the backend
            if (defined('SEARCH_PROVIDER') && @constant('SEARCH_PROVIDER') != "") {
                $searchClass = @constant('SEARCH_PROVIDER');

                if (! class_exists($searchClass))
                    self::IncludeBackend($searchClass);

                if (class_exists($searchClass))
                    $aSearchProvider = new $searchClass();
                else
                    throw new FatalMisconfigurationException(sprintf("Search provider '%s' can not be loaded. Check configuration!", $searchClass));
            }
            // get the searchprovider from the backend
            else
                $aSearchProvider = self::GetBackend()->GetSearchProvider();

            if (in_array('ISearchProvider', class_implements($aSearchProvider)))
                ZPush::$searchProvider = $aSearchProvider;
            else
                throw new FatalNotImplementedException("Instantiated SearchProvider does not implement the ISearchProvider interface!");
        }
        return ZPush::$searchProvider;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetServerHeader ( ) [static]

Returns AS server header.

public

Returns:
string

Definition at line 608 of file zpush.php.

                                             {
        if (self::GetSupportedASVersion() == self::ASV_25)
            return "MS-Server-ActiveSync: 6.5.7638.1";
        else
            return "MS-Server-ActiveSync: ". self::GetSupportedASVersion();
    }

Here is the call graph for this function:

static ZPush::GetStateMachine ( ) [static]

Returns the StateMachine object which has to be an IStateMachine implementation.

public

Returns:
object implementation of IStateMachine
Exceptions:
FatalNotImplementedException

Definition at line 313 of file zpush.php.

                                             {
        if (!isset(ZPush::$stateMachine)) {
            // the backend could also return an own IStateMachine implementation
            $backendStateMachine = self::GetBackend()->GetStateMachine();

            // if false is returned, use the default StateMachine
            if ($backendStateMachine !== false) {
                ZLog::Write(LOGLEVEL_DEBUG, "Backend implementation of IStateMachine: ".get_class($backendStateMachine));
                if (in_array('IStateMachine', class_implements($backendStateMachine)))
                    ZPush::$stateMachine = $backendStateMachine;
                else
                    throw new FatalNotImplementedException("State machine returned by the backend does not implement the IStateMachine interface!");
            }
            else {
                // Initialize the default StateMachine
                include_once('lib/default/filestatemachine.php');
                ZPush::$stateMachine = new FileStateMachine();
            }
        }
        return ZPush::$stateMachine;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetSupportedASVersion ( ) [static]

Indicates which is the highest AS version supported by the backend.

public

Returns:
string
Exceptions:
FatalNotImplementedExceptionif the backend returns an invalid version

Definition at line 594 of file zpush.php.

                                                   {
        $version = self::GetBackend()->GetSupportedASVersion();
        if (!in_array($version, self::$supportedASVersions))
            throw new FatalNotImplementedException(sprintf("AS version '%s' reported by the backend is not supported", $version));

        return $version;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetSupportedCommands ( ) [static]

Returns AS commands which are supported.

public

Returns:
string

Definition at line 639 of file zpush.php.

                                                  {
        $asCommands = array();
        // filter all non-activesync commands
        foreach (self::$supportedCommands as $c=>$v)
            if (!self::checkCommandOptions($c, self::NOACTIVESYNCCOMMAND) &&
                self::checkCommandOptions($c, self::GetSupportedASVersion()))
                $asCommands[] = Utils::GetCommandFromCode($c);

        $commands = implode(',', $asCommands);
        ZLog::Write(LOGLEVEL_DEBUG, "ZPush::GetSupportedCommands(): " . $commands);
        return "MS-ASProtocolCommands: " . $commands;
    }

Here is the call graph for this function:

static ZPush::GetSupportedProtocolVersions ( valueOnly = false) [static]

Returns AS protocol versions which are supported.

Parameters:
boolean$valueOnly(opt) default: false (also returns the header name)

public

Returns:
string

Definition at line 623 of file zpush.php.

                                                                            {
        $versions = implode(',', array_slice(self::$supportedASVersions, 0, (array_search(self::GetSupportedASVersion(), self::$supportedASVersions)+1)));
        ZLog::Write(LOGLEVEL_DEBUG, "ZPush::GetSupportedProtocolVersions(): " . $versions);

        if ($valueOnly === true)
            return $versions;

        return "MS-ASProtocolVersions: " . $versions;
    }

Here is the call graph for this function:

static ZPush::getSyncObjectFromFolderClass ( folderclass) [static]

Returns a SyncObject class name for a folder class.

Parameters:
string$folderclasspublic
Returns:
string
Exceptions:
FatalNotImplementedException

Definition at line 488 of file zpush.php.

                                                                      {
        if (!isset(self::$classes[$folderclass]))
            throw new FatalNotImplementedException("Class '$folderclass' is not supported");

        $class = self::$classes[$folderclass][self::CLASS_NAME];
        if (self::$classes[$folderclass][self::CLASS_REQUIRESPROTOCOLVERSION])
            return new $class(Request::GetProtocolVersion());
        else
            return new $class();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::GetTopCollector ( ) [static]

Returns the Top data collector object.

public

Returns:
object TopCollector

Definition at line 356 of file zpush.php.

Here is the caller graph for this function:

static ZPush::HierarchyCommand ( commandCode) [static]

Indicates if the comand to be executed operates on the hierarchy.

Parameters:
int$commandCodepublic
Returns:
boolean

Definition at line 730 of file zpush.php.

                                                          {
        $stat = self::checkCommandOptions($commandCode, self::HIERARCHYCOMMAND);
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPush::HierarchyCommand(%d): %s", $commandCode, Utils::PrintAsString($stat)));
        return $stat;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::IncludeBackend ( backendname) [static]

Loads a backend file.

Parameters:
string$backendnamepublic
Exceptions:
FatalNotImplementedException
Returns:
boolean

Definition at line 372 of file zpush.php.

                                                        {
        if ($backendname == false) return false;

        $backendname = strtolower($backendname);
        if (substr($backendname, 0, 7) !== 'backend')
            throw new FatalNotImplementedException(sprintf("Backend '%s' is not allowed",$backendname));

        $rbn = substr($backendname, 7);

        $subdirbackend = REAL_BASE_PATH . "backend/" . $rbn . "/" . $rbn . ".php";
        $stdbackend = REAL_BASE_PATH . "backend/" . $rbn . ".php";

        if (is_file($subdirbackend))
            $toLoad = $subdirbackend;
        else if (is_file($stdbackend))
            $toLoad = $stdbackend;
        else
            return false;

        ZLog::Write(LOGLEVEL_DEBUG, sprintf("Including backend file: '%s'", $toLoad));
        include_once($toLoad);
        return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ZPush::PrintZPushLegal ( message = "",
additionalMessage = "" 
) [static]

Prints the Z-Push legal header to STDOUT Using this breaks ActiveSync synchronization if wbxml is expected.

Parameters:
string$message(opt) message to be displayed
string$additionalMessage(opt) additional message to be displayed

public

Returns:

Definition at line 543 of file zpush.php.

                                                                                   {
        ZLog::Write(LOGLEVEL_DEBUG,"ZPush::PrintZPushLegal()");
        $zpush_version = @constant('ZPUSH_VERSION');

        if ($message)
            $message = "<h3>". $message . "</h3>";
        if ($additionalMessage)
            $additionalMessage .= "<br>";

        header("Content-type: text/html");
        print <<<END
        <html>
        <header>
        <title>Z-Push ActiveSync</title>
        </header>
        <body>
        <font face="verdana">
        <h2>Z-Push - Open Source ActiveSync</h2>
        <b>Version $zpush_version</b><br>
        $message $additionalMessage
        <br><br>
        More information about Z-Push can be found at:<br>
        <a href="http://z-push.sf.net/">Z-Push homepage</a><br>
        <a href="http://z-push.sf.net/download">Z-Push download page at BerliOS</a><br>
        <a href="http://z-push.sf.net/tracker">Z-Push Bugtracker and Roadmap</a><br>
        <br>
        All modifications to this sourcecode must be published and returned to the community.<br>
        Please see <a href="http://www.gnu.org/licenses/agpl-3.0.html">AGPLv3 License</a> for details.<br>
        </font face="verdana">
        </body>
        </html>
END;
    }

Here is the call graph for this function:


Member Data Documentation

ZPush::$addSyncFolders [static, private]

Definition at line 183 of file zpush.php.

ZPush::$backend [static, private]

Definition at line 182 of file zpush.php.

ZPush::$classes [static, private]

Definition at line 142 of file zpush.php.

ZPush::$deviceManager [static, private]

Definition at line 180 of file zpush.php.

ZPush::$searchProvider [static, private]

Definition at line 179 of file zpush.php.

ZPush::$stateMachine [static, private]

Definition at line 178 of file zpush.php.

ZPush::$supportedASVersions [static, private]
Initial value:
 array(
                    self::ASV_1,
                    self::ASV_2,
                    self::ASV_21,
                    self::ASV_25,
                    self::ASV_12,
                    self::ASV_121,
                    self::ASV_14
                )

Definition at line 100 of file zpush.php.

ZPush::$supportedCommands [static, private]
Initial value:
 array(
                    
                    self::COMMAND_SYNC              => array(self::ASV_1,  self::REQUESTHANDLER => "Sync"),
                    self::COMMAND_SENDMAIL          => array(self::ASV_1,  self::REQUESTHANDLER => "SendMail"),
                    self::COMMAND_SMARTFORWARD      => array(self::ASV_1,  self::REQUESTHANDLER => "SendMail"),
                    self::COMMAND_SMARTREPLY        => array(self::ASV_1,  self::REQUESTHANDLER => "SendMail"),
                    self::COMMAND_GETATTACHMENT     => array(self::ASV_1,  self::REQUESTHANDLER => "GetAttachment"),
                    self::COMMAND_GETHIERARCHY      => array(self::ASV_1,  self::REQUESTHANDLER => "GetHierarchy",  self::HIERARCHYCOMMAND),            
                    self::COMMAND_CREATECOLLECTION  => array(self::ASV_1),                                                                              
                    self::COMMAND_DELETECOLLECTION  => array(self::ASV_1),                                                                              
                    self::COMMAND_MOVECOLLECTION    => array(self::ASV_1),                                                                              
                    self::COMMAND_FOLDERSYNC        => array(self::ASV_2,  self::REQUESTHANDLER => "FolderSync",    self::HIERARCHYCOMMAND),
                    self::COMMAND_FOLDERCREATE      => array(self::ASV_2,  self::REQUESTHANDLER => "FolderChange",  self::HIERARCHYCOMMAND),
                    self::COMMAND_FOLDERDELETE      => array(self::ASV_2,  self::REQUESTHANDLER => "FolderChange",  self::HIERARCHYCOMMAND),
                    self::COMMAND_FOLDERUPDATE      => array(self::ASV_2,  self::REQUESTHANDLER => "FolderChange",  self::HIERARCHYCOMMAND),
                    self::COMMAND_MOVEITEMS         => array(self::ASV_1,  self::REQUESTHANDLER => "MoveItems"),
                    self::COMMAND_GETITEMESTIMATE   => array(self::ASV_1,  self::REQUESTHANDLER => "GetItemEstimate"),
                    self::COMMAND_MEETINGRESPONSE   => array(self::ASV_1,  self::REQUESTHANDLER => "MeetingResponse"),
                    self::COMMAND_RESOLVERECIPIENTS => array(self::ASV_1,  self::REQUESTHANDLER => false),
                    self::COMMAND_VALIDATECERT      => array(self::ASV_1,  self::REQUESTHANDLER => false),
                    self::COMMAND_PROVISION         => array(self::ASV_25, self::REQUESTHANDLER => "Provisioning",  self::UNAUTHENTICATED, self::UNPROVISIONED),
                    self::COMMAND_SEARCH            => array(self::ASV_1,  self::REQUESTHANDLER => "Search"),
                    self::COMMAND_PING              => array(self::ASV_2,  self::REQUESTHANDLER => "Ping",          self::UNPROVISIONED),
                    self::COMMAND_NOTIFY            => array(self::ASV_1,  self::REQUESTHANDLER => "Notify"),                                           
                    self::COMMAND_ITEMOPERATIONS    => array(self::ASV_12, self::REQUESTHANDLER => "ItemOperations"),
                    self::COMMAND_SETTINGS          => array(self::ASV_12, self::REQUESTHANDLER => "Settings"),

                    self::COMMAND_WEBSERVICE_DEVICE => array(self::REQUESTHANDLER => "Webservice", self::PLAININPUT, self::NOACTIVESYNCCOMMAND, self::WEBSERVICECOMMAND),
                )

Definition at line 110 of file zpush.php.

ZPush::$topCollector [static, private]

Definition at line 181 of file zpush.php.

const ZPush::ASV_1 = "1.0"

Definition at line 59 of file zpush.php.

const ZPush::ASV_12 = "12.0"

Definition at line 63 of file zpush.php.

const ZPush::ASV_121 = "12.1"

Definition at line 64 of file zpush.php.

const ZPush::ASV_14 = "14.0"

Definition at line 65 of file zpush.php.

const ZPush::ASV_2 = "2.0"

Definition at line 60 of file zpush.php.

const ZPush::ASV_21 = "2.1"

Definition at line 61 of file zpush.php.

const ZPush::ASV_25 = "2.5"

Definition at line 62 of file zpush.php.

Definition at line 55 of file zpush.php.

const ZPush::CLASS_NAME = 1

Definition at line 53 of file zpush.php.

Definition at line 56 of file zpush.php.

Definition at line 54 of file zpush.php.

Definition at line 92 of file zpush.php.

Definition at line 93 of file zpush.php.

Definition at line 76 of file zpush.php.

Definition at line 77 of file zpush.php.

Definition at line 75 of file zpush.php.

Definition at line 78 of file zpush.php.

Definition at line 74 of file zpush.php.

Definition at line 91 of file zpush.php.

Definition at line 80 of file zpush.php.

Definition at line 85 of file zpush.php.

Definition at line 81 of file zpush.php.

Definition at line 94 of file zpush.php.

Definition at line 79 of file zpush.php.

Definition at line 95 of file zpush.php.

const ZPush::COMMAND_PING = 18

Definition at line 84 of file zpush.php.

Definition at line 86 of file zpush.php.

Definition at line 87 of file zpush.php.

Definition at line 82 of file zpush.php.

Definition at line 71 of file zpush.php.

Definition at line 83 of file zpush.php.

Definition at line 72 of file zpush.php.

Definition at line 73 of file zpush.php.

Command codes for base64 encoded requests (AS >= 12.1)

Definition at line 70 of file zpush.php.

Definition at line 88 of file zpush.php.

Definition at line 98 of file zpush.php.

Definition at line 50 of file zpush.php.

Definition at line 48 of file zpush.php.

const ZPush::PLAININPUT = 6

Definition at line 51 of file zpush.php.

Definition at line 52 of file zpush.php.

Definition at line 46 of file zpush.php.

Definition at line 47 of file zpush.php.

Definition at line 49 of file zpush.php.


The documentation for this class was generated from the following file: