-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoshilib.c
More file actions
34 lines (30 loc) · 695 Bytes
/
Copy pathoshilib.c
File metadata and controls
34 lines (30 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
#include "oshilib.h"
void
OSHILIB_GetIntf(OshiIntf intf)
{
OshiIntfV01 *intfCurr = (OshiIntfV01 *)intf;
// Add some checker here
// such as: interface version and etc.
if (intfCurr->version.major == 0 &&
intfCurr->version.minor == 1) {
printf("Version is correct.\n");
}
intfCurr->sayHello = OSHILIB_SayHello;
intfCurr->sayGoodbye = OSHILIB_SayGoodbye;
}
void
OSHILIB_SayHello(char *name)
{
printf("Hello %s\n", name);
}
void
OSHILIB_SayGoodbye(char *name)
{
printf("Goodbye %s\n", name);
}
DllExport void
OSHI_Start(OshiIntf intf)
{
OSHILIB_GetIntf(intf);
}