Services: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
Handles for services are retrieved from the service manager port, "srv:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a [[SVC]](svcConnectToPort).  | Handles for services are retrieved from the service manager port, "srv:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a [[SVC]](svcConnectToPort).  | ||
==Service Manager Port "srv:"==  | |||
{| class="wikitable" border="1"  | {| class="wikitable" border="1"  | ||
|-  | |-  | ||
| Line 11: | Line 11: | ||
|-  | |-  | ||
| 0x00020000  | | 0x00020000  | ||
| GetProcSemaphore  | | GetProcSemaphore (the handle from this gets signaled when notifications for this process gets triggered)  | ||
|-  | |-  | ||
| 0x00030100  | | 0x00030100  | ||
| Line 21: | Line 21: | ||
| 0x00050100  | | 0x00050100  | ||
| GetServiceHandle (same input as RegisterService)  | | GetServiceHandle (same input as RegisterService)  | ||
|-  | |||
| 0x00090040  | |||
| This enables the specified notificationID for the current process.  | |||
|-  | |||
| 0x000B0000  | |||
| This returns the notificationID which was triggered, if any(see GetProcSemaphore).  | |||
|}  | |||
==Notifications==  | |||
{| class="wikitable" border="1"  | |||
|-  | |||
!  ID  | |||
!  Description  | |||
|-  | |||
| 0x100  | |||
| This indicates that all processes must terminate: power-off, reboot, or [[FIRM]]-launch.  | |||
|-  | |||
| 0x204  | |||
| This indicates that the HOME button was pressed.  | |||
|}  | |}  | ||
Revision as of 20:21, 1 April 2014
Handles for services are retrieved from the service manager port, "srv:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC(svcConnectToPort).
Service Manager Port "srv:"
| Command Header | Description | 
|---|---|
| 0x00010002 | Initialize | 
| 0x00020000 | GetProcSemaphore (the handle from this gets signaled when notifications for this process gets triggered) | 
| 0x00030100 | RegisterService (8-byte servicename, u32 strlen, u32 flags?) | 
| 0x000400C0 | UnregisterService (8-byte servicename, u32 strlen) | 
| 0x00050100 | GetServiceHandle (same input as RegisterService) | 
| 0x00090040 | This enables the specified notificationID for the current process. | 
| 0x000B0000 | This returns the notificationID which was triggered, if any(see GetProcSemaphore). | 
Notifications
| ID | Description | 
|---|---|
| 0x100 | This indicates that all processes must terminate: power-off, reboot, or FIRM-launch. | 
| 0x204 | This indicates that the HOME button was pressed. |