CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
58
airtime_mvc/library/Zend/Amf/Value/ByteArray.php
Normal file
58
airtime_mvc/library/Zend/Amf/Value/ByteArray.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ByteArray.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Wrapper class to store an AMF3 flash.utils.ByteArray
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_ByteArray
|
||||
{
|
||||
/**
|
||||
* @var string ByteString Data
|
||||
*/
|
||||
protected $_data = '';
|
||||
|
||||
/**
|
||||
* Create a ByteArray
|
||||
*
|
||||
* @param string $data
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->_data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the byte stream
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
return $this->_data;
|
||||
}
|
||||
}
|
182
airtime_mvc/library/Zend/Amf/Value/MessageBody.php
Normal file
182
airtime_mvc/library/Zend/Amf/Value/MessageBody.php
Normal file
|
@ -0,0 +1,182 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: MessageBody.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* An AMF Message contains information about the actual individual
|
||||
* transaction that is to be performed. It specifies the remote
|
||||
* operation that is to be performed; a local (client) operation
|
||||
* to be invoked upon success; and, the data to be used in the
|
||||
* operation.
|
||||
* <p/>
|
||||
* This Message structure defines how a local client would
|
||||
* invoke a method/operation on a remote server. Additionally,
|
||||
* the response from the Server is structured identically.
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_MessageBody
|
||||
{
|
||||
/**
|
||||
* A string describing which operation, function, or method
|
||||
* is to be remotley invoked.
|
||||
* @var string
|
||||
*/
|
||||
protected $_targetUri = "";
|
||||
|
||||
/**
|
||||
* Universal Resource Identifier that uniquely targets the originator's
|
||||
* Object that should receive the server's response. The server will
|
||||
* use this path specification to target the "OnResult()" or "onStatus()"
|
||||
* handlers within the client. For Flash, it specifies an ActionScript
|
||||
* Object path only. The NetResponse object pointed to by the Response Uri
|
||||
* contains the connection state information. Passing/specifying this
|
||||
* provides a convenient mechanism for the client/server to share access
|
||||
* to an object that is managing the state of the shared connection.
|
||||
*
|
||||
* Since the server will use this field in the event of an error,
|
||||
* this field is required even if a successful server request would
|
||||
* not be expected to return a value to the client.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_responseUri = "";
|
||||
|
||||
/**
|
||||
* Contains the actual data associated with the operation. It contains
|
||||
* the client's parameter data that is passed to the server's operation/method.
|
||||
* When serializing a root level data type or a parameter list array, no
|
||||
* name field is included. That is, the data is anonomously represented
|
||||
* as "Type Marker"/"Value" pairs. When serializing member data, the data is
|
||||
* represented as a series of "Name"/"Type"/"Value" combinations.
|
||||
*
|
||||
* For server generated responses, it may contain any ActionScript
|
||||
* data/objects that the server was expected to provide.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_data;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $targetUri
|
||||
* @param string $responseUri
|
||||
* @param string $data
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($targetUri, $responseUri, $data)
|
||||
{
|
||||
$this->setTargetUri($targetUri);
|
||||
$this->setResponseUri($responseUri);
|
||||
$this->setData($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve target Uri
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTargetUri()
|
||||
{
|
||||
return $this->_targetUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set target Uri
|
||||
*
|
||||
* @param string $targetUri
|
||||
* @return Zend_Amf_Value_MessageBody
|
||||
*/
|
||||
public function setTargetUri($targetUri)
|
||||
{
|
||||
if (null === $targetUri) {
|
||||
$targetUri = '';
|
||||
}
|
||||
$this->_targetUri = (string) $targetUri;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get target Uri
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResponseUri()
|
||||
{
|
||||
return $this->_responseUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set response Uri
|
||||
*
|
||||
* @param string $responseUri
|
||||
* @return Zend_Amf_Value_MessageBody
|
||||
*/
|
||||
public function setResponseUri($responseUri)
|
||||
{
|
||||
if (null === $responseUri) {
|
||||
$responseUri = '';
|
||||
}
|
||||
$this->_responseUri = $responseUri;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve response data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set response data
|
||||
*
|
||||
* @param mixed $data
|
||||
* @return Zend_Amf_Value_MessageBody
|
||||
*/
|
||||
public function setData($data)
|
||||
{
|
||||
$this->_data = $data;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set reply method
|
||||
*
|
||||
* @param string $methodName
|
||||
* @return Zend_Amf_Value_MessageBody
|
||||
*/
|
||||
public function setReplyMethod($methodName)
|
||||
{
|
||||
if (!preg_match('#^[/?]#', $methodName)) {
|
||||
$this->_targetUri = rtrim($this->_targetUri, '/') . '/';
|
||||
}
|
||||
$this->_targetUri = $this->_targetUri . $methodName;
|
||||
return $this;
|
||||
}
|
||||
}
|
81
airtime_mvc/library/Zend/Amf/Value/MessageHeader.php
Normal file
81
airtime_mvc/library/Zend/Amf/Value/MessageHeader.php
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: MessageHeader.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Message Headers provide context for the processing of the
|
||||
* the AMF Packet and all subsequent Messages.
|
||||
*
|
||||
* Multiple Message Headers may be included within an AMF Packet.
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_MessageHeader
|
||||
{
|
||||
/**
|
||||
* Name of the header
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Flag if the data has to be parsed on return
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
public $mustRead;
|
||||
|
||||
/**
|
||||
* Length of the data field
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $length;
|
||||
|
||||
/**
|
||||
* Data sent with the header name
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* Used to create and store AMF Header data.
|
||||
*
|
||||
* @param String $name
|
||||
* @param Boolean $mustRead
|
||||
* @param misc $content
|
||||
* @param integer $length
|
||||
*/
|
||||
public function __construct($name, $mustRead, $data, $length=null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->mustRead = (bool) $mustRead;
|
||||
$this->data = $data;
|
||||
if (null !== $length) {
|
||||
$this->length = (int) $length;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: AbstractMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is the default Implementation of Message, which provides
|
||||
* a convenient base for behavior and association of common endpoints
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_AbstractMessage
|
||||
{
|
||||
/**
|
||||
* @var string Client identifier
|
||||
*/
|
||||
public $clientId;
|
||||
|
||||
/**
|
||||
* @var string Destination
|
||||
*/
|
||||
public $destination;
|
||||
|
||||
/**
|
||||
* @var string Message identifier
|
||||
*/
|
||||
public $messageId;
|
||||
|
||||
/**
|
||||
* @var int Message timestamp
|
||||
*/
|
||||
public $timestamp;
|
||||
|
||||
/**
|
||||
* @var int Message TTL
|
||||
*/
|
||||
public $timeToLive;
|
||||
|
||||
/**
|
||||
* @var object Message headers
|
||||
*/
|
||||
public $headers;
|
||||
|
||||
/**
|
||||
* @var string Message body
|
||||
*/
|
||||
public $body;
|
||||
|
||||
/**
|
||||
* generate a unique id
|
||||
*
|
||||
* Format is: ########-####-####-####-############
|
||||
* Where # is an uppercase letter or number
|
||||
* example: 6D9DC7EC-A273-83A9-ABE3-00005FD752D6
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateId()
|
||||
{
|
||||
return sprintf(
|
||||
'%08X-%04X-%04X-%02X%02X-%012X',
|
||||
mt_rand(),
|
||||
mt_rand(0, 65535),
|
||||
bindec(substr_replace(
|
||||
sprintf('%016b', mt_rand(0, 65535)), '0100', 11, 4)
|
||||
),
|
||||
bindec(substr_replace(sprintf('%08b', mt_rand(0, 255)), '01', 5, 2)),
|
||||
mt_rand(0, 255),
|
||||
mt_rand()
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: AcknowledgeMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/** Zend_Amf_Value_Messaging_AsyncMessage */
|
||||
require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
|
||||
|
||||
/**
|
||||
* This is the type of message returned by the MessageBroker
|
||||
* to endpoints after the broker has routed an endpoint's message
|
||||
* to a service.
|
||||
*
|
||||
* flex.messaging.messages.AcknowledgeMessage
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_AcknowledgeMessage extends Zend_Amf_Value_Messaging_AsyncMessage
|
||||
{
|
||||
/**
|
||||
* Create a new Acknowledge Message
|
||||
*
|
||||
* @param unknown_type $message
|
||||
*/
|
||||
public function __construct($message)
|
||||
{
|
||||
$this->clientId = $this->generateId();
|
||||
$this->destination = null;
|
||||
$this->messageId = $this->generateId();
|
||||
$this->timestamp = time().'00';
|
||||
$this->timeToLive = 0;
|
||||
$this->headers = new STDClass();
|
||||
$this->body = null;
|
||||
|
||||
// correleate the two messages
|
||||
if ($message && isset($message->messageId)) {
|
||||
$this->correlationId = $message->messageId;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ArrayCollection.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Type encapsulating Flex ArrayCollection
|
||||
*
|
||||
* Corresponds to flex.messaging.io.ArrayCollection
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_ArrayCollection
|
||||
{
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: AsyncMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/** Zend_Amf_Value_Messaging_AbstractMessage */
|
||||
require_once 'Zend/Amf/Value/Messaging/AbstractMessage.php';
|
||||
|
||||
/**
|
||||
* This type of message contains information necessary to perform
|
||||
* point-to-point or publish-subscribe messaging.
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_AsyncMessage extends Zend_Amf_Value_Messaging_AbstractMessage
|
||||
{
|
||||
/**
|
||||
* The message id to be responded to.
|
||||
* @var String
|
||||
*/
|
||||
public $correlationId;
|
||||
}
|
119
airtime_mvc/library/Zend/Amf/Value/Messaging/CommandMessage.php
Normal file
119
airtime_mvc/library/Zend/Amf/Value/Messaging/CommandMessage.php
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CommandMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see Zend_Amf_Value_Messaging_AsyncMessage
|
||||
*/
|
||||
require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
|
||||
|
||||
/**
|
||||
* A message that represents an infrastructure command passed between
|
||||
* client and server. Subscribe/unsubscribe operations result in
|
||||
* CommandMessage transmissions, as do polling operations.
|
||||
*
|
||||
* Corresponds to flex.messaging.messages.CommandMessage
|
||||
*
|
||||
* Note: THESE VALUES MUST BE THE SAME ON CLIENT AND SERVER
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_CommandMessage extends Zend_Amf_Value_Messaging_AsyncMessage
|
||||
{
|
||||
/**
|
||||
* This operation is used to subscribe to a remote destination.
|
||||
*/
|
||||
const SUBSCRIBE_OPERATION = 0;
|
||||
|
||||
/**
|
||||
* This operation is used to unsubscribe from a remote destination.
|
||||
*/
|
||||
const UNSUSBSCRIBE_OPERATION = 1;
|
||||
|
||||
/**
|
||||
* This operation is used to poll a remote destination for pending,
|
||||
* undelivered messages.
|
||||
*/
|
||||
const POLL_OPERATION = 2;
|
||||
|
||||
/**
|
||||
* This operation is used by a remote destination to sync missed or cached messages
|
||||
* back to a client as a result of a client issued poll command.
|
||||
*/
|
||||
const CLIENT_SYNC_OPERATION = 4;
|
||||
|
||||
/**
|
||||
* This operation is used to test connectivity over the current channel to
|
||||
* the remote endpoint.
|
||||
*/
|
||||
const CLIENT_PING_OPERATION = 5;
|
||||
|
||||
/**
|
||||
* This operation is used to request a list of failover endpoint URIs
|
||||
* for the remote destination based on cluster membership.
|
||||
*/
|
||||
const CLUSTER_REQUEST_OPERATION = 7;
|
||||
|
||||
/**
|
||||
* This operation is used to send credentials to the endpoint so that
|
||||
* the user can be logged in over the current channel.
|
||||
* The credentials need to be Base64 encoded and stored in the <code>body</code>
|
||||
* of the message.
|
||||
*/
|
||||
const LOGIN_OPERATION = 8;
|
||||
|
||||
/**
|
||||
* This operation is used to log the user out of the current channel, and
|
||||
* will invalidate the server session if the channel is HTTP based.
|
||||
*/
|
||||
const LOGOUT_OPERATION = 9;
|
||||
|
||||
/**
|
||||
* This operation is used to indicate that the client's subscription to a
|
||||
* remote destination has been invalidated.
|
||||
*/
|
||||
const SESSION_INVALIDATE_OPERATION = 10;
|
||||
|
||||
/**
|
||||
* This operation is used by the MultiTopicConsumer to subscribe/unsubscribe
|
||||
* from multiple subtopics/selectors in the same message.
|
||||
*/
|
||||
const MULTI_SUBSCRIBE_OPERATION = 11;
|
||||
|
||||
/**
|
||||
* This operation is used to indicate that a channel has disconnected
|
||||
*/
|
||||
const DISCONNECT_OPERATION = 12;
|
||||
|
||||
/**
|
||||
* This is the default operation for new CommandMessage instances.
|
||||
*/
|
||||
const UNKNOWN_OPERATION = 10000;
|
||||
|
||||
/**
|
||||
* The operation to execute for messages of this type
|
||||
* @var int
|
||||
*/
|
||||
public $operation = self::UNKNOWN_OPERATION;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ErrorMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/** @see Zend_Amf_Value_Messaging_AcknowledgeMessage */
|
||||
require_once 'Zend/Amf/Value/Messaging/AcknowledgeMessage.php';
|
||||
|
||||
/**
|
||||
* Creates the error message to report to flex the issue with the call
|
||||
*
|
||||
* Corresponds to flex.messaging.messages.ErrorMessage
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_ErrorMessage extends Zend_Amf_Value_Messaging_AcknowledgeMessage
|
||||
{
|
||||
/**
|
||||
* Additional data with error
|
||||
* @var object
|
||||
*/
|
||||
public $extendedData = null;
|
||||
|
||||
/**
|
||||
* Error code number
|
||||
* @var string
|
||||
*/
|
||||
public $faultCode;
|
||||
|
||||
/**
|
||||
* Description as to the cause of the error
|
||||
* @var string
|
||||
*/
|
||||
public $faultDetail;
|
||||
|
||||
/**
|
||||
* Short description of error
|
||||
* @var string
|
||||
*/
|
||||
public $faultString = '';
|
||||
|
||||
/**
|
||||
* root cause of error
|
||||
* @var object
|
||||
*/
|
||||
public $rootCause = null;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: RemotingMessage.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/** Zend_Amf_Value_Messaging_AbstractMessage */
|
||||
require_once 'Zend/Amf/Value/Messaging/AbstractMessage.php';
|
||||
|
||||
/**
|
||||
* This type of message contains information needed to perform
|
||||
* a Remoting invocation.
|
||||
*
|
||||
* Corresponds to flex.messaging.messages.RemotingMessage
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_Messaging_RemotingMessage extends Zend_Amf_Value_Messaging_AbstractMessage
|
||||
{
|
||||
|
||||
/**
|
||||
* The name of the service to be called including package name
|
||||
* @var String
|
||||
*/
|
||||
public $source;
|
||||
|
||||
/**
|
||||
* The name of the method to be called
|
||||
* @var string
|
||||
*/
|
||||
public $operation;
|
||||
|
||||
/**
|
||||
* The arguments to call the mathod with
|
||||
* @var array
|
||||
*/
|
||||
public $parameters;
|
||||
|
||||
/**
|
||||
* Create a new Remoting Message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->clientId = $this->generateId();
|
||||
$this->destination = null;
|
||||
$this->messageId = $this->generateId();
|
||||
$this->timestamp = time().'00';
|
||||
$this->timeToLive = 0;
|
||||
$this->headers = new stdClass();
|
||||
$this->body = null;
|
||||
}
|
||||
}
|
154
airtime_mvc/library/Zend/Amf/Value/TraitsInfo.php
Normal file
154
airtime_mvc/library/Zend/Amf/Value/TraitsInfo.php
Normal file
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TraitsInfo.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Amf_Value_TraitsInfo
|
||||
*
|
||||
* @package Zend_Amf
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Value_TraitsInfo
|
||||
{
|
||||
/**
|
||||
* @var string Class name
|
||||
*/
|
||||
protected $_className;
|
||||
|
||||
/**
|
||||
* @var bool Whether or not this is a dynamic class
|
||||
*/
|
||||
protected $_dynamic;
|
||||
|
||||
/**
|
||||
* @var bool Whether or not the class is externalizable
|
||||
*/
|
||||
protected $_externalizable;
|
||||
|
||||
/**
|
||||
* @var array Class properties
|
||||
*/
|
||||
protected $_properties;
|
||||
|
||||
/**
|
||||
* Used to keep track of all class traits of an AMF3 object
|
||||
*
|
||||
* @param string $className
|
||||
* @param boolean $dynamic
|
||||
* @param boolean $externalizable
|
||||
* @param boolean $properties
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($className, $dynamic=false, $externalizable=false, $properties=null)
|
||||
{
|
||||
$this->_className = $className;
|
||||
$this->_dynamic = $dynamic;
|
||||
$this->_externalizable = $externalizable;
|
||||
$this->_properties = $properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the class is a dynamic class
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isDynamic()
|
||||
{
|
||||
return $this->_dynamic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if class is externalizable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isExternalizable()
|
||||
{
|
||||
return $this->_externalizable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of properties in the class
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function length()
|
||||
{
|
||||
return count($this->_properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the class name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName()
|
||||
{
|
||||
return $this->_className;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an additional property
|
||||
*
|
||||
* @param string $name
|
||||
* @return Zend_Amf_Value_TraitsInfo
|
||||
*/
|
||||
public function addProperty($name)
|
||||
{
|
||||
$this->_properties[] = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all properties of the class.
|
||||
*
|
||||
* @param array $props
|
||||
* @return Zend_Amf_Value_TraitsInfo
|
||||
*/
|
||||
public function addAllProperties(array $props)
|
||||
{
|
||||
$this->_properties = $props;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the property at a given index
|
||||
*
|
||||
* @param int $index
|
||||
* @return string
|
||||
*/
|
||||
public function getProperty($index)
|
||||
{
|
||||
return $this->_properties[(int) $index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all properties of the class.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllProperties()
|
||||
{
|
||||
return $this->_properties;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue