Merge branch 'oobjectt-email-change-result'

This commit is contained in:
dank074 2023-01-03 03:15:24 -06:00
commit 7857440d3e
6 changed files with 50 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -445,4 +445,5 @@ export class IncomingHeader
public static RENTABLE_SPACE_STATUS = 3559;
public static RENTABLE_SPACE_RENT_FAILED = 1868;
public static EMAIL_STATUS = 612;
public static CHANGE_EMAIL_RESULT = 1815;
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../api';
import { MessageEvent } from '../../../../../events';
import { ChangeEmailResultParser } from '../../parser';
export class ChangeEmailResultEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, ChangeEmailResultParser);
}
public getParser(): ChangeEmailResultParser
{
return this.parser as ChangeEmailResultParser;
}
}

View File

@ -1,6 +1,7 @@
export * from './access';
export * from './AccountSafetyLockStatusChangeMessageEvent';
export * from './ApproveNameMessageEvent';
export * from './ChangeEmailResultEvent';
export * from './data';
export * from './EmailStatusResultEvent';
export * from './ExtendedProfileChangedMessageEvent';

View File

@ -0,0 +1,29 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class ChangeEmailResultParser implements IMessageParser
{
public static readonly EMAIL_STATUS_OK: number = 0;
private _result: number;
public flush(): boolean
{
this._result = -1;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._result = wrapper.readInt();
return true;
}
public get result(): number
{
return this._result;
}
}

View File

@ -1,6 +1,7 @@
export * from './access';
export * from './AccountSafetyLockStatusChangeParser';
export * from './ApproveNameResultParser';
export * from './ChangeEmailResultParser';
export * from './data';
export * from './EmailStatusParser';
export * from './ExtendedProfileChangedMessageParser';