vitasdk
Documentation of the vitasdk
appmgr.h
Go to the documentation of this file.
1
7#ifndef _PSP2_APPMGR_H_
8#define _PSP2_APPMGR_H_
9
10#include <vitasdk/build_utils.h>
11#include <psp2/types.h>
12#include <psp2/apputil.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
28
35
40
45
50
56
62
75
86
96
103
111
112typedef struct SceAppMgrBudgetInfo {
113 int size;
115 int unk0;
116 unsigned int total_user_rw_mem;
117 unsigned int free_user_rw;
119 int unk1;
120 unsigned int total_extra_mem;
121 unsigned int free_extra_mem;
122 int unk2[2];
123 unsigned int total_phycont_mem;
124 unsigned int free_phycont_mem;
125 int unk3[10];
126 unsigned int total_cdram_mem;
127 unsigned int free_cdram_mem;
128 int reserved[9];
131
132typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct
134
139
140#define SCE_APPMGR_MAX_APP_NAME_LENGTH (31)
141
150
159
168
177
186
195
204int sceAppMgrGetIdByName(SceUID *pid, const char *name);
205
215
222
230int sceAppMgrDestroyAppByName(const char *name);
231
240
249
259
270
279
289int sceAppMgrGetAppParam(char *param);
290
298
306
318
330int sceAppMgrLoadExec(const char *appPath, char * const argv[],
331 const SceAppMgrExecOptParam *optParam);
332
343int sceAppMgrLaunchAppByUri(int flags, const char *uri);
344
354int sceAppMgrLaunchAppByName2(const char *name, const char *param, SceAppMgrLaunchAppOptParam *optParam);
355
365int sceAppMgrLaunchAppByName(int flags, const char* name, const char* param);
366
376SceUID sceAppMgrLaunchAppByName2ForShell(const char *name, const char *param, SceAppMgrLaunchAppOptParam *optParam);
377
389int sceAppMgrGameDataMount(const char *app_path, const char *patch_path, const char *rif_path, char *mount_point);
390
401int sceAppMgrAppDataMount(int id, const char *mount_point);
402
414int sceAppMgrAppDataMountById(int id, const char *titleid, const char *mount_point);
415
428int sceAppMgrAppParamGetString(int pid, int param, char *string, SceSize length);
429
441int sceAppMgrGetDevInfo(const char *dev, uint64_t *max_size, uint64_t *free_size);
442
453int sceAppMgrMmsMount(int id, const char *mount_point);
454
464int sceAppMgrPspSaveDataRootMount(const char *mount_point);
465
476int sceAppMgrWorkDirMount(int id, const char *mount_point);
477
489int sceAppMgrWorkDirMountById(int id, const char *titleid, const char *mount_point);
490
500int sceAppMgrUmount(const char *mount_point);
501
511int sceAppMgrConvertVs0UserDrivePath(char *path, char *mount_point, int unk);
512
522int sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size);
523
532int sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292]);
533
544
559
568
569// missing structs
572
574
585
586#ifdef __cplusplus
587}
588#endif
589
590#endif /* _PSP2_APPMGR_H_ */
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceBool extra_mem_allowed
Flag for extra memory accessibility.
Definition appmgr.h:118
int unk1
Unknown Data.
Definition appmgr.h:119
int sceAppMgrDestroyOtherApp(void)
Destroy other apps.
int unk_0x48
Definition appmgr.h:72
int sceAppMgrGetIdByName(SceUID *pid, const char *name)
Get Process ID by Title ID.
unsigned int slotId
Save slot to use.
Definition appmgr.h:89
unsigned int slotId
Save slot to use.
Definition appmgr.h:99
int sceAppMgrGetDevInfo(const char *dev, uint64_t *max_size, uint64_t *free_size)
Get device info.
SceSize path_len
Definition appmgr.h:551
int data_0x41C
Definition appmgr.h:554
unsigned int total_cdram_mem
Total amount of accessible CDRAM memory.
Definition appmgr.h:126
int sceAppMgrWorkDirMountById(int id, const char *titleid, const char *mount_point)
Mount working directory by Title ID.
int sceAppMgrSaveDataSlotGetParam(SceAppMgrSaveDataSlot *data)
Get current param of a savedata slot.
SceBool isSystemUiOverlaid
Definition appmgr.h:107
SceAppMgrApplicationMode
Definition appmgr.h:51
int data_0x418
Definition appmgr.h:553
SceAppMgrInfoBarTransparency
Definition appmgr.h:46
int fileNum
Number of files to delete.
Definition appmgr.h:82
struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam
Definition appmgr.h:133
struct SceAppMgrAppInfo SceAppMgrAppInfo
Definition appmgr.h:571
SceAppUtilSaveDataFile * files
Pointer to an array of files.
Definition appmgr.h:81
int unk2[2]
Unknown Data.
Definition appmgr.h:122
int sceAppMgrSaveDataDataRemove(SceAppMgrSaveDataDataDelete *data)
Remove data on savedata0: partition.
unsigned int total_phycont_mem
Total amount of accessible physically contiguous memory.
Definition appmgr.h:123
int sceAppMgrLaunchAppByName2(const char *name, const char *param, SceAppMgrLaunchAppOptParam *optParam)
Start an application by Title ID.
int size
Must be 0x88.
Definition appmgr.h:113
SceAppUtilSaveDataMountPoint mountPoint
Savedata mountpoint.
Definition appmgr.h:100
int sceAppMgrLaunchAppByUri(int flags, const char *uri)
Start an application by URI.
unsigned int free_extra_mem
Free amount of accessible extra memory.
Definition appmgr.h:121
int sceAppMgrAcquireBgmPort(void)
Obtains the BGM port, even when it is not in front.
unsigned int * requiredSizeKB
Required size in KBs.
Definition appmgr.h:71
struct SceAppMgrExecOptParam SceAppMgrExecOptParam
Definition appmgr.h:132
uint8_t reserved[32]
Reserved data.
Definition appmgr.h:67
SceUInt32 systemEventNum
Definition appmgr.h:105
SceUInt8 reserved[116]
Definition appmgr.h:108
unsigned int slotId
Save slot to use.
Definition appmgr.h:78
int size
Must be 0x18.
Definition appmgr.h:98
int reserved[64]
Reserved data.
Definition appmgr.h:136
SceAppUtilSaveDataSlotParam * slotParam
Save slot params.
Definition appmgr.h:66
char path[0x400]
Definition appmgr.h:552
int sceAppMgrSaveDataSlotCreate(SceAppMgrSaveDataSlot *data)
Create a savedata slot.
unsigned int slotId
Save slot to use.
Definition appmgr.h:65
unsigned int free_cdram_mem
Free amount of accessible CDRAM memory.
Definition appmgr.h:127
int sceAppMgrReleaseBgmPort(void)
Release acquired BGM port.
unsigned int total_user_rw_mem
Total amount of accessible USER_RW memory.
Definition appmgr.h:116
int unk0
Unknown Data.
Definition appmgr.h:115
int _sceAppMgrGetAppState(SceAppMgrAppState *appState, SceSize len, uint32_t version)
Get an application state.
int sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size)
Get raw path for a given path.
int systemEvent
One of SceAppMgrSystemEventType.
Definition appmgr.h:58
int size
Must be 0x44.
Definition appmgr.h:77
SceUID sceAppMgrGetProcessIdByAppIdForShell(SceInt32 appId)
Get PID of an application for Shell.
int is_coredump_completed
Definition appmgr.h:549
struct SceAppMgrDrmOpenParam SceAppMgrDrmOpenParam
Definition appmgr.h:570
int sceAppMgrLoadExec(const char *appPath, char *const argv[], const SceAppMgrExecOptParam *optParam)
Load and start a SELF executable.
SceAppMgrErrorCode
Definition appmgr.h:18
int sceAppMgrSetInfobarState(SceAppMgrInfoBarVisibility visibility, SceAppMgrInfoBarColor color, SceAppMgrInfoBarTransparency transparency)
Set infobar state.
uint8_t reserved2[0x40]
Definition appmgr.h:93
int sceAppMgrSaveDataSlotDelete(SceAppMgrSaveDataSlotDelete *data)
Delete a savedata slot.
int sceAppMgrLaunchAppByName(int flags, const char *name, const char *param)
Start an Application by Title ID.
uint8_t reserved[116]
Reserved data.
Definition appmgr.h:91
int sceAppMgrDestroyAppByAppId(SceInt32 appId)
Destroy an application by Application ID.
int sceAppMgrAppParamGetString(int pid, int param, char *string, SceSize length)
Get application params from SFO descriptor.
int data_0x420
Definition appmgr.h:555
int sceAppMgrAppDataMount(int id, const char *mount_point)
Mount application data.
int data_0x10
Definition appmgr.h:550
SceAppMgrInfoBarColor
Definition appmgr.h:41
unsigned int free_phycont_mem
Free amount of accessible physically contiguous memory.
Definition appmgr.h:124
SceAppUtilSaveDataMountPoint mountPoint
Savedata mountpoint.
Definition appmgr.h:83
SceInt32 sceAppMgrGetAppInfo(const char *unk, SceAppMgrAppState *state)
Get AppInfo via syscall directly.
int sceAppMgrConvertVs0UserDrivePath(char *path, char *mount_point, int unk)
Convert vs0 path string to a new one usable by applications.
int size
Must be 0x418.
Definition appmgr.h:88
int fileNum
Number of files to save.
Definition appmgr.h:69
int sceAppMgrAppDataMountById(int id, const char *titleid, const char *mount_point)
Mount application data by Title ID.
int size
Must be 0x4C.
Definition appmgr.h:64
int sceAppMgrGetRunningAppIdListForShell(SceInt32 *appIds, int count)
Get a list of running applications.
SceUID sceAppMgrLaunchAppByName2ForShell(const char *name, const char *param, SceAppMgrLaunchAppOptParam *optParam)
Start an application by Title ID for Shell.
int sceAppMgrWorkDirMount(int id, const char *mount_point)
Mount working directory.
int sceAppMgrPspSaveDataRootMount(const char *mount_point)
Mount PSPEmu virtual memory stick.
uint8_t reserved[60]
Reserved data.
Definition appmgr.h:59
SceAppUtilSaveDataSlotParam * slotParam
Save slot params.
Definition appmgr.h:79
int progress
Definition appmgr.h:548
SceAppUtilSaveDataMountPoint mountPoint
Savedata mountpoint.
Definition appmgr.h:92
uint8_t reserved[32]
Reserved data.
Definition appmgr.h:80
int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info)
Get memory budget info for a running system application.
SceUInt32 appEventNum
Definition appmgr.h:106
int sceAppMgrSaveDataSlotSetParam(SceAppMgrSaveDataSlot *data)
Set current param of a savedata slot.
int process_state
Definition appmgr.h:547
SceAppUtilSaveDataFile * files
Pointer to an array of files.
Definition appmgr.h:68
SceAppUtilSaveDataMountPoint mountPoint
Savedata mountpoint.
Definition appmgr.h:70
int reserved[9]
Reserved data.
Definition appmgr.h:128
int app_mode
One of SceAppMgrApplicationMode.
Definition appmgr.h:114
SceAppMgrSystemEventType
Definition appmgr.h:29
int unk3[10]
Unknown Data.
Definition appmgr.h:125
SceUID pid
Definition appmgr.h:546
int sceAppMgrSaveDataDataSave(SceAppMgrSaveDataData *data)
Save data on savedata0: partition.
unsigned int free_user_rw
Free amount of accessible USER_RW memory.
Definition appmgr.h:117
int sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292])
Get the real/resolved path of app0: (where it's actually mounted)
int sceAppMgrGetCoredumpStateForShell(SceAppMgrCoredumpState *state)
Get current coredump state for shell.
int sceAppMgrUmount(const char *mount_point)
Unmount a mountpoint.
int sceAppMgrMmsMount(int id, const char *mount_point)
Mount application data (PSPEmu)
int data_0x424
Definition appmgr.h:556
int sceAppMgrDestroyAppByName(const char *name)
Destroy an application by Title ID.
int sceAppMgrReceiveSystemEvent(SceAppMgrSystemEvent *systemEvent)
Receive system event.
int sceAppMgrGetNameById(SceUID pid, char *name)
Get Title ID by Process ID.
SceAppMgrInfoBarVisibility
Definition appmgr.h:36
unsigned int total_extra_mem
Total amount of accessible extra memory.
Definition appmgr.h:120
int sceAppMgrGetAppParam(char *param)
Copies app param to an array.
SceInt32 sceAppMgrDrmOpen(const SceAppMgrDrmOpenParam *param)
SceAppUtilSaveDataSlotParam slotParam
Save slot params.
Definition appmgr.h:90
int sceAppMgrGameDataMount(const char *app_path, const char *patch_path, const char *rif_path, char *mount_point)
Mount game data.
@ SCE_APPMGR_APPLICATION_MODE_B
Application with physically contiguous memory access.
Definition appmgr.h:53
@ SCE_APPMGR_APPLICATION_MODE_C
Application with physically contiguous memory and extra memory access.
Definition appmgr.h:54
@ SCE_APPMGR_APPLICATION_MODE_A
Application without physically contiguous memory access.
Definition appmgr.h:52
@ SCE_APPMGR_INFOBAR_TRANSPARENCY_OPAQUE
Definition appmgr.h:47
@ SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT
Definition appmgr.h:48
@ SCE_APPMGR_ERROR_TOO_LONG_ARGV
argv is too long
Definition appmgr.h:23
@ SCE_APPMGR_ERROR_NULL_POINTER
NULL pointer.
Definition appmgr.h:21
@ SCE_APPMGR_ERROR_BGM_PORT_BUSY
BGM port was occupied and could not be secured.
Definition appmgr.h:26
@ SCE_APPMGR_ERROR_BUSY
Busy.
Definition appmgr.h:19
@ SCE_APPMGR_ERROR_NOEXEC
The process is not authorized to run this function.
Definition appmgr.h:25
@ SCE_APPMGR_ERROR_INVALID
Invalid param.
Definition appmgr.h:22
@ SCE_APPMGR_ERROR_INVALID_SELF_PATH
Invalid SELF path.
Definition appmgr.h:24
@ SCE_APPMGR_ERROR_STATE
Invalid state.
Definition appmgr.h:20
@ SCE_APPMGR_INFOBAR_COLOR_WHITE
Definition appmgr.h:43
@ SCE_APPMGR_INFOBAR_COLOR_BLACK
Definition appmgr.h:42
@ SCE_APPMGR_SYSTEMEVENT_ON_RESUME
Definition appmgr.h:30
@ SCE_APPMGR_SYSTEMEVENT_ON_STORE_PURCHASE
Definition appmgr.h:31
@ SCE_APPMGR_SYSTEMEVENT_ON_NP_MESSAGE_ARRIVED
Definition appmgr.h:32
@ SCE_APPMGR_SYSTEMEVENT_ON_STORE_REDEMPTION
Definition appmgr.h:33
@ SCE_APPMGR_INFOBAR_VISIBILITY_VISIBLE
Definition appmgr.h:38
@ SCE_APPMGR_INFOBAR_VISIBILITY_INVISIBLE
Definition appmgr.h:37
Definition appmgr.h:104
Definition appmgr.h:112
Definition appmgr.h:545
Definition appmgr.h:135
Definition appmgr.h:63
Definition appmgr.h:76
Definition appmgr.h:87
Definition appmgr.h:97
Definition appmgr.h:57
Definition apputil.h:133
Definition apputil.h:77
Definition apputil.h:110
uint32_t length
Definition bt.h:7
uint16_t version
Definition kbl.h:0
char titleid[0xC]
Title id of the process where the event occurred.
Definition debug.h:4
int flags
Event flags.
Definition debug.h:3
SceUID pid
Definition debug.h:1
int SceBool
Definition types.h:59
int32_t SceInt32
Definition types.h:44
unsigned int SceSize
Definition types.h:56
int SceUID
UIDs are used to describe many different kernel objects.
Definition types.h:90
uint32_t SceUInt32
Definition types.h:45
uint8_t SceUInt8
Definition types.h:36