Skip to content

Commit 55e67db

Browse files
committed
efl:u get plugin stuff
1 parent fdf3cfe commit 55e67db

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

include/eiffel/common.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <stddef.h>
34
#include <stdint.h>
45

56
typedef char SlPluginName[16];
@@ -10,3 +11,9 @@ typedef struct {
1011
uint32_t version;
1112
uint32_t apiVersion;
1213
} SlPluginMeta;
14+
15+
typedef struct {
16+
uint32_t handle;
17+
size_t size;
18+
uint32_t perm;
19+
} SlPluginSharedMemInfo;

include/eiffel/user.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ extern "C" {
1212
#define EIFFEL_MODULE_ID 0x144
1313

1414
typedef enum {
15-
EFL_U_CMD_GET_PLUGIN_READY_EVENT = 0,
16-
EFL_U_CMD_GET_PLUGIN_INFO = 1,
15+
EFL_U_CMD_GET_PLUGIN_META = 0,
16+
EFL_U_CMD_GET_PLUGIN_SHARED_MEM_INFO = 1,
1717
} EiffelUserCommandId;
1818

1919
static const Result EFL_U_RESULT_PLUGIN_NOT_ACTIVE = MAKERESULT(EIFFEL_MODULE_ID, 0);
@@ -22,6 +22,9 @@ static const Result EFL_U_RESULT_SHARED_MEM_NOT_REGISTERED = MAKERESULT(EIFFEL_M
2222
Result eiffelInitialize();
2323
void eiffelExit();
2424

25+
Result eiffelGetPluginMeta(SlPluginMeta* out_pluginMeta, const SlPluginName name);
26+
Result eiffelGetPluginSharedMemInfo(SlPluginSharedMemInfo* out_pluginSharedMemInfo, const SlPluginName name);
27+
2528
#ifdef __cplusplus
2629
}
2730
#endif

src/efl_u.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <string.h>
2+
13
#include "eiffel/user.h"
24
#include "service_guard.h"
35

@@ -8,3 +10,19 @@ NX_GENERATE_SERVICE_GUARD(eiffel);
810
Result _eiffelInitialize() { return smGetService(&g_eiffelSrv, EIFFEL_USER_SERVICE_NAME); }
911

1012
void _eiffelCleanup(void) { serviceClose(&g_eiffelSrv); }
13+
14+
Result eiffelGetPluginMeta(SlPluginMeta* out_pluginMeta, const SlPluginName name) {
15+
struct {
16+
SlPluginName name;
17+
} in;
18+
strcpy(in.name, name);
19+
return serviceDispatchInOut(&g_eiffelSrv, EFL_U_CMD_GET_PLUGIN_META, in, *out_pluginMeta);
20+
}
21+
22+
Result eiffelGetPluginSharedMemInfo(SlPluginSharedMemInfo* out_pluginSharedMemInfo, const SlPluginName name) {
23+
struct {
24+
SlPluginName name;
25+
} in;
26+
strcpy(in.name, name);
27+
return serviceDispatchInOut(&g_eiffelSrv, EFL_U_CMD_GET_PLUGIN_SHARED_MEM_INFO, in, *out_pluginSharedMemInfo);
28+
}

0 commit comments

Comments
 (0)