File: Get.php

package info (click to toggle)
horde3 3.3.8%2Bdebian0-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 34,220 kB
  • ctags: 28,224
  • sloc: php: 115,191; xml: 4,247; sql: 2,417; sh: 147; makefile: 140
file content (53 lines) | stat: -rw-r--r-- 1,556 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php

require_once 'SyncML/Command.php';

/**
 * The SyncML_Command_Get class provides a SyncML implementation of the Get
 * command as defined in SyncML Representation Protocol, version 1.1, section
 * 5.5.7.
 *
 * The Get command is used to retrieve data from the recipient.  The
 * SyncML_Command_Get class responds to a client Get request and returns the
 * DevInf information for the SyncML server.
 *
 * $Horde: framework/SyncML/SyncML/Command/Get.php,v 1.14.10.16 2009/04/05 20:24:43 jan Exp $
 *
 * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 *
 * @author  Karsten Fourmont <fourmont@gmx.de>
 * @author  Jan Schneider <jan@horde.org>
 * @since   Horde 3.0
 * @package SyncML
 */
class SyncML_Command_Get extends SyncML_Command {

    /**
     * Name of the command.
     *
     * @var string
     */
    var $_cmdName = 'Get';

    /**
     * Implements the actual business logic of the Alert command.
     */
    function handleCommand($debug = false)
    {
        $state = &$_SESSION['SyncML.state'];

        // Create status response.
        $this->_outputHandler->outputStatus($this->_cmdID, $this->_cmdName,
                                            RESPONSE_OK,
                                            $state->getDevInfURI());
        if (!$state->authenticated) {
            return;
        }

        $this->_outputHandler->outputDevInf($this->_cmdID);
    }

}