scripts
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Sony.NP
|
||||
{
|
||||
// Token: 0x0200010D RID: 269
|
||||
public class WordFilter
|
||||
{
|
||||
// Token: 0x060005AB RID: 1451
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern int PrxFilterComment(WordFilter.FilterCommentRequest request, out APIResult result);
|
||||
|
||||
// Token: 0x060005AC RID: 1452 RVA: 0x000100B8 File Offset: 0x0000F0B8
|
||||
public static int FilterComment(WordFilter.FilterCommentRequest request, WordFilter.SanitizedCommentResponse response)
|
||||
{
|
||||
if (response.locked)
|
||||
{
|
||||
throw new NpToolkitException("Response object is already locked");
|
||||
}
|
||||
APIResult apiresult;
|
||||
int num = WordFilter.PrxFilterComment(request, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
RequestBase.FinaliseRequest(request, response, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0200010E RID: 270
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class FilterCommentRequest : RequestBase
|
||||
{
|
||||
// Token: 0x170002AA RID: 682
|
||||
// (get) Token: 0x060005AE RID: 1454 RVA: 0x00010114 File Offset: 0x0000F114
|
||||
// (set) Token: 0x060005AF RID: 1455 RVA: 0x0001012C File Offset: 0x0000F12C
|
||||
public string Comment
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.comment;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.Length > 1024)
|
||||
{
|
||||
throw new NpToolkitException("The size of the string is more than " + 1024 + " characters.");
|
||||
}
|
||||
this.comment = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005B0 RID: 1456 RVA: 0x00010175 File Offset: 0x0000F175
|
||||
public FilterCommentRequest()
|
||||
: base(ServiceTypes.WordFilter, FunctionTypes.WordfilterFilterComment)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04000422 RID: 1058
|
||||
public const int MAX_SIZE_COMMENT = 1024;
|
||||
|
||||
// Token: 0x04000423 RID: 1059
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1025)]
|
||||
internal string comment;
|
||||
}
|
||||
|
||||
// Token: 0x0200010F RID: 271
|
||||
public class SanitizedCommentResponse : ResponseBase
|
||||
{
|
||||
// Token: 0x170002AB RID: 683
|
||||
// (get) Token: 0x060005B1 RID: 1457 RVA: 0x00010184 File Offset: 0x0000F184
|
||||
public string ResultComment
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.resultComment;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AC RID: 684
|
||||
// (get) Token: 0x060005B2 RID: 1458 RVA: 0x0001019C File Offset: 0x0000F19C
|
||||
public bool IsCommentChanged
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isCommentChanged;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005B3 RID: 1459 RVA: 0x000101B4 File Offset: 0x0000F1B4
|
||||
protected internal override void ReadResult(uint id, FunctionTypes apiCalled, RequestBase request)
|
||||
{
|
||||
base.ReadResult(id, apiCalled, request);
|
||||
APIResult apiresult;
|
||||
MemoryBuffer memoryBuffer = base.BeginReadResponseBuffer(id, apiCalled, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
memoryBuffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.WordFilterBegin);
|
||||
memoryBuffer.ReadString(ref this.resultComment);
|
||||
this.isCommentChanged = memoryBuffer.ReadBool();
|
||||
memoryBuffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.WordFilterEnd);
|
||||
base.EndReadResponseBuffer(memoryBuffer);
|
||||
}
|
||||
|
||||
// Token: 0x04000424 RID: 1060
|
||||
internal string resultComment;
|
||||
|
||||
// Token: 0x04000425 RID: 1061
|
||||
internal bool isCommentChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user