mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
Update packets
This commit is contained in:
parent
df861e08ed
commit
89db02a844
@ -7,38 +7,39 @@ export class CameraPublishStatusMessageParser implements IMessageParser
|
||||
private _secondsToWait: number = 0;
|
||||
private _extraDataId: string;
|
||||
|
||||
|
||||
public isOk(): boolean
|
||||
{
|
||||
return this._ok;
|
||||
}
|
||||
|
||||
public getSecondsToWait(): number
|
||||
{
|
||||
return this._secondsToWait;
|
||||
}
|
||||
|
||||
public getExtraDataId(): string
|
||||
{
|
||||
return this._extraDataId;
|
||||
}
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._ok = false;
|
||||
this._secondsToWait = 0;
|
||||
this._extraDataId = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k: IMessageDataWrapper): boolean
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._ok = k.readBoolean();
|
||||
this._secondsToWait = k.readInt();
|
||||
if(((this._ok) && (k.bytesAvailable)))
|
||||
{
|
||||
this._extraDataId = k.readString();
|
||||
}
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._ok = wrapper.readBoolean();
|
||||
this._secondsToWait = wrapper.readInt();
|
||||
|
||||
if(this._ok && wrapper.bytesAvailable) this._extraDataId = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get ok(): boolean
|
||||
{
|
||||
return this._ok;
|
||||
}
|
||||
|
||||
public get secondsToWait(): number
|
||||
{
|
||||
return this._secondsToWait;
|
||||
}
|
||||
|
||||
public get extraDataId(): string
|
||||
{
|
||||
return this._extraDataId;
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,15 @@ import { IMessageParser } from './../../../../../core/communication/messages/IMe
|
||||
|
||||
export class CameraPurchaseOKMessageParser implements IMessageParser
|
||||
{
|
||||
public flush():boolean
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3,22 +3,26 @@ import { IMessageParser } from './../../../../../core/communication/messages/IMe
|
||||
|
||||
export class CameraStorageUrlMessageParser implements IMessageParser
|
||||
{
|
||||
private _url:string;
|
||||
private _url: string;
|
||||
|
||||
public get url():string
|
||||
public flush(): boolean
|
||||
{
|
||||
this._url = '';
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._url = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get url(): string
|
||||
{
|
||||
return this._url;
|
||||
}
|
||||
|
||||
public flush():boolean
|
||||
{
|
||||
this._url = '';
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
{
|
||||
this._url = k.readString();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3,31 +3,34 @@ import { IMessageParser } from './../../../../../core/communication/messages/IMe
|
||||
|
||||
export class CompetitionStatusMessageParser implements IMessageParser
|
||||
{
|
||||
private _ok:boolean = false;
|
||||
private _errorReason:string = null;
|
||||
private _ok: boolean = false;
|
||||
private _errorReason: string = null;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._ok = false;
|
||||
this._errorReason = null;
|
||||
|
||||
public isOk():boolean
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._ok = wrapper.readBoolean();
|
||||
this._errorReason = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get ok(): boolean
|
||||
{
|
||||
return this._ok;
|
||||
}
|
||||
|
||||
public getErrorReason():string
|
||||
public get errorReason(): string
|
||||
{
|
||||
return this._errorReason;
|
||||
}
|
||||
|
||||
public flush():boolean
|
||||
{
|
||||
this._ok = false;
|
||||
this._errorReason = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
{
|
||||
this._ok = k.readBoolean();
|
||||
this._errorReason = k.readString();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3,42 +3,43 @@ import { IMessageParser } from './../../../../../core/communication/messages/IMe
|
||||
|
||||
export class InitCameraMessageParser implements IMessageParser
|
||||
{
|
||||
private _creditPrice:number = 0;
|
||||
private _ducketPrice:number = 0;
|
||||
private _publishDucketPrice:number = 0;
|
||||
private _creditPrice: number = 0;
|
||||
private _ducketPrice: number = 0;
|
||||
private _publishDucketPrice: number = 0;
|
||||
|
||||
|
||||
public getCreditPrice():number
|
||||
{
|
||||
return this._creditPrice;
|
||||
}
|
||||
|
||||
public getDucketPrice():number
|
||||
{
|
||||
return this._ducketPrice;
|
||||
}
|
||||
|
||||
public getPublishDucketPrice():number
|
||||
{
|
||||
return this._publishDucketPrice;
|
||||
}
|
||||
|
||||
public flush():boolean
|
||||
public flush(): boolean
|
||||
{
|
||||
this._creditPrice = 0;
|
||||
this._ducketPrice = 0;
|
||||
this._publishDucketPrice = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._creditPrice = k.readInt();
|
||||
this._ducketPrice = k.readInt();
|
||||
if(k.bytesAvailable)
|
||||
{
|
||||
this._publishDucketPrice = k.readInt();
|
||||
}
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._creditPrice = wrapper.readInt();
|
||||
this._ducketPrice = wrapper.readInt();
|
||||
|
||||
if(wrapper.bytesAvailable) this._publishDucketPrice = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get creditPrice(): number
|
||||
{
|
||||
return this._creditPrice;
|
||||
}
|
||||
|
||||
public get ducketPrice(): number
|
||||
{
|
||||
return this._ducketPrice;
|
||||
}
|
||||
|
||||
public get publishDucketPrice(): number
|
||||
{
|
||||
return this._publishDucketPrice;
|
||||
}
|
||||
}
|
||||
|
@ -3,34 +3,36 @@ import { IMessageParser } from './../../../../../core/communication/messages/IMe
|
||||
|
||||
export class ThumbnailStatusMessageParser implements IMessageParser
|
||||
{
|
||||
private _ok:boolean = true;
|
||||
private _renderLimitHit:boolean = false;
|
||||
private _ok: boolean = true;
|
||||
private _renderLimitHit: boolean = false;
|
||||
|
||||
|
||||
public isOk():boolean
|
||||
{
|
||||
return this._ok;
|
||||
}
|
||||
|
||||
public isRenderLimitHit():boolean
|
||||
{
|
||||
return this._renderLimitHit;
|
||||
}
|
||||
|
||||
public flush():boolean
|
||||
public flush(): boolean
|
||||
{
|
||||
this._ok = true;
|
||||
this._renderLimitHit = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(k.bytesAvailable)
|
||||
if(!wrapper) return false;
|
||||
|
||||
if(wrapper.bytesAvailable)
|
||||
{
|
||||
this._ok = k.readBoolean();
|
||||
this._renderLimitHit = k.readBoolean();
|
||||
this._ok = wrapper.readBoolean();
|
||||
this._renderLimitHit = wrapper.readBoolean();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get ok(): boolean
|
||||
{
|
||||
return this._ok;
|
||||
}
|
||||
|
||||
public get isRenderLimitHit(): boolean
|
||||
{
|
||||
return this._renderLimitHit;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user