<?php /** * Simple value-class for recent ccu (when and how much). * Leaves in .helpers package to avoid accidental rewriting by database entity class generator. * * @author andrey.kuprishov */ class RecentCCU { /** * Time when ccu was logged. */ public $time; // long /** * Number of concurrent users logged. */ public $ccu; // int public function getTime() { return $this->time; } public function getCcu() { return $this->ccu; } } Hessian::mapRemoteType('gametool.helpers.RecentCCU', 'RecentCCU');
public function getItemResourceId() { return $this->itemResourceId; } public function getRuneResourceId() { return $this->runeResourceId; } public function getStackCount() { return $this->stackCount; } public function getCounter() { return $this->counter; } public function getSenderName() { return $this->senderName; } public function getSubject() { return $this->subject; } public function getBody() { return $this->body; } } Hessian::mapRemoteType('query.hessian.accounts.ItemToSend', 'ItemToSend');
<?php /** * Provides result of giving item to avatar. * Contains status, and id of item action if succeeded. * Value object. * * @author andrey.kuprishov */ class GiveItemResult { public $status; // GiveItemStatus /** * When succeeded item action id contains id of newly created action. */ public $itemActionId; // long public function getStatus() { return $this->status; } public function getItemActionId() { return $this->itemActionId; } } Hessian::mapRemoteType('query.hessian.accounts.GiveItemResult', 'GiveItemResult');
} class SubMoneyResult extends Result { } class ChangeAccountResult extends Result { } function registerBillingMethods($fullPath) { \Hessian::remoteMethod($fullPath, 'getAccount'); \Hessian::remoteMethod($fullPath, 'addMoney'); \Hessian::remoteMethod($fullPath, 'subMoney'); \Hessian::remoteMethod($fullPath, 'subMoneyWithCurrency'); \Hessian::remoteMethod($fullPath, 'setStatus'); \Hessian::remoteMethod($fullPath, 'addMoneyWithTranType'); \Hessian::remoteMethod($fullPath, 'addMoneyWithCurrency'); \Hessian::remoteMethod($fullPath, 'addMoneyToAll'); \Hessian::remoteMethod($fullPath, 'getAccountBonuses'); \Hessian::remoteMethod($fullPath, 'createAccountBonus'); \Hessian::remoteMethod($fullPath, 'removeAccountBonus'); } \Hessian::mapRemoteType('billingserver.billingdb.manager.AccountStatus', '\\billingApi\\AccountStatus'); \Hessian::mapRemoteType('billingserver.billingserverapi.Result$Status', '\\billingApi\\ResultStatus'); \Hessian::mapRemoteType('billingserver.billingserverapi.Result', '\\billingApi\\Result'); \Hessian::mapRemoteType('billingserver.billingserverapi.AccountInfoResult', '\\billingApi\\AccountInfoResult'); \Hessian::mapRemoteType('billingserver.billingserverapi.AddMoneyResult', '\\billingApi\\AddMoneyResult'); \Hessian::mapRemoteType('billingserver.billingserverapi.SubMoneyResult', '\\billingApi\\SubMoneyResult'); \Hessian::mapRemoteType('billingserver.billingserverapi.ChangeAccountResult', '\\billingApi\\ChangeAccountResult'); \Hessian::mapRemoteType('billingserver.commons.CurrencyValue', '\\billingApi\\CurrencyValue'); \Hessian::mapRemoteType('billingserver.commons.ItemMallCurrency', '\\billingApi\\ItemMallCurrency');
<?php class CCUSample { /** * Time when ccu was logged. */ public $timeSeconds; // int /** * Number of concurrent users logged. */ public $ccu; // int public function getTimeSeconds() { return $this->timeSeconds; } public function getCcu() { return $this->ccu; } } Hessian::mapRemoteType('gametool.helpers.CCUSample', 'CCUSample');
public function getAvatarId() { return $this->avatarId; } public function getItemResourceId() { return $this->itemResourceId; } public function getRuneResourceId() { return $this->runeResourceId; } public function getStackCount() { return $this->stackCount; } public function getCounter() { return $this->counter; } public function getStatus() { return $this->status; } public function getDebugInfo() { return $this->debugInfo; } } Hessian::mapRemoteType('query.hessian.accounts.ItemActionInfo', 'ItemActionInfo');
<?php require_once '../hessian/HessianClient.php'; require_once './accountApi.inc.php'; class CollectionEditionInfo { public $resourceId; public $info; } class CollectionEditionList extends ExecuteResult { public $editions; } class EditionOfAccountList extends ExecuteResult { public $editionResourceIds; } function registerEditionMethods($fullPath) { Hessian::remoteMethod($fullPath, 'getCollectionEditions'); Hessian::remoteMethod($fullPath, 'addEdition'); Hessian::remoteMethod($fullPath, 'removeEdition'); Hessian::remoteMethod($fullPath, 'getEditionsOfAccount'); Hessian::remoteMethod($fullPath, 'addEditionToAccount'); Hessian::remoteMethod($fullPath, 'removeEditionFromAccount'); } Hessian::mapRemoteType('api.collectionEditions.CollectionEditionInfo', 'CollectionEditionInfo'); Hessian::mapRemoteType('api.collectionEditions.CollectionEditionList', 'CollectionEditionList'); Hessian::mapRemoteType('api.collectionEditions.EditionOfAccountList', 'EditionOfAccountList');
* Status of giving item to avatar. Used in result. * * @see query.hessian.accounts.GiveItemResult * @author andrey.kuprishov */ class GiveItemStatus { public $name; public function __construct($value = '') { $this->name = $value; } public function equals($obj) { return $this->name == $obj->name; } public static function Succeeded() { return new GiveItemStatus('Succeeded'); } public static function ShardNotFound() { return new GiveItemStatus('ShardNotFound'); } public static function AvatarNotFound() { return new GiveItemStatus('AvatarNotFound'); } } Hessian::mapRemoteType('query.hessian.accounts.GiveItemStatus', 'GiveItemStatus');
public $name; // String /** * If true then we calculate hash(salt + password), if false - hash(password + salt). */ public $saltThenPwd; // boolean /** * Charset name used to provide raw bytes to hash method. E.g. 'UTF-8'. */ public $charsetName; // String public function getId() { return $this->id; } public function getName() { return $this->name; } public function isSaltThenPwd() { return $this->saltThenPwd; } public function getCharsetName() { return $this->charsetName; } } Hessian::mapRemoteType('api.account.HashAlgoInfo', 'HashAlgoInfo');
*/ class SendItemStatus { public $name; public function __construct($value = '') { $this->name = $value; } public function equals($obj) { return $this->name == $obj->name; } public static function ShardNotFound() { return new SendItemStatus('ShardNotFound'); } public static function AvatarNotFound() { return new SendItemStatus('AvatarNotFound'); } public static function NotSortedByShard() { return new SendItemStatus('NotSortedByShard'); } public static function SomeSucceeded() { return new SendItemStatus('SomeSucceeded'); } } Hessian::mapRemoteType('query.hessian.accounts.SendItemStatus', 'SendItemStatus');
/** * Result of cancelling pending item. * * @author andrey.kuprishov */ class CancelItemResult { public $name; public function __construct($value = '') { $this->name = $value; } public function equals($obj) { return $this->name == $obj->name; } public static function Cancelled() { return new CancelItemResult('Cancelled'); } public static function ItemActionNotFound() { return new CancelItemResult('ItemActionNotFound'); } public static function ItemActionIsNotPending() { return new CancelItemResult('ItemActionIsNotPending'); } } Hessian::mapRemoteType('query.hessian.accounts.CancelItemResult', 'CancelItemResult');
} public static function getEmpty() { return new AddonParams("", ""); } } class ShardHandlingMode { public $name; public function __construct($name) { $this->name = $name; } public static function WithoutStats() { return new ShardHandlingMode('WithoutStats'); } public static function Everything() { return new ShardHandlingMode('Everything'); } } Hessian::mapRemoteType('masterServer.commons.client.events.app.BasePartServersRequest', 'BasePartServersRequest'); Hessian::mapRemoteType('masterServer.commons.client.events.app.BasePartStatusRequest', 'BasePartStatusRequest'); Hessian::mapRemoteType('masterServer.commons.client.events.app.StartBasePartRequest', 'StartBasePartRequest'); Hessian::mapRemoteType('masterServer.commons.client.events.app.StopBasePartRequest', 'StopBasePartRequest'); Hessian::mapRemoteType('masterServer.commons.client.events.app.deferredStop.DeferredStopStartRequest', 'DeferredStopStartRequest'); Hessian::mapRemoteType('masterServer.commons.client.events.app.deferredStop.CancelDeferredStopRequest', 'CancelDeferredStopRequest'); Hessian::mapRemoteType('masterServer.commons.client.data.AddonParams', 'AddonParams'); Hessian::mapRemoteType('masterServer.commons.client.data.ShardHandlingMode', 'ShardHandlingMode');
* Whether avatar online or not. */ public $online; // boolean public function getAvatarId() { return $this->avatarId; } public function getAvatar() { return $this->avatar; } public function getShard() { return $this->shard; } public function getAvatarLevel() { return $this->avatarLevel; } public function isDeleted() { return $this->deleted; } public function isOnline() { return $this->online; } } Hessian::mapRemoteType('query.hessian.accounts.AvatarOnShard', 'AvatarOnShard');
public $type; // String /** * Path to resource in resource system. */ public $path; // String /** * Pairs of name->value data of resource. */ public $namedValues; // Map<String, String> public function getId() { return $this->id; } public function getType() { return $this->type; } public function getPath() { return $this->path; } public function getNamedValues() { return $this->namedValues; } } Hessian::mapRemoteType('query.hessian.resources.GametoolResource', 'GametoolResource');
<?php /** * Result of sending item. If succeeded contains ids of created actions. * * @author andrey.kuprishov */ class SendItemResult { public $status; // SendItemStatus public $error; // String public $actionIds; // long[] public function getStatus() { return $this->status; } public function getError() { return $this->error; } public function getActionIds() { return $this->actionIds; } } Hessian::mapRemoteType('query.hessian.accounts.SendItemResult', 'SendItemResult');