GTAdhocAPI
Gran Turismo (6) Adhoc API Documentation
Loading...
Searching...
No Matches
pdistd::MNetworkPlatform Class Reference

PSN/Network Platform API Interface. More...

Inheritance diagram for pdistd::MNetworkPlatform:
System::Object

Public Member Functions

 MNetworkPlatform ()
 Constructs new NP object (based on engine singleton) More...
 
void initialize ()
 sceNp2Init - Initialize NP2 More...
 
Int requestFriend (String contact, String message)
 sceNpBasicAddFriend More...
 
Int getDateTime (Bool convert_to_utc=true)
 sceNpManagerGetNetworkTime - Get current time More...
 
Bool requestTicketRequest (String cookie="", String entitlementId=nil, Int consumedCount=0, Int unk=0)
 sceNpManagerRequestTicket2 - Request ticket More...
 
MBlob requestTicket (String cookie="", String entitlementId=nil, Int consumedCount=0, Int unk=0)
 Generic request ticket function, may call requestTicketRequest or actually request a np ticket for auth. More...
 
Int getTicketStatus ()
 
MBlob getTicket ()
 Calls sceNpManagerGetTicket. More...
 
Int startSignIn ()
 cellNetCtlNetStartDialogLoadAsync More...
 
Int openSignInDialog ()
 Handles sign-in from higher level (calls startSignIn, unload, finish) More...
 
void finishSignIn ()
 Destroys dialog callback. More...
 
Int unloadSignInDialog ()
 cellNetCtlNetStartDialogUnloadAsync More...
 
Bool isDialogWorking ()
 Returns whether the dialog for sign-in is currently active. More...
 
void clearErrorCode ()
 Clears error code. More...
 
Bool abortGui (Bool wait_for_abort)
 sceNpBasicAbortGui - Abort the currently displayed system software GUI More...
 
Bool isOnline ()
 Whether the current user is signed to PSN. More...
 
Int getStatus ()
 Get cached status from sceNpManagerGetStatus. More...
 
void getLastErrorCode ()
 
String getOnlineId ()
 Returns cached PSN Id for current user, empty if not online. More...
 
String getOnlineName ()
 Returns cached PSN Name for current user, empty if not online. More...
 
Int getAccountAge ()
 Returns cached user's age from sceNpManagerGetAccountAge. More...
 
MTime getBirthday ()
 Returns cached birthday from sceNpManagerGetAccountAge, empty if not online. More...
 
Array< StringgetLanguages ()
 Gets cached languages from sceNpManagerGetMyLanguages. More...
 
Array< StringgetFirstLanguage ()
 Gets cached first language from sceNpManagerGetAccountRegion. More...
 
Array< StringgetRegionLanguage ()
 
void getRegionName ()
 
Map getContentsRestriction ()
 sceNpManagerGetContentRatingFlag - Get parental control information (age-based content restriction) More...
 
String getFriendList ()
 sceNpBasicGetFriendListEntry - Get friend list entries More...
 
Array loadInvitationData ()
 sceNpBasicRecvMessageAttachmentLoad - Load the data attachment into a buffer More...
 
Array receiveAttachment (Int mainType)
 sceNpBasicRecvMessageCustom - Receive a message's attachment from a remote contact via the GUI More...
 
Bool receiveMessageAttachmentGui ()
 sceNpBasicRecvMessageAttachment(SYS_MEMORY_CONTAINER_ID_INVALID) - Receive a message's data attachment from a remote contact via the GUI More...
 
Int getMatchingInvitationCount ()
 sceNpBasicGetMatchingInvitationEntryCount - Get the number of matching invitation message entries More...
 
Int getMessageCount ()
 sceNpBasicGetMessageEntryCount - Get the number of message entries for a specified message type More...
 
void initializeLookup (Int unk=0)
 sceNpLookupInit - Initialize the NP lookup utility More...
 
Bool isInitializedLookup ()
 
void finalizeLookup ()
 sceNpLookupTerm - Terminate the NP lookup utility More...
 
MPDINetworkUserId lookupNpId (String np_id)
 sceNpLookupNpIdAsync & Wait - Look up an NP ID (asynchronous) More...
 
MPDINetworkUserProfile lookupProfile (MPDINetworkUserId user_id)
 sceNpLookupUserProfile - Obtain a user profile (synchronous) More...
 
MPDINetworkUserProfile lookupProfile (String np_id)
 sceNpLookupUserProfile - Obtain a user profile (synchronous) More...
 
ByteData lookupTitleSmallStorage (ByteData data)
 sceNpLookupTitleSmallStorage - Obtain title small storage (synchronous) More...
 
ByteData lookupTitleSmallStorage (UInt max_size)
 sceNpLookupTitleSmallStorage - Obtain title small storage (synchronous) More...
 
Int checkEntitlementById (String id)
 sceNpManagerGetEntitlementById - Check or retrieve entitlement information More...
 
Map getEntitlementById ()
 sceNpManagerGetEntitlementById - Check or retrieve entitlement information More...
 
Int sendMessageGui (String target, String message, String comment, ByteData unk=nil, Int unk=0)
 sceNpBasicSendMessageGui - Send a message via the GUI returns SCE_NP_BASIC_ERROR More...
 
Int sendMessageGui (Array< MPDINetworkUserId > targets, String message, String comment, ByteData unk=nil, Int unk=0)
 sceNpBasicSendMessageGui - Send a message via the GUI (multiple) More...
 
Bool registerCustomMenu (Array< Map > actions)
 sceNpCustomMenuRegisterActions - Register an array of custom menu items More...
 
void resetCustomMenu ()
 sceNpCustomMenuActionSetActivation - Set the menu items as active/inactive More...
 
Bool initializeProbeBandwidth ()
 Loads required modules for probing bandwidth. More...
 
void finalizeProbeBandwidth ()
 Unloads modules for probing bandwidth. More...
 
Map probeBandwidth (Int cached_limit=-1, Bool finalize_once_done=false)
 Probes bandwidth in one go - initializes, requests, cancels if fail and finalizes. More...
 
Int requestProbeBandwidth ()
 sceNpUtilBandwidthTestInitStart - Start bandwidth test More...
 
Map pollProbeBandwidth ()
 sceNpUtilBandwidthTestGetStatus - Get progress of bandwidth test More...
 
void cancelProbeBandwidth ()
 sceNpUtilBandwidthTestShutdown - Cancels bandwidth check More...
 
Bool initializeRanking ()
 sceNpScoreInit & sceNpScoreCreateTitleCtx, finalizeRanking() called if failed More...
 
void finalizeRanking ()
 sceNpScoreTerm More...
 
Map passVulgarityFilter (String text, Bool only_censor=true, Bool initialize_ranking=true)
 sceNpScoreSanitizeComment - Correct inappropriate character string (synchronous) More...
 
void setTicketServiceId (String ticket_service_id)
 Sets NpKeyHolderPS3 singleton ticket service id. More...
 
void setCommerceServiceId (String commerce_service_id)
 Sets NpKeyHolderPS3 singleton commerce service id. More...
 
void setCommunicationId (String communication_id)
 Sets NpKeyHolderPS3 singleton communication id. More...
 
void setCommunicationSignature (MBlob signature)
 Sets NpKeyHolderPS3 singleton communication signature. More...
 
void setCommunicationPassphrase (MBlob passphrase)
 Sets NpKeyHolderPS3 singleton communication passphrase. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 constructor taking no param More...
 
Bool isInstanceOf (Class classType)
 Returns whether an object is of a specific class/type. More...
 
Object getDeepCopy ()
 Gets a deep copy of this object. More...
 
void setDeepCopy (Object obj)
 Unk. More...
 
String dump ()
 Dumps all info about an object. More...
 
Object getObjectAttribute (string path)
 
void setObjectAttribute (string path, Object value)
 
Bool hasPrimitiveInterface ()
 Returns whether this object has a primitive interface. More...
 
Bool toBool ()
 Casts this object to Bool. More...
 
Byte toByte ()
 Casts this object to Byte. More...
 
Short toShort ()
 Casts this object to Short. More...
 
Int toInt ()
 Casts this object to Int. More...
 
Long toLong ()
 Casts this object to Long. More...
 
UByte toUByte ()
 Casts this object to UByte. More...
 
UShort toUShort ()
 Casts this object to UShort. More...
 
UInt toUInt ()
 Casts this object to UInt. More...
 
ULong toULong ()
 Casts this object to ULong. More...
 
Float toFloat ()
 Casts this object to Float. More...
 
Double toDouble ()
 Casts this object to Double. More...
 
String toString ()
 Casts this object to String. More...
 
Symbol toSymbol ()
 Casts this object to Symbol. More...
 
Bool hasArrayInterface ()
 Returns whether this object has an Array interface. More...
 
Int getArrayCount ()
 Gets the Array item count for this object. More...
 
void setArrayCount ()
 Sets the Array item count for this object. More...
 
Object getArrayElement (Object arg0)
 Gets an Array item for this object. More...
 
void setArrayElement (Object arg0, Object arg1)
 Sets the Array item for this object. More...
 
Bool hasMapInterface ()
 Returns whether this object has a Map interface. More...
 
int getMapCount ()
 Returns the count of items in the map. More...
 
void setMapElement (Object arg0, Object arg1)
 Returns whether the Map has a specific object key. Bool hasMapElement(Object arg0);. More...
 
Object getMapElement (Object arg0)
 Gets a Map element by key. More...
 
void hasGeneratorInterface ()
 Returns whether this object has a generator interface. More...
 
Iterator generator ()
 Returns generator (?) More...
 
void hasIteratorInterface ()
 Returns whether this object has an iterator. More...
 
Iterator iterator ()
 Gets the iterator for this object. More...
 
void hasVariableInterface ()
 Returns whether this object is a variable. More...
 
void hasFunctionInterface ()
 Returns whether this object has a function interface. More...
 
Object call ()
 Calls this object as a function. More...
 
Bool hasByteDataInterface ()
 Returns whether this object has a byte data interface. More...
 
Int getByteDataCount ()
 Returns the ByteData size for this object. More...
 
void setByteDataCount (Int count)
 Sets the ByteData size for this object. More...
 
Int getByteDataCapacity ()
 Returns the ByteData capacity for this object. More...
 
void setByteDataCapacity (Int capacity)
 Sets the ByteData capacity for this object. More...
 
ByteData getByteData ()
 Gets the underlaying ByteData. More...
 
void setByteData (ByteData bytedata)
 Sets the underlaying ByteData. More...
 
void hasObjectSelectorInterface ()
 Returns whether this object has an object selector interface. More...
 
void self ()
 Gets the get for this object if it has a get interface. More...
 
void getArchiveTree ()
 
void setArchiveTree ()
 
ByteData serialize ()
 Serializes this object. More...
 
void deserialize (ByteData serializedData)
 Deserializes this object. More...
 
void defined (Object obj)
 Returns whether a certain object is defined within this object. More...
 
Array find_all (FunctionObject func)
 Finds all the elements in this object that matches the predicates. More...
 
void each_all (FunctionObject func)
 Applies callback to all elements in this object. More...
 
Array map_all (FunctionObject< Object > func)
 Maps all the elements in this object. More...
 
Bool operator!= ()
 Returns whether this object is not equal to another. More...
 
Bool operator== ()
 Returns whether this object is equal to another. More...
 

Additional Inherited Members

- Public Attributes inherited from System::Object
Int rc_size
 Getter-only. Reference counter size of this object. More...
 
Object rc_class
 Getter-only. Type name of the object. More...
 
Int rc_count
 Getter-only. Reference count of this object. More...
 
Int weak_count
 Getter-only. Weak reference count of this object. More...
 
Class class_id
 Class (type) object for this object. More...
 

Detailed Description

PSN/Network Platform API Interface.

Definition at line 6 of file MNetworkPlatform.cpp.

Constructor & Destructor Documentation

◆ MNetworkPlatform()

pdistd::MNetworkPlatform::MNetworkPlatform ( )
inline

Constructs new NP object (based on engine singleton)

Initialize will be called. Should be using PDINetwork.getNP() or main::NP to get the singleton instead

Definition at line 12 of file MNetworkPlatform.cpp.

Member Function Documentation

◆ abortGui()

Bool pdistd::MNetworkPlatform::abortGui ( Bool  wait_for_abort)

sceNpBasicAbortGui - Abort the currently displayed system software GUI

◆ cancelProbeBandwidth()

void pdistd::MNetworkPlatform::cancelProbeBandwidth ( )

sceNpUtilBandwidthTestShutdown - Cancels bandwidth check

◆ checkEntitlementById()

Int pdistd::MNetworkPlatform::checkEntitlementById ( String  id)

sceNpManagerGetEntitlementById - Check or retrieve entitlement information

Returns
SCE_NP_ERROR

◆ clearErrorCode()

void pdistd::MNetworkPlatform::clearErrorCode ( )

Clears error code.

◆ finalizeLookup()

void pdistd::MNetworkPlatform::finalizeLookup ( )

sceNpLookupTerm - Terminate the NP lookup utility

◆ finalizeProbeBandwidth()

void pdistd::MNetworkPlatform::finalizeProbeBandwidth ( )

Unloads modules for probing bandwidth.

CELL_SYSMODULE_HTTP and CELL_SYSMODULE_SYSUTIL_NP_UTIL

◆ finalizeRanking()

void pdistd::MNetworkPlatform::finalizeRanking ( )

sceNpScoreTerm

◆ finishSignIn()

void pdistd::MNetworkPlatform::finishSignIn ( )

Destroys dialog callback.

◆ getAccountAge()

Int pdistd::MNetworkPlatform::getAccountAge ( )

Returns cached user's age from sceNpManagerGetAccountAge.

◆ getBirthday()

MTime pdistd::MNetworkPlatform::getBirthday ( )

Returns cached birthday from sceNpManagerGetAccountAge, empty if not online.

◆ getContentsRestriction()

Map pdistd::MNetworkPlatform::getContentsRestriction ( )

sceNpManagerGetContentRatingFlag - Get parental control information (age-based content restriction)

Returns
Map containing
  • "isRestricted": (Bool)
  • "age": (Int)

◆ getDateTime()

Int pdistd::MNetworkPlatform::getDateTime ( Bool  convert_to_utc = true)

sceNpManagerGetNetworkTime - Get current time

NetworkPlatform must be online

Returns
SCE_NP_ERROR

◆ getEntitlementById()

Map pdistd::MNetworkPlatform::getEntitlementById ( )

sceNpManagerGetEntitlementById - Check or retrieve entitlement information

Returns
Map with
  • result (Int)
  • expire_date (MTime)
  • remaining_count (Int)
  • consumed_count (Int)
  • value (Object)

◆ getFirstLanguage()

Array< String > pdistd::MNetworkPlatform::getFirstLanguage ( )

Gets cached first language from sceNpManagerGetAccountRegion.

Returns
Array containing countryCode, language

◆ getFriendList()

String pdistd::MNetworkPlatform::getFriendList ( )

sceNpBasicGetFriendListEntry - Get friend list entries

This first calls sceNpBasicGetFriendListEntryCount(100), 100 friends max

Returns
Comma-separated string of each friend

◆ getLanguages()

Array< String > pdistd::MNetworkPlatform::getLanguages ( )

Gets cached languages from sceNpManagerGetMyLanguages.

◆ getLastErrorCode()

void pdistd::MNetworkPlatform::getLastErrorCode ( )

◆ getMatchingInvitationCount()

Int pdistd::MNetworkPlatform::getMatchingInvitationCount ( )

sceNpBasicGetMatchingInvitationEntryCount - Get the number of matching invitation message entries

◆ getMessageCount()

Int pdistd::MNetworkPlatform::getMessageCount ( )

sceNpBasicGetMessageEntryCount - Get the number of message entries for a specified message type

◆ getOnlineId()

String pdistd::MNetworkPlatform::getOnlineId ( )

Returns cached PSN Id for current user, empty if not online.

◆ getOnlineName()

String pdistd::MNetworkPlatform::getOnlineName ( )

Returns cached PSN Name for current user, empty if not online.

◆ getRegionLanguage()

Array< String > pdistd::MNetworkPlatform::getRegionLanguage ( )

◆ getRegionName()

void pdistd::MNetworkPlatform::getRegionName ( )

◆ getStatus()

Int pdistd::MNetworkPlatform::getStatus ( )

Get cached status from sceNpManagerGetStatus.

◆ getTicket()

MBlob pdistd::MNetworkPlatform::getTicket ( )

Calls sceNpManagerGetTicket.

◆ getTicketStatus()

Int pdistd::MNetworkPlatform::getTicketStatus ( )

◆ initialize()

void pdistd::MNetworkPlatform::initialize ( )

sceNp2Init - Initialize NP2

◆ initializeLookup()

void pdistd::MNetworkPlatform::initializeLookup ( Int  unk = 0)

sceNpLookupInit - Initialize the NP lookup utility

◆ initializeProbeBandwidth()

Bool pdistd::MNetworkPlatform::initializeProbeBandwidth ( )

Loads required modules for probing bandwidth.

CELL_SYSMODULE_HTTP and CELL_SYSMODULE_SYSUTIL_NP_UTIL

◆ initializeRanking()

Bool pdistd::MNetworkPlatform::initializeRanking ( )

sceNpScoreInit & sceNpScoreCreateTitleCtx, finalizeRanking() called if failed

◆ isDialogWorking()

Bool pdistd::MNetworkPlatform::isDialogWorking ( )

Returns whether the dialog for sign-in is currently active.

◆ isInitializedLookup()

Bool pdistd::MNetworkPlatform::isInitializedLookup ( )

◆ isOnline()

Bool pdistd::MNetworkPlatform::isOnline ( )

Whether the current user is signed to PSN.

◆ loadInvitationData()

Array pdistd::MNetworkPlatform::loadInvitationData ( )

sceNpBasicRecvMessageAttachmentLoad - Load the data attachment into a buffer

Returns
Unsure, might be ByteData and Int in array

◆ lookupNpId()

MPDINetworkUserId pdistd::MNetworkPlatform::lookupNpId ( String  np_id)

sceNpLookupNpIdAsync & Wait - Look up an NP ID (asynchronous)

◆ lookupProfile() [1/2]

MPDINetworkUserProfile pdistd::MNetworkPlatform::lookupProfile ( MPDINetworkUserId  user_id)

sceNpLookupUserProfile - Obtain a user profile (synchronous)

◆ lookupProfile() [2/2]

MPDINetworkUserProfile pdistd::MNetworkPlatform::lookupProfile ( String  np_id)

sceNpLookupUserProfile - Obtain a user profile (synchronous)

◆ lookupTitleSmallStorage() [1/2]

ByteData pdistd::MNetworkPlatform::lookupTitleSmallStorage ( ByteData  data)

sceNpLookupTitleSmallStorage - Obtain title small storage (synchronous)

Buffer size 0x10000

◆ lookupTitleSmallStorage() [2/2]

ByteData pdistd::MNetworkPlatform::lookupTitleSmallStorage ( UInt  max_size)

sceNpLookupTitleSmallStorage - Obtain title small storage (synchronous)

◆ openSignInDialog()

Int pdistd::MNetworkPlatform::openSignInDialog ( )

Handles sign-in from higher level (calls startSignIn, unload, finish)

Returns
Cell error

◆ passVulgarityFilter()

Map pdistd::MNetworkPlatform::passVulgarityFilter ( String  text,
Bool  only_censor = true,
Bool  initialize_ranking = true 
)

sceNpScoreSanitizeComment - Correct inappropriate character string (synchronous)

Parameters
textText to sanitize
only_censorsceNpScoreCensorComment called instead, sanitized will be empty
initialize_rankingwhether to call initializeRanking()
Returns
Map with results
  • "error" : (Int)
  • "filtered" : (Bool)
  • "sanitized" : (String)

◆ pollProbeBandwidth()

Map pdistd::MNetworkPlatform::pollProbeBandwidth ( )

sceNpUtilBandwidthTestGetStatus - Get progress of bandwidth test

Calls sceNpUtilBandwidthTestShutdown - End bandwidth test and get results

Returns
Map with results
  • "finish" : (Bool)
  • "up" : (UInt)
  • "down" : (UInt)

◆ probeBandwidth()

Map pdistd::MNetworkPlatform::probeBandwidth ( Int  cached_limit = -1,
Bool  finalize_once_done = false 
)

Probes bandwidth in one go - initializes, requests, cancels if fail and finalizes.

◆ receiveAttachment()

Array pdistd::MNetworkPlatform::receiveAttachment ( Int  mainType)

sceNpBasicRecvMessageCustom - Receive a message's attachment from a remote contact via the GUI

Returns
Needs to be documented

◆ receiveMessageAttachmentGui()

Bool pdistd::MNetworkPlatform::receiveMessageAttachmentGui ( )

sceNpBasicRecvMessageAttachment(SYS_MEMORY_CONTAINER_ID_INVALID) - Receive a message's data attachment from a remote contact via the GUI

◆ registerCustomMenu()

Bool pdistd::MNetworkPlatform::registerCustomMenu ( Array< Map actions)

sceNpCustomMenuRegisterActions - Register an array of custom menu items

Parameters
actionsArray of actions, each action is "name" (String) and "mask" (Int/SceNpCustomMenuActionMask)

Mask: 1 = self, 2 = friends, 4 = non-friends players, 7 = all users

◆ requestFriend()

Int pdistd::MNetworkPlatform::requestFriend ( String  contact,
String  message 
)

sceNpBasicAddFriend

NetworkPlatform must be online

Returns
SCE_NP_BASIC_ERROR

◆ requestProbeBandwidth()

Int pdistd::MNetworkPlatform::requestProbeBandwidth ( )

sceNpUtilBandwidthTestInitStart - Start bandwidth test

Modules must be loaded before with initializeProbeBandwidth() stack_size is set to 0x2000

Returns
SCE_NP_ERROR

◆ requestTicket()

MBlob pdistd::MNetworkPlatform::requestTicket ( String  cookie = "",
String  entitlementId = nil,
Int  consumedCount = 0,
Int  unk = 0 
)

Generic request ticket function, may call requestTicketRequest or actually request a np ticket for auth.

◆ requestTicketRequest()

Bool pdistd::MNetworkPlatform::requestTicketRequest ( String  cookie = "",
String  entitlementId = nil,
Int  consumedCount = 0,
Int  unk = 0 
)

sceNpManagerRequestTicket2 - Request ticket

Parameters
cookieCookie data (optional) - Length 1024 max
entitlementIdID of consumable entitlement (optional)
consumedCountNumber to consume
unkDoesn't do anything by itself, but cancels operation if ((unk != 0) && (unk != 0x1e)) && (unk != 0x28)) && (unk != 0x15))
Returns
Whether request succeeded

◆ resetCustomMenu()

void pdistd::MNetworkPlatform::resetCustomMenu ( )

sceNpCustomMenuActionSetActivation - Set the menu items as active/inactive

◆ sendMessageGui() [1/2]

Int pdistd::MNetworkPlatform::sendMessageGui ( Array< MPDINetworkUserId targets,
String  message,
String  comment,
ByteData  unk = nil,
Int  unk = 0 
)

sceNpBasicSendMessageGui - Send a message via the GUI (multiple)

Returns
SCE_NP_BASIC_ERROR

◆ sendMessageGui() [2/2]

Int pdistd::MNetworkPlatform::sendMessageGui ( String  target,
String  message,
String  comment,
ByteData  unk = nil,
Int  unk = 0 
)

sceNpBasicSendMessageGui - Send a message via the GUI returns SCE_NP_BASIC_ERROR

◆ setCommerceServiceId()

void pdistd::MNetworkPlatform::setCommerceServiceId ( String  commerce_service_id)

Sets NpKeyHolderPS3 singleton commerce service id.

◆ setCommunicationId()

void pdistd::MNetworkPlatform::setCommunicationId ( String  communication_id)

Sets NpKeyHolderPS3 singleton communication id.

◆ setCommunicationPassphrase()

void pdistd::MNetworkPlatform::setCommunicationPassphrase ( MBlob  passphrase)

Sets NpKeyHolderPS3 singleton communication passphrase.

◆ setCommunicationSignature()

void pdistd::MNetworkPlatform::setCommunicationSignature ( MBlob  signature)

Sets NpKeyHolderPS3 singleton communication signature.

◆ setTicketServiceId()

void pdistd::MNetworkPlatform::setTicketServiceId ( String  ticket_service_id)

Sets NpKeyHolderPS3 singleton ticket service id.

◆ startSignIn()

Int pdistd::MNetworkPlatform::startSignIn ( )

cellNetCtlNetStartDialogLoadAsync

Signs-in to PSN, there will be a prompt if automatic sign-in is not filled Make sure to call finishSignIn and unloadSignInDialog!

Returns

◆ unloadSignInDialog()

Int pdistd::MNetworkPlatform::unloadSignInDialog ( )

cellNetCtlNetStartDialogUnloadAsync


The documentation for this class was generated from the following file: