My Project
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
apt.c File Reference
#include <stdlib.h>
#include <string.h>
#include <3ds.h>

Go to the source code of this file.

Macros

#define APT_HANDLER_STACKSIZE   (0x1000)
 

Functions

void aptInitCaptureInfo (u32 *ns_capinfo)
 
void aptWaitStatusEvent ()
 
void aptAppletUtility_Exit_RetToApp ()
 
NS_APPID aptGetMenuAppID ()
 
void aptReturnToMenu ()
 
void aptAppletStarted ()
 
void aptAppletClosed ()
 
void aptEventHandler (u32 arg)
 
Result aptInit (void)
 
void aptExit ()
 
bool aptMainLoop ()
 
APP_STATUS aptGetStatus ()
 
void aptSetStatus (APP_STATUS status)
 
u32 aptGetStatusPower ()
 
void aptSetStatusPower (u32 status)
 
void aptOpenSession ()
 
void aptCloseSession ()
 
void aptSignalReadyForSleep ()
 
Result APT_GetLockHandle (Handle *handle, u16 flags, Handle *lockHandle)
 
Result APT_Initialize (Handle *handle, NS_APPID appId, Handle *eventHandle1, Handle *eventHandle2)
 
Result APT_HardwareResetAsync (Handle *handle)
 
Result APT_Enable (Handle *handle, u32 a)
 
Result APT_GetAppletManInfo (Handle *handle, u8 inval, u8 *outval8, u32 *outval32, NS_APPID *menu_appid, NS_APPID *active_appid)
 
Result APT_IsRegistered (Handle *handle, NS_APPID appID, u8 *out)
 
Result APT_InquireNotification (Handle *handle, u32 appID, u8 *signalType)
 
Result APT_PrepareToJumpToHomeMenu (Handle *handle)
 
Result APT_JumpToHomeMenu (Handle *handle, u32 a, u32 b, u32 c)
 
Result APT_NotifyToWait (Handle *handle, NS_APPID appID)
 
Result APT_AppletUtility (Handle *handle, u32 *out, u32 a, u32 size1, u8 *buf1, u32 size2, u8 *buf2)
 
Result APT_GlanceParameter (Handle *handle, NS_APPID appID, u32 bufferSize, u32 *buffer, u32 *actualSize, u8 *signalType)
 
Result APT_ReceiveParameter (Handle *handle, NS_APPID appID, u32 bufferSize, u32 *buffer, u32 *actualSize, u8 *signalType)
 
Result APT_SendParameter (Handle *handle, NS_APPID src_appID, NS_APPID dst_appID, u32 bufferSize, u32 *buffer, Handle paramhandle, u8 signalType)
 
Result APT_SendCaptureBufferInfo (Handle *handle, u32 bufferSize, u32 *buffer)
 
Result APT_ReplySleepQuery (Handle *handle, NS_APPID appID, u32 a)
 
Result APT_ReplySleepNotificationComplete (Handle *handle, NS_APPID appID)
 
Result APT_PrepareToCloseApplication (Handle *handle, u8 a)
 
Result APT_CloseApplication (Handle *handle, u32 a, u32 b, u32 c)
 
Result APT_SetAppCpuTimeLimit (Handle *handle, u32 percent)
 
Result APT_GetAppCpuTimeLimit (Handle *handle, u32 *percent)
 
Result APT_CheckNew3DS_Application (Handle *handle, u8 *out)
 
Result APT_CheckNew3DS_System (Handle *handle, u8 *out)
 
Result APT_CheckNew3DS (Handle *handle, u8 *out)
 
Result APT_PrepareToDoAppJump (Handle *handle, u8 flags, u64 programID, u8 mediatype)
 
Result APT_DoAppJump (Handle *handle, u32 NSbuf0Size, u32 NSbuf1Size, u8 *NSbuf0Ptr, u8 *NSbuf1Ptr)
 
Result APT_PrepareToStartLibraryApplet (Handle *handle, NS_APPID appID)
 
Result APT_StartLibraryApplet (Handle *handle, NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize)
 
Result APT_LaunchLibraryApplet (NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize)
 

Variables

u32 __apt_appid
 
u32 __system_runflags
 
NS_APPID currentAppId
 
Handle aptLockHandle
 
Handle aptuHandle
 
Handle aptEvents [3]
 
Handle aptEventHandlerThread
 
u64 aptEventHandlerStack [APT_HANDLER_STACKSIZE/8]
 
Handle aptStatusMutex
 
Handle aptStatusEvent = 0
 
APP_STATUS aptStatus = APP_NOTINITIALIZED
 
APP_STATUS aptStatusBeforeSleep = APP_NOTINITIALIZED
 
u32 aptStatusPower = 0
 
Handle aptSleepSync = 0
 
u32 aptParameters [0x1000/4]
 

Macro Definition Documentation

#define APT_HANDLER_STACKSIZE   (0x1000)

Definition at line 9 of file apt.c.

Function Documentation

Result APT_AppletUtility ( Handle handle,
u32 out,
u32  a,
u32  size1,
u8 buf1,
u32  size2,
u8 buf2 
)

Definition at line 735 of file apt.c.

Result APT_CheckNew3DS ( Handle handle,
u8 out 
)

Definition at line 969 of file apt.c.

Result APT_CheckNew3DS_Application ( Handle handle,
u8 out 
)

Definition at line 931 of file apt.c.

Result APT_CheckNew3DS_System ( Handle handle,
u8 out 
)

Definition at line 950 of file apt.c.

Result APT_CloseApplication ( Handle handle,
u32  a,
u32  b,
u32  c 
)

Definition at line 881 of file apt.c.

Result APT_DoAppJump ( Handle handle,
u32  NSbuf0Size,
u32  NSbuf1Size,
u8 NSbuf0Ptr,
u8 NSbuf1Ptr 
)

Definition at line 1013 of file apt.c.

Result APT_Enable ( Handle handle,
u32  a 
)

Definition at line 633 of file apt.c.

Result APT_GetAppCpuTimeLimit ( Handle handle,
u32 percent 
)

Definition at line 915 of file apt.c.

Result APT_GetAppletManInfo ( Handle handle,
u8  inval,
u8 outval8,
u32 outval32,
NS_APPID menu_appid,
NS_APPID active_appid 
)

Definition at line 646 of file apt.c.

Result APT_GetLockHandle ( Handle handle,
u16  flags,
Handle lockHandle 
)

Definition at line 589 of file apt.c.

Result APT_GlanceParameter ( Handle handle,
NS_APPID  appID,
u32  bufferSize,
u32 buffer,
u32 actualSize,
u8 signalType 
)

Definition at line 757 of file apt.c.

Result APT_HardwareResetAsync ( Handle handle)

Definition at line 621 of file apt.c.

Result APT_Initialize ( Handle handle,
NS_APPID  appId,
Handle eventHandle1,
Handle eventHandle2 
)

Definition at line 604 of file apt.c.

Result APT_InquireNotification ( Handle handle,
u32  appID,
u8 signalType 
)

Definition at line 679 of file apt.c.

Result APT_IsRegistered ( Handle handle,
NS_APPID  appID,
u8 out 
)

Definition at line 664 of file apt.c.

Result APT_JumpToHomeMenu ( Handle handle,
u32  a,
u32  b,
u32  c 
)

Definition at line 706 of file apt.c.

Result APT_LaunchLibraryApplet ( NS_APPID  appID,
Handle  inhandle,
u32 parambuf,
u32  parambufsize 
)

Definition at line 1065 of file apt.c.

Result APT_NotifyToWait ( Handle handle,
NS_APPID  appID 
)

Definition at line 722 of file apt.c.

Result APT_PrepareToCloseApplication ( Handle handle,
u8  a 
)

Definition at line 867 of file apt.c.

Result APT_PrepareToDoAppJump ( Handle handle,
u8  flags,
u64  programID,
u8  mediatype 
)

Definition at line 996 of file apt.c.

Result APT_PrepareToJumpToHomeMenu ( Handle handle)

Definition at line 694 of file apt.c.

Result APT_PrepareToStartLibraryApplet ( Handle handle,
NS_APPID  appID 
)

Definition at line 1032 of file apt.c.

Result APT_ReceiveParameter ( Handle handle,
NS_APPID  appID,
u32  bufferSize,
u32 buffer,
u32 actualSize,
u8 signalType 
)

Definition at line 777 of file apt.c.

Result APT_ReplySleepNotificationComplete ( Handle handle,
NS_APPID  appID 
)

Definition at line 853 of file apt.c.

Result APT_ReplySleepQuery ( Handle handle,
NS_APPID  appID,
u32  a 
)

Definition at line 838 of file apt.c.

Result APT_SendCaptureBufferInfo ( Handle handle,
u32  bufferSize,
u32 buffer 
)

Definition at line 821 of file apt.c.

Result APT_SendParameter ( Handle handle,
NS_APPID  src_appID,
NS_APPID  dst_appID,
u32  bufferSize,
u32 buffer,
Handle  paramhandle,
u8  signalType 
)

Definition at line 797 of file apt.c.

Result APT_SetAppCpuTimeLimit ( Handle handle,
u32  percent 
)

Definition at line 900 of file apt.c.

Result APT_StartLibraryApplet ( Handle handle,
NS_APPID  appID,
Handle  inhandle,
u32 parambuf,
u32  parambufsize 
)

Definition at line 1046 of file apt.c.

void aptAppletClosed ( )

Definition at line 258 of file apt.c.

void aptAppletStarted ( )

Definition at line 221 of file apt.c.

void aptAppletUtility_Exit_RetToApp ( )

Definition at line 106 of file apt.c.

void aptCloseSession ( )

Definition at line 578 of file apt.c.

void aptEventHandler ( u32  arg)

Definition at line 369 of file apt.c.

void aptExit ( )

Definition at line 437 of file apt.c.

NS_APPID aptGetMenuAppID ( )

Definition at line 137 of file apt.c.

APP_STATUS aptGetStatus ( )

Definition at line 530 of file apt.c.

u32 aptGetStatusPower ( )

Definition at line 554 of file apt.c.

Result aptInit ( void  )

Definition at line 399 of file apt.c.

void aptInitCaptureInfo ( u32 ns_capinfo)

Definition at line 71 of file apt.c.

bool aptMainLoop ( )

Definition at line 467 of file apt.c.

void aptOpenSession ( )

Definition at line 570 of file apt.c.

void aptReturnToMenu ( )

Definition at line 148 of file apt.c.

void aptSetStatus ( APP_STATUS  status)

Definition at line 539 of file apt.c.

void aptSetStatusPower ( u32  status)

Definition at line 563 of file apt.c.

void aptSignalReadyForSleep ( )

Definition at line 584 of file apt.c.

void aptWaitStatusEvent ( )

Definition at line 100 of file apt.c.

Variable Documentation

u32 __apt_appid
u32 __system_runflags
u64 aptEventHandlerStack[APT_HANDLER_STACKSIZE/8]

Definition at line 28 of file apt.c.

Handle aptEventHandlerThread

Definition at line 27 of file apt.c.

Handle aptEvents[3]

Definition at line 25 of file apt.c.

Handle aptLockHandle

Definition at line 23 of file apt.c.

u32 aptParameters[0x1000/4]

Definition at line 37 of file apt.c.

Handle aptSleepSync = 0

Definition at line 35 of file apt.c.

Definition at line 32 of file apt.c.

APP_STATUS aptStatusBeforeSleep = APP_NOTINITIALIZED

Definition at line 33 of file apt.c.

Handle aptStatusEvent = 0

Definition at line 31 of file apt.c.

Handle aptStatusMutex

Definition at line 30 of file apt.c.

u32 aptStatusPower = 0

Definition at line 34 of file apt.c.

Handle aptuHandle

Definition at line 24 of file apt.c.

NS_APPID currentAppId

Definition at line 15 of file apt.c.