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/loader/source/service_manager.h
2019-04-18 19:48:01 +02:00

23 lines
684 B
C

#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);