You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class PhoneCollectionStateParser implements IMessageParser
|
||||
{
|
||||
private _phoneStatusCode: number;
|
||||
private _collectionStatusCode: number;
|
||||
private _millisecondsToAllowProcessReset: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._phoneStatusCode = -1;
|
||||
this._millisecondsToAllowProcessReset = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._phoneStatusCode = wrapper.readInt();
|
||||
this._collectionStatusCode = wrapper.readInt();
|
||||
this._millisecondsToAllowProcessReset = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get phoneStatusCode(): number
|
||||
{
|
||||
return this._phoneStatusCode;
|
||||
}
|
||||
|
||||
public get collectionStatusCode(): number
|
||||
{
|
||||
return this._collectionStatusCode;
|
||||
}
|
||||
|
||||
public get millisecondsToAllowProcessReset(): number
|
||||
{
|
||||
return this._millisecondsToAllowProcessReset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class TryPhoneNumberResultParser implements IMessageParser
|
||||
{
|
||||
private _resultCode: number;
|
||||
private _millisToAllowProcessReset: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._resultCode = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._resultCode = wrapper.readInt();
|
||||
this._millisToAllowProcessReset = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get resultCode(): number
|
||||
{
|
||||
return this._resultCode;
|
||||
}
|
||||
|
||||
public get millisToAllowProcessReset(): number
|
||||
{
|
||||
return this._millisToAllowProcessReset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class TryVerificationCodeResultParser implements IMessageParser
|
||||
{
|
||||
private _resultCode: number;
|
||||
private _millisecondsToAllowProcessReset: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._resultCode = -1;
|
||||
this._millisecondsToAllowProcessReset = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._resultCode = wrapper.readInt();
|
||||
this._millisecondsToAllowProcessReset = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get resultCode(): number
|
||||
{
|
||||
return this._resultCode;
|
||||
}
|
||||
|
||||
public get millisToAllowProcessReset(): number
|
||||
{
|
||||
return this._millisecondsToAllowProcessReset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './PhoneCollectionStateParser';
|
||||
export * from './TryPhoneNumberResultParser';
|
||||
export * from './TryVerificationCodeResultParser';
|
||||
Reference in New Issue
Block a user