scripts
This commit is contained in:
@@ -0,0 +1,441 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Sony.NP
|
||||
{
|
||||
// Token: 0x02000105 RID: 261
|
||||
public class UserProfiles
|
||||
{
|
||||
// Token: 0x06000584 RID: 1412
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern void PrxGetLocalLoginUserIds([MarshalAs(UnmanagedType.LPArray, SizeConst = 4)] [Out] UserProfiles.LocalLoginUserId[] users, int maxSize, out APIResult result);
|
||||
|
||||
// Token: 0x06000585 RID: 1413
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern int PrxGetNpProfiles(UserProfiles.GetNpProfilesRquest request, out APIResult result);
|
||||
|
||||
// Token: 0x06000586 RID: 1414
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern int PrxGetVerifiedAccountsForTitle(UserProfiles.GetVerifiedAccountsForTitleRequest request, out APIResult result);
|
||||
|
||||
// Token: 0x06000587 RID: 1415
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern int PrxDisplayUserProfileDialog(UserProfiles.DisplayUserProfileDialogRequest request, out APIResult result);
|
||||
|
||||
// Token: 0x06000588 RID: 1416
|
||||
[DllImport("UnityNpToolkit2")]
|
||||
private static extern int PrxDisplayGriefReportingDialog(UserProfiles.DisplayGriefReportingDialogRequest request, out APIResult result);
|
||||
|
||||
// Token: 0x06000589 RID: 1417 RVA: 0x0000FBD4 File Offset: 0x0000EBD4
|
||||
public static void GetLocalUsers(UserProfiles.LocalUsers users)
|
||||
{
|
||||
APIResult apiresult;
|
||||
UserProfiles.PrxGetLocalLoginUserIds(users.localUsers, 4, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600058A RID: 1418 RVA: 0x0000FC08 File Offset: 0x0000EC08
|
||||
public static int GetNpProfiles(UserProfiles.GetNpProfilesRquest request, UserProfiles.NpProfilesResponse response)
|
||||
{
|
||||
if (response.locked)
|
||||
{
|
||||
throw new NpToolkitException("Response object is already locked");
|
||||
}
|
||||
APIResult apiresult;
|
||||
int num = UserProfiles.PrxGetNpProfiles(request, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
RequestBase.FinaliseRequest(request, response, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600058B RID: 1419 RVA: 0x0000FC5C File Offset: 0x0000EC5C
|
||||
public static int GetVerifiedAccountsForTitle(UserProfiles.GetVerifiedAccountsForTitleRequest request, UserProfiles.NpProfilesResponse response)
|
||||
{
|
||||
if (response.locked)
|
||||
{
|
||||
throw new NpToolkitException("Response object is already locked");
|
||||
}
|
||||
APIResult apiresult;
|
||||
int num = UserProfiles.PrxGetVerifiedAccountsForTitle(request, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
RequestBase.FinaliseRequest(request, response, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600058C RID: 1420 RVA: 0x0000FCB0 File Offset: 0x0000ECB0
|
||||
public static int DisplayUserProfileDialog(UserProfiles.DisplayUserProfileDialogRequest request, Core.EmptyResponse response)
|
||||
{
|
||||
if (response.locked)
|
||||
{
|
||||
throw new NpToolkitException("Response object is already locked");
|
||||
}
|
||||
APIResult apiresult;
|
||||
int num = UserProfiles.PrxDisplayUserProfileDialog(request, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
RequestBase.FinaliseRequest(request, response, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600058D RID: 1421 RVA: 0x0000FD04 File Offset: 0x0000ED04
|
||||
public static int DisplayGriefReportingDialog(UserProfiles.DisplayGriefReportingDialogRequest request, Core.EmptyResponse response)
|
||||
{
|
||||
if (response.locked)
|
||||
{
|
||||
throw new NpToolkitException("Response object is already locked.");
|
||||
}
|
||||
if (!request.reportAboutMe && !request.reportName && !request.reportOnlineId && !request.reportAboutMe)
|
||||
{
|
||||
throw new NpToolkitException("It is mandatory to specify at least one reason for the report.");
|
||||
}
|
||||
APIResult apiresult;
|
||||
int num = UserProfiles.PrxDisplayGriefReportingDialog(request, out apiresult);
|
||||
if (apiresult.RaiseException)
|
||||
{
|
||||
throw new NpToolkitException(apiresult);
|
||||
}
|
||||
RequestBase.FinaliseRequest(request, response, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x02000106 RID: 262
|
||||
public class LocalUsers
|
||||
{
|
||||
// Token: 0x1700029D RID: 669
|
||||
// (get) Token: 0x0600058F RID: 1423 RVA: 0x0000FD90 File Offset: 0x0000ED90
|
||||
public UserProfiles.LocalLoginUserId[] LocalUsersIds
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.localUsers;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000412 RID: 1042
|
||||
public const int MaxLocalUsers = 4;
|
||||
|
||||
// Token: 0x04000413 RID: 1043
|
||||
internal UserProfiles.LocalLoginUserId[] localUsers = new UserProfiles.LocalLoginUserId[4];
|
||||
}
|
||||
|
||||
// Token: 0x02000107 RID: 263
|
||||
public struct LocalLoginUserId
|
||||
{
|
||||
// Token: 0x1700029E RID: 670
|
||||
// (get) Token: 0x06000591 RID: 1425 RVA: 0x0000FDC0 File Offset: 0x0000EDC0
|
||||
public Core.UserServiceUserId UserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.userId;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700029F RID: 671
|
||||
// (get) Token: 0x06000592 RID: 1426 RVA: 0x0000FDD8 File Offset: 0x0000EDD8
|
||||
public Core.NpAccountId AccountId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.accountId;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002A0 RID: 672
|
||||
// (get) Token: 0x06000593 RID: 1427 RVA: 0x0000FDF0 File Offset: 0x0000EDF0
|
||||
public int SceErrorCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sceErrorCode;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000414 RID: 1044
|
||||
internal Core.UserServiceUserId userId;
|
||||
|
||||
// Token: 0x04000415 RID: 1045
|
||||
internal Core.NpAccountId accountId;
|
||||
|
||||
// Token: 0x04000416 RID: 1046
|
||||
internal int sceErrorCode;
|
||||
}
|
||||
|
||||
// Token: 0x02000108 RID: 264
|
||||
public class NpProfilesResponse : ResponseBase
|
||||
{
|
||||
// Token: 0x170002A1 RID: 673
|
||||
// (get) Token: 0x06000594 RID: 1428 RVA: 0x0000FE08 File Offset: 0x0000EE08
|
||||
public Profiles.Profile[] Profiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.profiles;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000595 RID: 1429 RVA: 0x0000FE20 File Offset: 0x0000EE20
|
||||
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.NpProfilesBegin);
|
||||
uint num = memoryBuffer.ReadUInt32();
|
||||
this.profiles = new Profiles.Profile[num];
|
||||
int num2 = 0;
|
||||
while ((long)num2 < (long)((ulong)num))
|
||||
{
|
||||
this.profiles[num2] = new Profiles.Profile();
|
||||
this.profiles[num2].Read(memoryBuffer);
|
||||
num2++;
|
||||
}
|
||||
memoryBuffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.NpProfilesEnd);
|
||||
base.EndReadResponseBuffer(memoryBuffer);
|
||||
}
|
||||
|
||||
// Token: 0x04000417 RID: 1047
|
||||
internal Profiles.Profile[] profiles;
|
||||
}
|
||||
|
||||
// Token: 0x02000109 RID: 265
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class GetNpProfilesRquest : RequestBase
|
||||
{
|
||||
// Token: 0x170002A2 RID: 674
|
||||
// (get) Token: 0x06000597 RID: 1431 RVA: 0x0000FEC4 File Offset: 0x0000EEC4
|
||||
// (set) Token: 0x06000598 RID: 1432 RVA: 0x0000FF0C File Offset: 0x0000EF0C
|
||||
public Core.NpAccountId[] AccountIds
|
||||
{
|
||||
get
|
||||
{
|
||||
Core.NpAccountId[] array;
|
||||
if (this.numValidAccountIds == 0U)
|
||||
{
|
||||
array = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.NpAccountId[] array2 = new Core.NpAccountId[this.numValidAccountIds];
|
||||
Array.Copy(this.accountIds, array2, (long)((ulong)this.numValidAccountIds));
|
||||
array = array2;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
if (value.Length > 50)
|
||||
{
|
||||
throw new NpToolkitException("The size of the Account ids array is more than " + 50);
|
||||
}
|
||||
value.CopyTo(this.accountIds, 0);
|
||||
this.numValidAccountIds = (uint)value.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.numValidAccountIds = 0U;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000599 RID: 1433 RVA: 0x0000FF6C File Offset: 0x0000EF6C
|
||||
public GetNpProfilesRquest()
|
||||
: base(ServiceTypes.UserProfile, FunctionTypes.UserProfileGetNpProfiles)
|
||||
{
|
||||
this.accountIds = new Core.NpAccountId[50];
|
||||
this.numValidAccountIds = 0U;
|
||||
}
|
||||
|
||||
// Token: 0x04000418 RID: 1048
|
||||
public const int MAX_SIZE_ACCOUNT_IDS = 50;
|
||||
|
||||
// Token: 0x04000419 RID: 1049
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)]
|
||||
internal Core.NpAccountId[] accountIds;
|
||||
|
||||
// Token: 0x0400041A RID: 1050
|
||||
internal uint numValidAccountIds;
|
||||
}
|
||||
|
||||
// Token: 0x0200010A RID: 266
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class GetVerifiedAccountsForTitleRequest : RequestBase
|
||||
{
|
||||
// Token: 0x170002A3 RID: 675
|
||||
// (get) Token: 0x0600059A RID: 1434 RVA: 0x0000FF90 File Offset: 0x0000EF90
|
||||
// (set) Token: 0x0600059B RID: 1435 RVA: 0x0000FFA8 File Offset: 0x0000EFA8
|
||||
public uint Limit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.limit;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.limit = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600059C RID: 1436 RVA: 0x0000FFB2 File Offset: 0x0000EFB2
|
||||
public GetVerifiedAccountsForTitleRequest()
|
||||
: base(ServiceTypes.UserProfile, FunctionTypes.UserProfileGetVerifiedAccountsForTitle)
|
||||
{
|
||||
this.limit = 10U;
|
||||
}
|
||||
|
||||
// Token: 0x0400041B RID: 1051
|
||||
internal uint limit;
|
||||
}
|
||||
|
||||
// Token: 0x0200010B RID: 267
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class DisplayUserProfileDialogRequest : RequestBase
|
||||
{
|
||||
// Token: 0x170002A4 RID: 676
|
||||
// (get) Token: 0x0600059D RID: 1437 RVA: 0x0000FFC8 File Offset: 0x0000EFC8
|
||||
// (set) Token: 0x0600059E RID: 1438 RVA: 0x0000FFE0 File Offset: 0x0000EFE0
|
||||
public Core.NpAccountId TargetAccountId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.targetAccountId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.targetAccountId = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600059F RID: 1439 RVA: 0x0000FFEA File Offset: 0x0000EFEA
|
||||
public DisplayUserProfileDialogRequest()
|
||||
: base(ServiceTypes.UserProfile, FunctionTypes.UserProfileDisplayUserProfileDialog)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400041C RID: 1052
|
||||
internal Core.NpAccountId targetAccountId;
|
||||
}
|
||||
|
||||
// Token: 0x0200010C RID: 268
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class DisplayGriefReportingDialogRequest : RequestBase
|
||||
{
|
||||
// Token: 0x170002A5 RID: 677
|
||||
// (get) Token: 0x060005A0 RID: 1440 RVA: 0x0000FFF8 File Offset: 0x0000EFF8
|
||||
// (set) Token: 0x060005A1 RID: 1441 RVA: 0x00010010 File Offset: 0x0000F010
|
||||
public Core.NpAccountId TargetAccountId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.targetAccountId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.targetAccountId = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002A6 RID: 678
|
||||
// (get) Token: 0x060005A2 RID: 1442 RVA: 0x0001001C File Offset: 0x0000F01C
|
||||
// (set) Token: 0x060005A3 RID: 1443 RVA: 0x00010034 File Offset: 0x0000F034
|
||||
public bool ReportOnlineId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reportOnlineId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.reportOnlineId = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002A7 RID: 679
|
||||
// (get) Token: 0x060005A4 RID: 1444 RVA: 0x00010040 File Offset: 0x0000F040
|
||||
// (set) Token: 0x060005A5 RID: 1445 RVA: 0x00010058 File Offset: 0x0000F058
|
||||
public bool ReportName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reportName;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.reportName = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002A8 RID: 680
|
||||
// (get) Token: 0x060005A6 RID: 1446 RVA: 0x00010064 File Offset: 0x0000F064
|
||||
// (set) Token: 0x060005A7 RID: 1447 RVA: 0x0001007C File Offset: 0x0000F07C
|
||||
public bool ReportPicture
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reportPicture;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.reportPicture = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002A9 RID: 681
|
||||
// (get) Token: 0x060005A8 RID: 1448 RVA: 0x00010088 File Offset: 0x0000F088
|
||||
// (set) Token: 0x060005A9 RID: 1449 RVA: 0x000100A0 File Offset: 0x0000F0A0
|
||||
public bool ReportAboutMe
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reportAboutMe;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.reportAboutMe = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060005AA RID: 1450 RVA: 0x000100AA File Offset: 0x0000F0AA
|
||||
public DisplayGriefReportingDialogRequest()
|
||||
: base(ServiceTypes.UserProfile, FunctionTypes.UserProfileDisplayGriefReportingDialog)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400041D RID: 1053
|
||||
public Core.NpAccountId targetAccountId;
|
||||
|
||||
// Token: 0x0400041E RID: 1054
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool reportOnlineId;
|
||||
|
||||
// Token: 0x0400041F RID: 1055
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool reportName;
|
||||
|
||||
// Token: 0x04000420 RID: 1056
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool reportPicture;
|
||||
|
||||
// Token: 0x04000421 RID: 1057
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool reportAboutMe;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user