File: SyncElement.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 (109 lines) | stat: -rw-r--r-- 2,436 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/**
 * The class SyncML_Command_SyncElement stores information from the <Add>,
 * <Delete> and <Replace> elements found inside a <Sync> command.
 *
 * Instances of this class are created during the XML parsing by
 * SyncML_Command_Sync.
 *
 * $Horde: framework/SyncML/SyncML/Command/SyncElement.php,v 1.3.2.10 2009/04/05 20:24:43 jan Exp $
 *
 * Copyright 2005-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 <karsten@horde.org>
 * @author  Jan Schneider <jan@horde.org>
 * @since   Horde 3.0.5
 * @package SyncML
 */
class SyncML_SyncElement {

    /**
     * The MIME content type of the sync command.
     *
     * @var string
     */
    var $contentType;

    /**
     * Encoding format of the content as specified in the <Meta><Format>
     * element, like 'b64'.
     *
     * @var string
     */
    var $contentFormat;

    /**
     * The actual data content of the sync command.
     *
     * @var string $content
     */
    var $content = '';

    /**
     * The size of the data item of the sync command in bytes as specified by
     * a <Size> element.
     *
     * @var integer
     */
    var $size;

    /**
     * The command ID (<CmdID>) of the sync command.
     *
     * @var integer
     */
    var $cmdID;

    /**
     * Name of the sync command, like 'Add'.
     *
     * @var string
     */
    var $elementType;

    /**
     * The client ID for the data item processed in the sync command.
     *
     * @var string
     */
    var $cuid;

    /**
     * The code to be sent as status response in a <Status> element, one of
     * the RESPONSE_* constants.
     *
     * This is set in SyncML_Sync::handleClientSyncItem() when "processing"
     * the item.
     *
     * @var integer
     */
    var $responseCode;

    /**
     * The Sync object for this element is part of.
     *
     * @var object SyncML_Sync
     */
    var $sync;

    /**
     * Constructor.
     *
     * @param SyncML_Sync $sync
     * @param string $elementType
     * @param integer $cmdID
     * @param integer $size
     */
    function SyncML_SyncElement(&$sync, $elementType, $cmdID, $size)
    {
        $this->sync = &$sync;
        $this->elementType = $elementType;
        $this->cmdID = $cmdID;
        $this->size = $size;
    }

}