Files
2026-06-04 11:42:34 +02:00

339 lines
8.8 KiB
C#

using System;
namespace Sony.NP
{
// Token: 0x020000C2 RID: 194
public class Profiles
{
// Token: 0x020000C3 RID: 195
public class RealName
{
// Token: 0x170001BF RID: 447
// (get) Token: 0x060003DB RID: 987 RVA: 0x0000BCAC File Offset: 0x0000ACAC
public string FirstName
{
get
{
return this.firstName;
}
}
// Token: 0x170001C0 RID: 448
// (get) Token: 0x060003DC RID: 988 RVA: 0x0000BCC4 File Offset: 0x0000ACC4
public string MiddleName
{
get
{
return this.middleName;
}
}
// Token: 0x170001C1 RID: 449
// (get) Token: 0x060003DD RID: 989 RVA: 0x0000BCDC File Offset: 0x0000ACDC
public string LastName
{
get
{
return this.lastName;
}
}
// Token: 0x060003DE RID: 990 RVA: 0x0000BCF4 File Offset: 0x0000ACF4
internal void Read(MemoryBuffer buffer)
{
buffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.RealNameBegin);
buffer.ReadString(ref this.firstName);
buffer.ReadString(ref this.middleName);
buffer.ReadString(ref this.lastName);
buffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.RealNameEnd);
}
// Token: 0x040002F7 RID: 759
public const int MAX_SIZE_FIRST_NAME = 16;
// Token: 0x040002F8 RID: 760
public const int MAX_SIZE_MIDDLE_NAME = 16;
// Token: 0x040002F9 RID: 761
public const int MAX_SIZE_LAST_NAME = 16;
// Token: 0x040002FA RID: 762
internal string firstName = "";
// Token: 0x040002FB RID: 763
internal string middleName = "";
// Token: 0x040002FC RID: 764
internal string lastName = "";
}
// Token: 0x020000C4 RID: 196
public class Profile
{
// Token: 0x170001C2 RID: 450
// (get) Token: 0x060003E0 RID: 992 RVA: 0x0000BD5C File Offset: 0x0000AD5C
public Core.OnlineUser OnlineUser
{
get
{
return this.onlineUser;
}
}
// Token: 0x170001C3 RID: 451
// (get) Token: 0x060003E1 RID: 993 RVA: 0x0000BD74 File Offset: 0x0000AD74
public Profiles.Profile.RelationTypes RelationType
{
get
{
return this.relationType;
}
}
// Token: 0x170001C4 RID: 452
// (get) Token: 0x060003E2 RID: 994 RVA: 0x0000BD8C File Offset: 0x0000AD8C
public Core.CountryCode Country
{
get
{
return this.country;
}
}
// Token: 0x170001C5 RID: 453
// (get) Token: 0x060003E3 RID: 995 RVA: 0x0000BDA4 File Offset: 0x0000ADA4
public Core.LanguageCode[] LanguagesUsed
{
get
{
return this.languagesUsed;
}
}
// Token: 0x170001C6 RID: 454
// (get) Token: 0x060003E4 RID: 996 RVA: 0x0000BDBC File Offset: 0x0000ADBC
public Profiles.Profile.PersonalDetailsTypes PersonalDetailsType
{
get
{
return this.personalDetailsType;
}
}
// Token: 0x170001C7 RID: 455
// (get) Token: 0x060003E5 RID: 997 RVA: 0x0000BDD4 File Offset: 0x0000ADD4
public Profiles.RealName RealName
{
get
{
if (this.personalDetailsType != Profiles.Profile.PersonalDetailsTypes.realName)
{
throw new NpToolkitException("Can't access RealName unless PersonalDetailsType is PersonalDetailsType.realName");
}
return this.realName;
}
}
// Token: 0x170001C8 RID: 456
// (get) Token: 0x060003E6 RID: 998 RVA: 0x0000BE08 File Offset: 0x0000AE08
public string VerifiedAccountDisplayName
{
get
{
if (this.personalDetailsType != Profiles.Profile.PersonalDetailsTypes.verifiedAccountDisplayName)
{
throw new NpToolkitException("Can't access VerifiedAccountDisplayName unless PersonalDetailsType is PersonalDetailsType.verifiedAccountDisplayName");
}
return this.verifiedAccountDisplayName;
}
}
// Token: 0x170001C9 RID: 457
// (get) Token: 0x060003E7 RID: 999 RVA: 0x0000BE3C File Offset: 0x0000AE3C
public bool IsVerifiedAccount
{
get
{
return this.isVerifiedAccount;
}
}
// Token: 0x170001CA RID: 458
// (get) Token: 0x060003E8 RID: 1000 RVA: 0x0000BE54 File Offset: 0x0000AE54
public string AboutMe
{
get
{
return this.aboutMe;
}
}
// Token: 0x170001CB RID: 459
// (get) Token: 0x060003E9 RID: 1001 RVA: 0x0000BE6C File Offset: 0x0000AE6C
public string AvatarUrl
{
get
{
return this.avatarUrl;
}
}
// Token: 0x170001CC RID: 460
// (get) Token: 0x060003EA RID: 1002 RVA: 0x0000BE84 File Offset: 0x0000AE84
public string ProfilePictureUrl
{
get
{
return this.profilePictureUrl;
}
}
// Token: 0x060003EB RID: 1003 RVA: 0x0000BE9C File Offset: 0x0000AE9C
public Profile()
{
for (int i = 0; i < 3; i++)
{
this.languagesUsed[i] = new Core.LanguageCode();
}
}
// Token: 0x060003EC RID: 1004 RVA: 0x0000BF14 File Offset: 0x0000AF14
internal void Read(MemoryBuffer buffer)
{
buffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.ProfileBegin);
this.onlineUser.Read(buffer);
this.relationType = (Profiles.Profile.RelationTypes)buffer.ReadUInt32();
uint num = buffer.ReadUInt32();
if (num != 3U)
{
throw new NpToolkitException("Unexpected language array size in Profile. Should be " + 3);
}
for (int i = 0; i < 3; i++)
{
this.languagesUsed[i].Read(buffer);
}
this.country.Read(buffer);
this.personalDetailsType = (Profiles.Profile.PersonalDetailsTypes)buffer.ReadUInt32();
if (this.personalDetailsType == Profiles.Profile.PersonalDetailsTypes.realName)
{
this.realName = new Profiles.RealName();
this.realName.Read(buffer);
}
else if (this.personalDetailsType == Profiles.Profile.PersonalDetailsTypes.verifiedAccountDisplayName)
{
this.verifiedAccountDisplayName = "";
buffer.ReadString(ref this.verifiedAccountDisplayName);
}
buffer.ReadString(ref this.aboutMe);
buffer.ReadString(ref this.avatarUrl);
buffer.ReadString(ref this.profilePictureUrl);
this.isVerifiedAccount = buffer.ReadBool();
buffer.CheckMarker(MemoryBuffer.BufferIntegrityChecks.ProfileEnd);
}
// Token: 0x060003ED RID: 1005 RVA: 0x0000C038 File Offset: 0x0000B038
public override string ToString()
{
string text = "";
text += string.Format("{0} : Relation ({1}) CC ({2}) PT ({3}) Lang1 ({4})\n", new object[]
{
this.OnlineUser.ToString(),
this.RelationType,
this.Country.ToString(),
this.PersonalDetailsType,
this.languagesUsed[0].ToString()
});
if (this.PersonalDetailsType == Profiles.Profile.PersonalDetailsTypes.realName)
{
text += string.Format(" RN ({0} {1} {2})\n", this.RealName.FirstName, this.RealName.MiddleName, this.RealName.LastName);
}
else if (this.PersonalDetailsType == Profiles.Profile.PersonalDetailsTypes.verifiedAccountDisplayName)
{
text += string.Format(" VDN ({0})\n", this.VerifiedAccountDisplayName);
}
return text + string.Format(" Verified Account ({0})", this.IsVerifiedAccount);
}
// Token: 0x040002FD RID: 765
public const int MAX_SIZE_ABOUT_ME = 140;
// Token: 0x040002FE RID: 766
public const int MAX_SIZE_AVATAR_URL = 128;
// Token: 0x040002FF RID: 767
public const int MAX_NUM_LANGUAGES_USED = 3;
// Token: 0x04000300 RID: 768
public const int MAX_SIZE_VERIFIED_ACCOUNT_DISPLAY_NAME = 32;
// Token: 0x04000301 RID: 769
public const int MAX_SIZE_PROFILE_PICTURE_URL = 256;
// Token: 0x04000302 RID: 770
internal Core.OnlineUser onlineUser = new Core.OnlineUser();
// Token: 0x04000303 RID: 771
internal Profiles.Profile.RelationTypes relationType;
// Token: 0x04000304 RID: 772
internal Core.LanguageCode[] languagesUsed = new Core.LanguageCode[3];
// Token: 0x04000305 RID: 773
internal Core.CountryCode country = new Core.CountryCode();
// Token: 0x04000306 RID: 774
internal Profiles.Profile.PersonalDetailsTypes personalDetailsType;
// Token: 0x04000307 RID: 775
internal Profiles.RealName realName;
// Token: 0x04000308 RID: 776
internal string verifiedAccountDisplayName;
// Token: 0x04000309 RID: 777
internal string aboutMe = "";
// Token: 0x0400030A RID: 778
internal string avatarUrl = "";
// Token: 0x0400030B RID: 779
internal string profilePictureUrl = "";
// Token: 0x0400030C RID: 780
internal bool isVerifiedAccount;
// Token: 0x020000C5 RID: 197
public enum RelationTypes
{
// Token: 0x0400030E RID: 782
notSet,
// Token: 0x0400030F RID: 783
me,
// Token: 0x04000310 RID: 784
friends,
// Token: 0x04000311 RID: 785
requestingFriend,
// Token: 0x04000312 RID: 786
requestedFriend,
// Token: 0x04000313 RID: 787
blocked,
// Token: 0x04000314 RID: 788
friendOfFriends,
// Token: 0x04000315 RID: 789
noRelationship
}
// Token: 0x020000C6 RID: 198
public enum PersonalDetailsTypes
{
// Token: 0x04000317 RID: 791
none,
// Token: 0x04000318 RID: 792
realName,
// Token: 0x04000319 RID: 793
verifiedAccountDisplayName
}
}
}
}