mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 14:36:26 +01:00
Guide Tool Events
This commit is contained in:
parent
0e8e291455
commit
d3458229fd
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideOnDutyStatusMessageParser } from '../../parser/help/GuideOnDutyStatusMessageParser';
|
||||
|
||||
export class GuideOnDutyStatusMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideOnDutyStatusMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideOnDutyStatusMessageParser
|
||||
{
|
||||
return this.parser as GuideOnDutyStatusMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionAttachedMessageParser } from '../../parser/help/GuideSessionAttachedMessageParser';
|
||||
|
||||
export class GuideSessionAttachedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionAttachedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionAttachedMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionAttachedMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionDetachedMessageParser } from '../../parser/help/GuideSessionDetachedMessageParser';
|
||||
|
||||
export class GuideSessionDetachedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionDetachedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionDetachedMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionDetachedMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionEndedMessageParser } from '../../parser/help/GuideSessionEndedMessageParser';
|
||||
|
||||
export class GuideSessionEndedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionEndedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionEndedMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionEndedMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionErrorMessageParser } from '../../parser/help/GuideSessionErrorMessageParser';
|
||||
|
||||
export class GuideSessionErrorMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionErrorMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionErrorMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionErrorMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionInvitedToGuideRoomMessageParser } from '../../parser/help/GuideSessionInvitedToGuideRoomMessageParser';
|
||||
|
||||
export class GuideSessionInvitedToGuideRoomMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionInvitedToGuideRoomMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionInvitedToGuideRoomMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionInvitedToGuideRoomMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionMessageMessageParser } from '../../parser/help/GuideSessionMessageMessageParser';
|
||||
|
||||
export class GuideSessionMessageMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionMessageMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionMessageMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionMessageMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionPartnerIsTypingMessageParser } from '../../parser/help/GuideSessionPartnerIsTypingMessageParser';
|
||||
|
||||
export class GuideSessionPartnerIsTypingMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionPartnerIsTypingMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionPartnerIsTypingMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionPartnerIsTypingMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionRequesterRoomMessageParser } from '../../parser/help/GuideSessionRequesterRoomMessageParser';
|
||||
|
||||
export class GuideSessionRequesterRoomMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionRequesterRoomMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionRequesterRoomMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionRequesterRoomMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideSessionStartedMessageParser } from '../../parser/help/GuideSessionStartedMessageParser';
|
||||
|
||||
export class GuideSessionStartedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideSessionStartedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideSessionStartedMessageParser
|
||||
{
|
||||
return this.parser as GuideSessionStartedMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideTicketCreationResultMessageParser } from '../../parser/help/GuideTicketCreationResultMessageParser';
|
||||
|
||||
export class GuideTicketCreationResultMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideTicketCreationResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideTicketCreationResultMessageParser
|
||||
{
|
||||
return this.parser as GuideTicketCreationResultMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { GuideTicketResolutionMessageParser } from '../../parser/help/GuideTicketResolutionMessageParser';
|
||||
|
||||
export class GuideTicketResolutionMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, GuideTicketResolutionMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): GuideTicketResolutionMessageParser
|
||||
{
|
||||
return this.parser as GuideTicketResolutionMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { HotelMergeNameChangeParser } from '../../parser/help/HotelMergeNameChangeParser';
|
||||
|
||||
export class HotelMergeNameChangeEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, HotelMergeNameChangeParser);
|
||||
}
|
||||
|
||||
public getParser(): HotelMergeNameChangeParser
|
||||
{
|
||||
return this.parser as HotelMergeNameChangeParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { IssueCloseNotificationMessageParser } from '../../parser/help/IssueCloseNotificationMessageParser';
|
||||
|
||||
export class IssueCloseNotificationMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, IssueCloseNotificationMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): IssueCloseNotificationMessageParser
|
||||
{
|
||||
return this.parser as IssueCloseNotificationMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { QuizDataMessageParser } from '../../parser/help/QuizDataMessageParser';
|
||||
|
||||
export class QuizDataMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, QuizDataMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): QuizDataMessageParser
|
||||
{
|
||||
return this.parser as QuizDataMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { QuizResultsMessageParser } from '../../parser/help/QuizResultsMessageParser';
|
||||
|
||||
export class QuizResultsMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, QuizResultsMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): QuizResultsMessageParser
|
||||
{
|
||||
return this.parser as QuizResultsMessageParser;
|
||||
}
|
||||
}
|
@ -1,2 +1,18 @@
|
||||
export * from './CallForHelpDisabledNotifyMessageEvent';
|
||||
export * from './CallForHelpResultMessageEvent';
|
||||
export * from './GuideOnDutyStatusMessageEvent';
|
||||
export * from './GuideSessionAttachedMessageEvent';
|
||||
export * from './GuideSessionDetachedMessageEvent';
|
||||
export * from './GuideSessionEndedMessageEvent';
|
||||
export * from './GuideSessionErrorMessageEvent';
|
||||
export * from './GuideSessionInvitedToGuideRoomMessageEvent';
|
||||
export * from './GuideSessionMessageMessageEvent';
|
||||
export * from './GuideSessionPartnerIsTypingMessageEvent';
|
||||
export * from './GuideSessionRequesterRoomMessageEvent';
|
||||
export * from './GuideSessionStartedMessageEvent';
|
||||
export * from './GuideTicketCreationResultMessageEvent';
|
||||
export * from './GuideTicketResolutionMessageEvent';
|
||||
export * from './HotelMergeNameChangeEvent';
|
||||
export * from './IssueCloseNotificationMessageEvent';
|
||||
export * from './QuizDataMessageEvent';
|
||||
export * from './QuizResultsMessageEvent';
|
||||
|
@ -0,0 +1,51 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideOnDutyStatusMessageParser implements IMessageParser
|
||||
{
|
||||
private _onDuty: boolean;
|
||||
private _guidesOnDuty: number;
|
||||
private _helpersOnDuty: number;
|
||||
private _guardiansOnDuty: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._onDuty = false;
|
||||
this._guidesOnDuty = 0;
|
||||
this._helpersOnDuty = 0;
|
||||
this._guardiansOnDuty = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._onDuty = wrapper.readBoolean();
|
||||
this._guidesOnDuty = wrapper.readInt();
|
||||
this._helpersOnDuty = wrapper.readInt();
|
||||
this._guardiansOnDuty = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get onDuty(): boolean
|
||||
{
|
||||
return this._onDuty;
|
||||
}
|
||||
|
||||
public get guidesOnDuty(): number
|
||||
{
|
||||
return this._guidesOnDuty;
|
||||
}
|
||||
|
||||
public get helpersOnDuty(): number
|
||||
{
|
||||
return this._helpersOnDuty;
|
||||
}
|
||||
|
||||
public get guardiansOnDuty(): number
|
||||
{
|
||||
return this._guardiansOnDuty;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { PendingGuideTicketData } from './common/PendingGuideTicketData';
|
||||
|
||||
export class GuideReportingStatusMessageParser implements IMessageParser
|
||||
{
|
||||
public static readonly GUIDE_REPORTING_STATUS_OK: number = 0;
|
||||
public static readonly GUIDE_REPORTING_STATUS_PENDING_TICKET: number = 1;
|
||||
public static readonly GUIDE_REPORTING_STATUS_ABUSIVE: number = 2;
|
||||
public static readonly GUIDE_REPORTING_STATUS_REPORTING_TOO_QUICKLY: number = 3;
|
||||
|
||||
private _statusCode: number;
|
||||
private _pendingTicket: PendingGuideTicketData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._statusCode = 0;
|
||||
this._pendingTicket = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._statusCode = wrapper.readInt();
|
||||
this._pendingTicket = new PendingGuideTicketData(
|
||||
wrapper.readInt(),
|
||||
wrapper.readInt(),
|
||||
wrapper.readBoolean(),
|
||||
wrapper.readString(),
|
||||
wrapper.readString(),
|
||||
wrapper.readString(),
|
||||
wrapper.readString()
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get statusCode(): number
|
||||
{
|
||||
return this._statusCode;
|
||||
}
|
||||
|
||||
public get pendingTicket(): PendingGuideTicketData
|
||||
{
|
||||
return this._pendingTicket;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionAttachedMessageParser implements IMessageParser
|
||||
{
|
||||
private _asGuide: boolean;
|
||||
private _helpRequestType: number;
|
||||
private _helpRequestDescription: string;
|
||||
private _roleSpecificWaitTime: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._asGuide = false;
|
||||
this._helpRequestType = 0;
|
||||
this._helpRequestDescription = null;
|
||||
this._roleSpecificWaitTime = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._asGuide = wrapper.readBoolean();
|
||||
this._helpRequestType = wrapper.readInt();
|
||||
this._helpRequestDescription = wrapper.readString();
|
||||
this._roleSpecificWaitTime = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get asGuide(): boolean
|
||||
{
|
||||
return this._asGuide;
|
||||
}
|
||||
|
||||
public get helpRequestType(): number
|
||||
{
|
||||
return this._helpRequestType;
|
||||
}
|
||||
|
||||
public get helpRequestDescription(): string
|
||||
{
|
||||
return this._helpRequestDescription;
|
||||
}
|
||||
|
||||
public get roleSpecificWaitTime(): number
|
||||
{
|
||||
return this._roleSpecificWaitTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionDetachedMessageParser implements IMessageParser
|
||||
{
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionEndedMessageParser implements IMessageParser
|
||||
{
|
||||
private _endReason: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._endReason = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._endReason = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get endReason(): number
|
||||
{
|
||||
return this._endReason;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionErrorMessageParser implements IMessageParser
|
||||
{
|
||||
public static readonly ERROR_GENERIC: number = 0;
|
||||
public static readonly ERROR_GUIDES_REJECT: number = 1;
|
||||
public static readonly ERROR_NOT_ENOUGH_GUIDES: number = 2;
|
||||
public static readonly ERROR_NOT_ENOUGH_VOTES: number = 3;
|
||||
public static readonly ERROR_NO_CHATLOG_FOUND: number = 4;
|
||||
|
||||
private _errorCode: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._errorCode = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._errorCode = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get errorCode(): number
|
||||
{
|
||||
return this._errorCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionInvitedToGuideRoomMessageParser implements IMessageParser
|
||||
{
|
||||
private _roomId: number;
|
||||
private _roomName: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._roomId = 0;
|
||||
this._roomName = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._roomId = wrapper.readInt();
|
||||
this._roomName = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get roomName(): string
|
||||
{
|
||||
return this._roomName;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionMessageMessageParser implements IMessageParser
|
||||
{
|
||||
private _chatMessage: string;
|
||||
private _senderId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._chatMessage = null;
|
||||
this._senderId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._chatMessage = wrapper.readString();
|
||||
this._senderId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get chatMessage(): string
|
||||
{
|
||||
return this._chatMessage;
|
||||
}
|
||||
|
||||
public get senderId(): number
|
||||
{
|
||||
return this._senderId;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionPartnerIsTypingMessageParser implements IMessageParser
|
||||
{
|
||||
private _isTyping: boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._isTyping = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._isTyping = wrapper.readBoolean();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get isTyping(): boolean
|
||||
{
|
||||
return this._isTyping;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionRequesterRoomMessageParser implements IMessageParser
|
||||
{
|
||||
private _requesterRoomId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._requesterRoomId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._requesterRoomId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get requesterRoomId(): number
|
||||
{
|
||||
return this._requesterRoomId;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideSessionStartedMessageParser implements IMessageParser
|
||||
{
|
||||
private _requesterUserId: number;
|
||||
private _requesterName: string;
|
||||
private _requesterFigure: string;
|
||||
private _guideUserId: number;
|
||||
private _guideName: string;
|
||||
private _guideFigure: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._requesterUserId = 0;
|
||||
this._requesterName = null;
|
||||
this._requesterFigure = null;
|
||||
this._guideUserId = 0;
|
||||
this._guideName = null;
|
||||
this._guideFigure = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._requesterUserId = wrapper.readInt();
|
||||
this._requesterName = wrapper.readString();
|
||||
this._requesterFigure = wrapper.readString();
|
||||
this._guideUserId = wrapper.readInt();
|
||||
this._guideName = wrapper.readString();
|
||||
this._guideFigure = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get requesterUserId(): number
|
||||
{
|
||||
return this._requesterUserId;
|
||||
}
|
||||
|
||||
public get requesterName(): string
|
||||
{
|
||||
return this._requesterName;
|
||||
}
|
||||
|
||||
public get requesterFigure(): string
|
||||
{
|
||||
return this._requesterFigure;
|
||||
}
|
||||
|
||||
public get guideUserId(): number
|
||||
{
|
||||
return this._guideUserId;
|
||||
}
|
||||
|
||||
public get guideName(): string
|
||||
{
|
||||
return this._guideName;
|
||||
}
|
||||
|
||||
public get guideFigure(): string
|
||||
{
|
||||
return this._guideFigure;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideTicketCreationResultMessageParser implements IMessageParser
|
||||
{
|
||||
public static readonly CREATION_RESULT_OK: number = 0;
|
||||
public static readonly CREATION_RESULT_UNABLE_TO_REPORT: number = 1;
|
||||
public static readonly CREATION_RESULT_NO_CHATLOG_FOUND: number = 2;
|
||||
public static readonly CREATION_RESULT_BULLY_ALREADY_REPORTED: number = 3;
|
||||
|
||||
private _result: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._result = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._result = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get result(): number
|
||||
{
|
||||
return this._result;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class GuideTicketResolutionMessageParser implements IMessageParser
|
||||
{
|
||||
public static readonly RESOLUTION_GUARDIANS_TOOK_ACTION: number = 0;
|
||||
public static readonly RESOLUTION_FORWARDED_TO_MODERATORS: number = 1;
|
||||
public static readonly RESOLUTION_REPORTER_IS_ABUSIVE: number = 2;
|
||||
|
||||
private _resolution: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._resolution = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._resolution = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get resolution(): number
|
||||
{
|
||||
return this._resolution;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class HotelMergeNameChangeParser implements IMessageParser
|
||||
{
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class IssueCloseNotificationMessageParser implements IMessageParser
|
||||
{
|
||||
private _closeReason: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._closeReason = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._closeReason = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get closeReason(): number
|
||||
{
|
||||
return this._closeReason;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class QuizDataMessageParser implements IMessageParser
|
||||
{
|
||||
private _quizCode: string;
|
||||
private _questionIds: number[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._quizCode = null;
|
||||
this._questionIds = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._quizCode = wrapper.readString();
|
||||
|
||||
const size = wrapper.readInt();
|
||||
|
||||
this._questionIds = [];
|
||||
|
||||
for(let i = 0; i < size; i++) this._questionIds.push(wrapper.readInt());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get quizCode(): string
|
||||
{
|
||||
return this._quizCode;
|
||||
}
|
||||
|
||||
public get questionIds(): number[]
|
||||
{
|
||||
return this._questionIds;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class QuizResultsMessageParser implements IMessageParser
|
||||
{
|
||||
private _quizCode: string;
|
||||
private _questionIdsForWrongAnswers: number[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._quizCode = null;
|
||||
this._questionIdsForWrongAnswers = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._quizCode = wrapper.readString();
|
||||
|
||||
const size = wrapper.readInt();
|
||||
|
||||
this._questionIdsForWrongAnswers = [];
|
||||
|
||||
for(let i = 0; i < size; i++) this._questionIdsForWrongAnswers.push(wrapper.readInt());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get quizCode(): string
|
||||
{
|
||||
return this._quizCode;
|
||||
}
|
||||
|
||||
public get questionIdsForWrongAnswers(): number[]
|
||||
{
|
||||
return this._questionIdsForWrongAnswers;
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
export class PendingGuideTicketData
|
||||
{
|
||||
private _type: number;
|
||||
private _secondsAgo: number;
|
||||
private _isGuide: boolean;
|
||||
private _otherPartyName: string;
|
||||
private _otherPartyFigure: string;
|
||||
private _description: string;
|
||||
private _roomName: string;
|
||||
|
||||
constructor(type: number, secondsAgo: number, isGuide: boolean, otherPartyName: string, otherPartyFigure: string, description: string, roomName: string)
|
||||
{
|
||||
this._type = type;
|
||||
this._secondsAgo = secondsAgo;
|
||||
this._isGuide = isGuide;
|
||||
this._otherPartyName = otherPartyName;
|
||||
this._otherPartyFigure = otherPartyFigure;
|
||||
this._description = description;
|
||||
this._roomName = roomName;
|
||||
}
|
||||
|
||||
public get type(): number
|
||||
{
|
||||
return this._type;
|
||||
}
|
||||
|
||||
public set type(value: number)
|
||||
{
|
||||
this._type = value;
|
||||
}
|
||||
|
||||
public get secondsAgo(): number
|
||||
{
|
||||
return this._secondsAgo;
|
||||
}
|
||||
|
||||
public set secondsAgo(value: number)
|
||||
{
|
||||
this._secondsAgo = value;
|
||||
}
|
||||
|
||||
public get isGuide(): boolean
|
||||
{
|
||||
return this._isGuide;
|
||||
}
|
||||
|
||||
public set isGuide(value: boolean)
|
||||
{
|
||||
this._isGuide = value;
|
||||
}
|
||||
|
||||
public get otherPartyName(): string
|
||||
{
|
||||
return this._otherPartyName;
|
||||
}
|
||||
|
||||
public set otherPartyName(value: string)
|
||||
{
|
||||
this._otherPartyName = value;
|
||||
}
|
||||
|
||||
public get otherPartyFigure(): string
|
||||
{
|
||||
return this._otherPartyFigure;
|
||||
}
|
||||
|
||||
public set otherPartyFigure(value: string)
|
||||
{
|
||||
this._otherPartyFigure = value;
|
||||
}
|
||||
|
||||
public get description(): string
|
||||
{
|
||||
return this._description;
|
||||
}
|
||||
|
||||
public set description(value: string)
|
||||
{
|
||||
this._description = value;
|
||||
}
|
||||
|
||||
public get roomName(): string
|
||||
{
|
||||
return this._roomName;
|
||||
}
|
||||
|
||||
public set roomName(value: string)
|
||||
{
|
||||
this._roomName = value;
|
||||
}
|
||||
}
|
@ -1,2 +1,19 @@
|
||||
export * from './CallForHelpDisabledNotifyMessageParser';
|
||||
export * from './CallForHelpResultMessageParser';
|
||||
export * from './GuideOnDutyStatusMessageParser';
|
||||
export * from './GuideReportingStatusMessageParser';
|
||||
export * from './GuideSessionAttachedMessageParser';
|
||||
export * from './GuideSessionDetachedMessageParser';
|
||||
export * from './GuideSessionEndedMessageParser';
|
||||
export * from './GuideSessionErrorMessageParser';
|
||||
export * from './GuideSessionInvitedToGuideRoomMessageParser';
|
||||
export * from './GuideSessionMessageMessageParser';
|
||||
export * from './GuideSessionPartnerIsTypingMessageParser';
|
||||
export * from './GuideSessionRequesterRoomMessageParser';
|
||||
export * from './GuideSessionStartedMessageParser';
|
||||
export * from './GuideTicketCreationResultMessageParser';
|
||||
export * from './GuideTicketResolutionMessageParser';
|
||||
export * from './HotelMergeNameChangeParser';
|
||||
export * from './IssueCloseNotificationMessageParser';
|
||||
export * from './QuizDataMessageParser';
|
||||
export * from './QuizResultsMessageParser';
|
||||
|
Loading…
Reference in New Issue
Block a user