'init'
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import Packet from "../packet";
|
||||
import Stream from "../stream";
|
||||
|
||||
export class PacketAppUpdate extends Packet {
|
||||
|
||||
private url: string = "";
|
||||
private version: string = "";
|
||||
private kernelVersionRequired: string = "";
|
||||
|
||||
public getPacketId(): number {
|
||||
return 0x0E;
|
||||
}
|
||||
|
||||
public _receive(stream: Stream): void {
|
||||
this.url = stream.readString();
|
||||
this.version = stream.readString();
|
||||
this.kernelVersionRequired = stream.readString();
|
||||
}
|
||||
|
||||
|
||||
public _send(): Promise<Stream> | Stream {
|
||||
let stream = new Stream();
|
||||
stream.writeInt16(this.getPacketId());
|
||||
stream.writeString(this.url);
|
||||
stream.writeString(this.version);
|
||||
stream.writeString(this.kernelVersionRequired);
|
||||
return stream;
|
||||
}
|
||||
|
||||
public getUrl(): string {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
public setUrl(url: string): void {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public getVersion(): string {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public setVersion(version: string): void {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public getKernelVersionRequired(): string {
|
||||
return this.kernelVersionRequired;
|
||||
}
|
||||
|
||||
public setKernelVersionRequired(kernelVersionRequired: string): void {
|
||||
this.kernelVersionRequired = kernelVersionRequired;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user