Back to index

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

List of all members.

Public Member Functions

 DeviceManager ()
 Constructor.
 GetStateManager ()
 Returns the StateManager for the current device.
 SentData ($datacounter)
 
Device operations
 Save ()
 Called at the end of the request Statistics about received/sent data is saved here.
 SaveDeviceInformation ($deviceinformation)
 Newer mobiles send extensive device informations with the Settings command These informations are saved in the ASDevice.
 ProvisioningRequired ($policykey, $noDebug=false)
 
Provisioning operations
 GenerateProvisioningPolicyKey ()
 Generates a new Policykey.
 SetProvisioningPolicyKey ($policykey)
 Attributes a provisioned policykey to a device.
 GetProvisioningObject ()
 Builds a Provisioning SyncObject with policies.
 GetProvisioningWipeStatus ()
 Returns the status of the remote wipe policy.
 SetProvisioningWipeStatus ($status)
 Updates the status of the remote wipe.
 GetHierarchyChangesWrapper ()
 
LEGACY AS 1.0 and WRAPPER operations
 InitializeFolderCache ($folders)
 Initializes the HierarchyCache for legacy syncs this is for AS 1.0 compatibility: save folder information synched with GetHierarchy()
 GetFolderIdFromCacheByClass ($class)
 Returns a FolderID of default classes this is for AS 1.0 compatibility: this information was made available during GetHierarchy()
 GetFolderClassFromCacheByID ($folderid)
 Returns a FolderClass for a FolderID which is known to the mobile.
 DoNotStreamMessage ($id, &$message)
 Checks if the message should be streamed to a mobile Should always be called before a message is sent to the mobile Returns true if there is something wrong and the content could break the synchronization.
 GetWindowSize ($folderid, $type, $uuid, $statecounter, $queuedmessages)
 Amount of items to me synchronized.
 SetWindowSize ($folderid, $maxItems)
 Sets the amount of items the device is requesting.
 SetSupportedFields ($folderid, $fieldlist)
 Sets the supported fields transmitted by the device for a certain folder.
 GetSupportedFields ($folderid)
 Gets the supported fields transmitted previousely by the device for a certain folder.
 ForceFolderResync ($folderid)
 Removes all linked states of a specific folder.
 ForceFullResync ()
 Removes all linked states from a device.
 IsHierarchySyncRequired ()
 Indicates if the hierarchy should be resynchronized e.g.
 IsHierarchyFullResyncRequired ()
 Indicates if a full hierarchy resync should be triggered due to loops.
 AnnounceProcessException ($exception)
 Adds an Exceptions to the process tracking.
 AnnounceProcessStatus ($folderid, $status)
 Adds a non-ok status for a folderid to the process tracking.
 CheckHearbeatStateIntegrity ($folderid, $uuid, $counter)
 Checks if the given counter for a certain uuid+folderid was exported before.
 AnnounceASVersion ()
 Indicates if the device needs an AS version update.
 AnnounceIgnoredMessage ($folderid, $id, SyncObject $message, $reason=self::MSG_BROKEN_UNKNOWN)
 Called when a SyncObject is not being streamed to the mobile.

Public Attributes

const DEFAULTWINDOWSIZE = 100
const MSG_BROKEN_UNKNOWN = 1
const MSG_BROKEN_CAUSINGLOOP = 2
const MSG_BROKEN_SEMANTICERR = 4

Private Member Functions

 loadDeviceData ()
 
private DeviceManager methods
 announceAcceptedMessage ($folderid, $id)
 Called when a SyncObject was streamed to the mobile.
 checkBrokenMessages ($folderid)
 Checks if there were broken messages streamed to the mobile.
 setLatestFolder ($folderid)
 Setter for the latest folder id on multi-folder operations of AS 14 this is used to set the new current folder id.
 getLatestFolder ()
 Getter for the latest folder id.

Private Attributes

 $device
 $deviceHash
 $statemachine
 $stateManager
 $incomingData = 0
 $outgoingData = 0
 $windowSize
 $latestFolder
 $loopdetection
 $hierarchySyncRequired

Detailed Description

Definition at line 48 of file devicemanager.php.


Member Function Documentation

DeviceManager::announceAcceptedMessage ( folderid,
id 
) [private]

Called when a SyncObject was streamed to the mobile.

If the message could not be sent before this data is obsolete

Parameters:
string$folderidid of the parent folder
string$idmessage id

public

Returns:
boolean returns true if the message was ignored before

Definition at line 693 of file devicemanager.php.

                                                             {
        if ($this->device->RemoveIgnoredMessage($folderid, $id)) {
            ZLog::Write(LOGLEVEL_INFO, sprintf("DeviceManager->announceAcceptedMessage('%s', '%s'): cleared previosily ignored message as message is sucessfully streamed",$folderid, $id));
            return true;
        }
        return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Indicates if the device needs an AS version update.

public

Returns:
boolean

Definition at line 612 of file devicemanager.php.

                                        {
        $latest = ZPush::GetSupportedASVersion();
        $announced = $this->device->GetAnnouncedASversion();
        $this->device->SetAnnouncedASversion($latest);

        return ($announced != $latest);
    }

Here is the call graph for this function:

DeviceManager::AnnounceIgnoredMessage ( folderid,
id,
SyncObject message,
reason = self::MSG_BROKEN_UNKNOWN 
)

Called when a SyncObject is not being streamed to the mobile.

The user can be informed so he knows about this issue

Parameters:
string$folderidid of the parent folder (may be false if unknown)
string$idmessage id
SyncObject$messagethe broken message
string$reason(self::MSG_BROKEN_UNKNOWN, self::MSG_BROKEN_CAUSINGLOOP, self::MSG_BROKEN_SEMANTICERR)

public

Returns:
boolean

Definition at line 660 of file devicemanager.php.

                                                                                                                  {
        if ($folderid === false)
            $folderid = $this->getLatestFolder();

        $class = get_class($message);

        $brokenMessage = new StateObject();
        $brokenMessage->id = $id;
        $brokenMessage->folderid = $folderid;
        $brokenMessage->ASClass = $class;
        $brokenMessage->folderid = $folderid;
        $brokenMessage->reasonCode = $reason;
        $brokenMessage->reasonString = 'unknown cause';
        $brokenMessage->timestamp = time();
        $brokenMessage->asobject = $message;
        $brokenMessage->reasonString = ZLog::GetLastMessage(LOGLEVEL_WARN);

        $this->device->AddIgnoredMessage($brokenMessage);

        ZLog::Write(LOGLEVEL_ERROR, sprintf("Ignored broken message (%s). Reason: '%s' Folderid: '%s' message id '%s'", $class, $reason, $folderid, $id));
        return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Adds an Exceptions to the process tracking.

Parameters:
Exception$exceptionpublic
Returns:
boolean

Definition at line 574 of file devicemanager.php.

                                                         {
        return $this->loopdetection->ProcessLoopDetectionAddException($exception);
    }
DeviceManager::AnnounceProcessStatus ( folderid,
status 
)

Adds a non-ok status for a folderid to the process tracking.

On 'false' a hierarchy status is assumed

public

Returns:
boolean

Definition at line 585 of file devicemanager.php.

                                                              {
        return $this->loopdetection->ProcessLoopDetectionAddStatus($folderid, $status);
    }
DeviceManager::checkBrokenMessages ( folderid) [private]

Checks if there were broken messages streamed to the mobile.

If the sync completes/continues without further erros they are marked as accepted

Parameters:
string$folderidfolderid which is to be checked

private

Returns:
boolean

Definition at line 710 of file devicemanager.php.

                                                    {
        // check for correctly synchronized messages of the folder
        foreach($this->loopdetection->GetSyncedButBeforeIgnoredMessages($folderid) as $okID) {
            $this->announceAcceptedMessage($folderid, $okID);
        }
        return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

DeviceManager::CheckHearbeatStateIntegrity ( folderid,
uuid,
counter 
)

Checks if the given counter for a certain uuid+folderid was exported before.

This is called when a heartbeat request found changes to make sure that the same changes are not exported twice, as during the heartbeat there could have been a normal sync request.

Parameters:
string$folderidfolder id
string$uuidsynkkey
string$countersynckey counter

public

Returns:
boolean indicating if an uuid+counter were exported (with changes) before

Definition at line 602 of file devicemanager.php.

                                                                            {
        return $this->loopdetection->IsSyncStateObsolete($folderid, $uuid, $counter);
    }

Constructor.

public

Definition at line 75 of file devicemanager.php.

                                    {
        $this->statemachine = ZPush::GetStateMachine();
        $this->deviceHash = false;
        $this->devid = Request::GetDeviceID();
        $this->windowSize = array();
        $this->latestFolder = false;
        $this->hierarchySyncRequired = false;

        // only continue if deviceid is set
        if ($this->devid) {
            $this->device = new ASDevice($this->devid, Request::GetDeviceType(), Request::GetGETUser(), Request::GetUserAgent());
            $this->loadDeviceData();

            ZPush::GetTopCollector()->SetUserAgent($this->device->GetDeviceUserAgent());
        }
        else
            throw new FatalNotImplementedException("Can not proceed without a device id.");

        $this->loopdetection = new LoopDetection();
        $this->loopdetection->ProcessLoopDetectionInit();
        $this->loopdetection->ProcessLoopDetectionPreviousConnectionFailed();

        $this->stateManager = new StateManager();
        $this->stateManager->SetDevice($this->device);
    }

Here is the call graph for this function:

DeviceManager::DoNotStreamMessage ( id,
&$  message 
)

Checks if the message should be streamed to a mobile Should always be called before a message is sent to the mobile Returns true if there is something wrong and the content could break the synchronization.

Parameters:
string$idmessage id
SyncObject&$messagethe method could edit the message to change the flags

public

Returns:
boolean returns true if the message should NOT be send!

Definition at line 405 of file devicemanager.php.

                                                       {
        $folderid = $this->getLatestFolder();

        if (isset($message->parentid))
            $folder = $message->parentid;

        // message was identified to be causing a loop
        if ($this->loopdetection->IgnoreNextMessage(true, $id, $folderid)) {
            $this->AnnounceIgnoredMessage($folderid, $id, $message, self::MSG_BROKEN_CAUSINGLOOP);
            return true;
        }

        // message is semantically incorrect
        if (!$message->Check(true)) {
            $this->AnnounceIgnoredMessage($folderid, $id, $message, self::MSG_BROKEN_SEMANTICERR);
            return true;
        }

        // check if this message is broken
        if ($this->device->HasIgnoredMessage($folderid, $id)) {
            // reset the flags so the message is always streamed with <Add>
            $message->flags = false;

            // track the broken message in the loop detection
            $this->loopdetection->SetBrokenMessage($folderid, $id);
        }
        return false;
    }

Here is the call graph for this function:

Removes all linked states of a specific folder.

During next request the folder is resynchronized.

Parameters:
string$folderidpublic
Returns:
boolean

Definition at line 511 of file devicemanager.php.

                                                 {
        ZLog::Write(LOGLEVEL_INFO, sprintf("DeviceManager->ForceFolderResync('%s'): folder resync", $folderid));

        // delete folder states
        StateManager::UnLinkState($this->device, $folderid);

        return true;
    }

Here is the call graph for this function:

Removes all linked states from a device.

During next requests a full resync is triggered.

public

Returns:
boolean

Definition at line 527 of file devicemanager.php.

                                      {
        ZLog::Write(LOGLEVEL_INFO, "Full device resync requested");

        // delete hierarchy states
        StateManager::UnLinkState($this->device, false);

        // delete all other uuids
        foreach ($this->device->GetAllFolderIds() as $folderid)
            $uuid = StateManager::UnLinkState($this->device, $folderid);

        return true;
    }

Here is the call graph for this function:

Generates a new Policykey.

public

Returns:
int

Definition at line 244 of file devicemanager.php.

                                                    {
        return mt_rand(100000000, 999999999);
    }

Returns a FolderClass for a FolderID which is known to the mobile.

Parameters:
string$folderidpublic
Returns:
int
Exceptions:
NoHierarchyCacheAvailableException,NotImplementedException

Definition at line 380 of file devicemanager.php.

                                                           {
        //TODO check if the parent folder exists and is also beeing synchronized
        $typeFromCache = $this->device->GetFolderType($folderid);
        if ($typeFromCache === false)
            throw new NoHierarchyCacheAvailableException(sprintf("Folderid '%s' is not fully synchronized on the device", $folderid));

        $class = ZPush::GetFolderClassFromFolderType($typeFromCache);
        if ($class === false)
            throw new NotImplementedException(sprintf("Folderid '%s' is saved to be of type '%d' but this type is not implemented", $folderid, $typeFromCache));

        return $class;
    }

Here is the call graph for this function:

Returns a FolderID of default classes this is for AS 1.0 compatibility: this information was made available during GetHierarchy()

Parameters:
string$classThe class requested

public

Returns:
string
Exceptions:
NoHierarchyCacheAvailableException

Definition at line 346 of file devicemanager.php.

                                                        {
        $folderidforClass = false;
        // look at the default foldertype for this class
        $type = ZPush::getDefaultFolderTypeFromFolderClass($class);

        if ($type && $type > SYNC_FOLDER_TYPE_OTHER && $type < SYNC_FOLDER_TYPE_USER_MAIL) {
            $folderids = $this->device->GetAllFolderIds();
            foreach ($folderids as $folderid) {
                if ($type == $this->device->GetFolderType($folderid)) {
                    $folderidforClass = $folderid;
                    break;
                }
            }

            // Old Palm Treos always do initial sync for calendar and contacts, even if they are not made available by the backend.
            // We need to fake these folderids, allowing a fake sync/ping, even if they are not supported by the backend
            // if the folderid would be available, they would already be returned in the above statement
            if ($folderidforClass == false && ($type == SYNC_FOLDER_TYPE_APPOINTMENT || $type == SYNC_FOLDER_TYPE_CONTACT))
                $folderidforClass = SYNC_FOLDER_TYPE_DUMMY;
        }

        ZLog::Write(LOGLEVEL_DEBUG, sprintf("DeviceManager->GetFolderIdFromCacheByClass('%s'): '%s' => '%s'", $class, $type, $folderidforClass));
        return $folderidforClass;
    }

Here is the call graph for this function:


LEGACY AS 1.0 and WRAPPER operations

Returns a wrapped Importer & Exporter to use the HierarchyChache

See also:
ChangesMemoryWrapper public
Returns:
object HierarchyCache

Definition at line 316 of file devicemanager.php.

                                                 {
        return $this->device->GetHierarchyCache();
    }

Getter for the latest folder id.

private

Returns:
string $folderid the current folder

Definition at line 744 of file devicemanager.php.

                                       {
        return $this->latestFolder;
    }

Here is the caller graph for this function:

Builds a Provisioning SyncObject with policies.

public

Returns:
SyncProvisioning

Definition at line 267 of file devicemanager.php.

                                            {
        $p = new SyncProvisioning();
        // TODO load systemwide Policies
        $p->Load($this->device->GetPolicies());
        return $p;
    }

Returns the status of the remote wipe policy.

public

Returns:
int returns the current status of the device - SYNC_PROVISION_RWSTATUS_*

Definition at line 280 of file devicemanager.php.

                                                {
        return $this->device->GetWipeStatus();
    }

Returns the StateManager for the current device.

public

Returns:
StateManager

Definition at line 107 of file devicemanager.php.

                                      {
        return $this->stateManager;
    }

Gets the supported fields transmitted previousely by the device for a certain folder.

Parameters:
string$folderidpublic
Returns:
array/boolean

Definition at line 498 of file devicemanager.php.

                                                  {
        return $this->device->GetSupportedFields($folderid);
    }
DeviceManager::GetWindowSize ( folderid,
type,
uuid,
statecounter,
queuedmessages 
)

Amount of items to me synchronized.

Parameters:
string$folderid
string$type
int$queuedmessages,;public
Returns:
int

Definition at line 443 of file devicemanager.php.

                                                                                           {
        if (isset($this->windowSize[$folderid]))
            $items = $this->windowSize[$folderid];
        else
            $items = self::DEFAULTWINDOWSIZE;

        $this->setLatestFolder($folderid);

        // detect if this is a loop condition
        if ($this->loopdetection->Detect($folderid, $type, $uuid, $statecounter, $items, $queuedmessages))
            $items = ($items == 0) ? 0: 1+($this->loopdetection->IgnoreNextMessage(false)?1:0) ;

        if ($items >= 0 && $items <= 2)
            ZLog::Write(LOGLEVEL_WARN, sprintf("Mobile loop detected! Messages sent to the mobile will be restricted to %d items in order to identify the conflict", $items));

        return $items;
    }

Here is the call graph for this function:

Initializes the HierarchyCache for legacy syncs this is for AS 1.0 compatibility: save folder information synched with GetHierarchy()

Parameters:
string$foldersArray with folder information

public

Returns:
boolean

Definition at line 330 of file devicemanager.php.

                                                    {
        $this->stateManager->SetDevice($this->device);
        return $this->stateManager->InitializeFolderCache($folders);
    }

Indicates if a full hierarchy resync should be triggered due to loops.

public

Returns:
boolean

Definition at line 561 of file devicemanager.php.

                                                    {
        // check for potential process loops like described in ZP-5
        return $this->loopdetection->ProcessLoopDetectionIsHierarchyResyncRequired();
    }

Indicates if the hierarchy should be resynchronized e.g.

during PING

public

Returns:
boolean

Definition at line 547 of file devicemanager.php.

                                              {
        // check if a hierarchy sync might be necessary
        if ($this->device->GetFolderUUID(false) === false)
            $this->hierarchySyncRequired = true;

        return $this->hierarchySyncRequired;
    }


private DeviceManager methods

Loads devicedata from the StateMachine and loads it into the device

public

Returns:
boolean

Definition at line 630 of file devicemanager.php.

                                      {
        if (!Request::IsValidDeviceID())
            return false;
        try {
            $deviceHash = $this->statemachine->GetStateHash($this->devid, IStateMachine::DEVICEDATA);
            if ($deviceHash != $this->deviceHash) {
                if ($this->deviceHash)
                    ZLog::Write(LOGLEVEL_DEBUG, "DeviceManager->loadDeviceData(): Device data was changed, reloading");
                $this->device->SetData($this->statemachine->GetState($this->devid, IStateMachine::DEVICEDATA));
                $this->deviceHash = $deviceHash;
            }
        }
        catch (StateNotFoundException $snfex) {
            $this->hierarchySyncRequired = true;
        }
        return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

DeviceManager::ProvisioningRequired ( policykey,
noDebug = false 
)


Provisioning operations

Checks if the sent policykey matches the latest policykey saved for the device

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

public

Returns:
boolean

Definition at line 222 of file devicemanager.php.

                                                                       {
        $this->loadDeviceData();

        // check if a remote wipe is required
        if ($this->device->GetWipeStatus() > SYNC_PROVISION_RWSTATUS_OK) {
            ZLog::Write(LOGLEVEL_INFO, sprintf("DeviceManager->ProvisioningRequired('%s'): YES, remote wipe requested", $policykey));
            return true;
        }

        $p = ( ($this->device->GetWipeStatus() != SYNC_PROVISION_RWSTATUS_NA && $policykey != $this->device->GetPolicyKey()) ||
              Request::WasPolicyKeySent() && $this->device->GetPolicyKey() == ASDevice::UNDEFINED );
        if (!$noDebug || $p)
            ZLog::Write(LOGLEVEL_DEBUG, sprintf("DeviceManager->ProvisioningRequired('%s') saved device key '%s': %s", $policykey, $this->device->GetPolicyKey(), Utils::PrintAsString($p)));
        return $p;
    }

Here is the call graph for this function:

Called at the end of the request Statistics about received/sent data is saved here.

public

Returns:
boolean

Definition at line 136 of file devicemanager.php.

                           {
        // TODO save other stuff

        // check if previousily ignored messages were synchronized for the current folder
        // on multifolder operations of AS14 this is done by setLatestFolder()
        if ($this->latestFolder !== false)
            $this->checkBrokenMessages($this->latestFolder);

        // update the user agent and AS version on the device
        $this->device->SetUserAgent(Request::GetUserAgent());
        $this->device->SetASVersion(Request::GetProtocolVersion());

        // data to be saved
        $data = $this->device->GetData();
        if ($data && Request::IsValidDeviceID()) {
            ZLog::Write(LOGLEVEL_DEBUG, "DeviceManager->Save(): Device data changed");

            try {
                // check if this is the first time the device data is saved and it is authenticated. If so, link the user to the device id
                if ($this->device->IsNewDevice() && RequestProcessor::isUserAuthenticated()) {
                    ZLog::Write(LOGLEVEL_INFO, sprintf("Linking device ID '%s' to user '%s'", $this->devid, $this->device->GetDeviceUser()));
                    $this->statemachine->LinkUserDevice($this->device->GetDeviceUser(), $this->devid);
                }

                if (RequestProcessor::isUserAuthenticated() || $this->device->GetForceSave() ) {
                    $this->statemachine->SetState($data, $this->devid, IStateMachine::DEVICEDATA);
                    ZLog::Write(LOGLEVEL_DEBUG, "DeviceManager->Save(): Device data saved");
                }
            }
            catch (StateNotFoundException $snfex) {
                ZLog::Write(LOGLEVEL_ERROR, "DeviceManager->Save(): Exception: ". $snfex->getMessage());
            }
        }

        // remove old search data
        $oldpid = $this->loopdetection->ProcessLoopDetectionGetOutdatedSearchPID();
        if ($oldpid) {
            ZPush::GetBackend()->GetSearchProvider()->TerminateSearch($oldpid);
        }

        // we terminated this process
        if ($this->loopdetection)
            $this->loopdetection->ProcessLoopDetectionTerminate();

        return true;
    }

Here is the call graph for this function:

DeviceManager::SaveDeviceInformation ( deviceinformation)

Newer mobiles send extensive device informations with the Settings command These informations are saved in the ASDevice.

Parameters:
SyncDeviceInformation$deviceinformationpublic
Returns:
boolean

Definition at line 192 of file devicemanager.php.

                                                              {
        ZLog::Write(LOGLEVEL_DEBUG, "Saving submitted device information");

        // set the user agent
        if (isset($deviceinformation->useragent))
            $this->device->SetUserAgent($deviceinformation->useragent);

        // save other informations
        foreach (array("model", "imei", "friendlyname", "os", "oslanguage", "phonenumber", "mobileoperator", "enableoutboundsms") as $info) {
            if (isset($deviceinformation->$info) && $deviceinformation->$info != "") {
                $this->device->__set("device".$info, $deviceinformation->$info);
            }
        }
        return true;
    }

Here is the call graph for this function:

DeviceManager::SentData ( datacounter)


Device operations

Announces amount of transmitted data to the DeviceManager

Parameters:
int$datacounterpublic
Returns:
boolean

Definition at line 123 of file devicemanager.php.

                                           {
        // TODO save this somewhere
        $this->incomingData = Request::GetContentLength();
        $this->outgoingData = $datacounter;
    }

Here is the call graph for this function:

DeviceManager::setLatestFolder ( folderid) [private]

Setter for the latest folder id on multi-folder operations of AS 14 this is used to set the new current folder id.

Parameters:
string$folderidthe current folder

private

Returns:
boolean

Definition at line 727 of file devicemanager.php.

                                                {
        // this is a multi folder operation
        // check on ignoredmessages before discaring the folderid
        if ($this->latestFolder !== false)
            $this->checkBrokenMessages($this->latestFolder);

        $this->latestFolder = $folderid;

        return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Attributes a provisioned policykey to a device.

Parameters:
int$policykeypublic
Returns:
boolean status

Definition at line 256 of file devicemanager.php.

                                                         {
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("DeviceManager->SetPolicyKey('%s')", $policykey));
        return $this->device->SetPolicyKey($policykey);
    }

Here is the call graph for this function:

Updates the status of the remote wipe.

Parameters:
int$status- SYNC_PROVISION_RWSTATUS_*

public

Returns:
boolean could fail if trying to update status to a wipe status which was not requested before

Definition at line 292 of file devicemanager.php.

                                                       {
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("DeviceManager->SetProvisioningWipeStatus() change from '%d' to '%d'",$this->device->GetWipeStatus(), $status));

        if ($status > SYNC_PROVISION_RWSTATUS_OK && !($this->device->GetWipeStatus() > SYNC_PROVISION_RWSTATUS_OK)) {
            ZLog::Write(LOGLEVEL_ERROR, "Not permitted to update remote wipe status to a higher value as remote wipe was not initiated!");
            return false;
        }
        $this->device->SetWipeStatus($status);
        return true;
    }

Here is the call graph for this function:

DeviceManager::SetSupportedFields ( folderid,
fieldlist 
)

Sets the supported fields transmitted by the device for a certain folder.

Parameters:
string$folderid
array$fieldlistsupported fields

public

Returns:
boolean

Definition at line 485 of file devicemanager.php.

                                                              {
        return $this->device->SetSupportedFields($folderid, $fieldlist);
    }
DeviceManager::SetWindowSize ( folderid,
maxItems 
)

Sets the amount of items the device is requesting.

Parameters:
string$folderid
int$maxItemspublic
Returns:
boolean

Definition at line 470 of file devicemanager.php.

                                                        {
        $this->windowSize[$folderid] = $maxItems;

        return true;
    }

Member Data Documentation

Definition at line 57 of file devicemanager.php.

Definition at line 58 of file devicemanager.php.

Definition at line 68 of file devicemanager.php.

Definition at line 61 of file devicemanager.php.

Definition at line 65 of file devicemanager.php.

Definition at line 67 of file devicemanager.php.

Definition at line 62 of file devicemanager.php.

Definition at line 59 of file devicemanager.php.

Definition at line 60 of file devicemanager.php.

Definition at line 64 of file devicemanager.php.

Definition at line 50 of file devicemanager.php.

Definition at line 54 of file devicemanager.php.

Definition at line 55 of file devicemanager.php.

Definition at line 53 of file devicemanager.php.


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