123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- namespace huo\controller\queue;
- use huo\controller\request\Channel;
- use huo\controller\request\Crash;
- use huo\controller\request\Device;
- use huo\controller\request\Game;
- use huolib\queue\constant\EventConst;
- class App extends SdkQueue {
-
- public function activation(Device $device_rq, Game $game_rq, Channel $agent_rq) {
- $this->param['event'] = EventConst::EVENT_APP_ACTIVATION;
- $this->setParamDevice($device_rq);
- $this->setParamGame($game_rq);
- $this->setParamChannel($agent_rq);
- return $this->pushQueue();
- }
-
- public function startup(Device $device_rq, Game $game_rq, Channel $agent_rq) {
- $this->param['event'] = EventConst::EVENT_APP_STARTUP;
- $this->setParamDevice($device_rq);
- $this->setParamGame($game_rq);
- $this->setParamChannel($agent_rq);
- return $this->pushQueue();
- }
-
- public function crash(Device $device_rq, Game $game_rq, Channel $agent_rq, Crash $crash_rq) {
- $this->param['event'] = EventConst::EVENT_APP_CRASH;
- $this->setParamDevice($device_rq);
- $this->setParamGame($game_rq);
- $this->setParamChannel($agent_rq);
- $this->param['crash'] = [
- 'active' => $crash_rq->getActive(),
- 'msg' => $crash_rq->getMsg(),
- ];
- return $this->pushQueue();
- }
-
- public function heartbeat(Device $device_rq, Game $game_rq, Channel $agent_rq) {
- $this->param['event'] = EventConst::EVENT_APP_HEARTBEAT;
- $this->setParamDevice($device_rq);
- $this->setParamGame($game_rq);
- $this->setParamChannel($agent_rq);
- return $this->pushQueue();
- }
- }
|