/**
* @brief Initializes BOSS.
- * @param programID programID to use, 0 for the current process. Not used internally unless BOSSP is available.
+ * @param programID programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload.
* @param force_user When true, just use bossU instead of trying to initialize with bossP first.
*/
Result bossInit(u64 programID, bool force_user);
+/**
+ * @brief Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session.
+ * @param programID programID to use, 0 for the current process.
+ */
+Result bossReinit(u64 programID);
+
/// Exits BOSS.
void bossExit(void);
*/
Result bossSetStorageInfo(u64 extdataID, u32 boss_size, u8 mediaType);
+/**
+ * @brief Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS.
+ */
+Result bossUnregisterStorage(void);
+
/**
* @brief Register a task.
* @param taskID BOSS taskID.
return res;
}
+Result bossReinit(u64 programID)
+{
+ return bossipc_InitializeSession(programID);
+}
+
void bossExit(void)
{
if (AtomicDecrement(&bossRefCount)) return;
return (Result)cmdbuf[1];
}
+Result bossUnregisterStorage(void)
+{
+ Result ret = 0;
+ u32 *cmdbuf = getThreadCommandBuffer();
+
+ cmdbuf[0] = IPC_MakeHeader(0x3,0,0); // 0x30000
+
+ if(R_FAILED(ret = svcSendSyncRequest(bossHandle)))return ret;
+
+ return (Result)cmdbuf[1];
+}
+
Result bossRegisterTask(const char *taskID, u8 unk0, u8 unk1)
{
Result ret = 0;