This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/sysmodules/pm/source/service_manager.h

23 lines
684 B
C
Raw Normal View History

2019-03-29 00:32:45 +01:00
#pragma once
#include <3ds/types.h>
typedef struct ServiceManagerServiceEntry {
const char *name;
u32 maxSessions;
void (*handler)(void *ctx);
bool isGlobalPort;
} ServiceManagerServiceEntry;
typedef struct ServiceManagerNotificationEntry {
u32 id;
void (*handler)(u32 id);
} ServiceManagerNotificationEntry;
typedef struct ServiceManagerContextAllocator {
void* (*newSessionContext)(u8 serviceId);
void (*freeSessionContext)(void *ctx);
} ServiceManagerContextAllocator;
Result ServiceManager_Run(const ServiceManagerServiceEntry *services, const ServiceManagerNotificationEntry *notifications, const ServiceManagerContextAllocator *allocator);