LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
app_api.h
Go to the documentation of this file.
1/*
2 MIT License
3
4 Copyright (c) 2025 Robin A. Onsay
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16*/
17
37#ifndef JUNO_APP_API_H
38#define JUNO_APP_API_H
39#include "juno/status.h"
40#include "juno/module.h"
41#ifdef __cplusplus
42extern "C"
43{
44#endif
45
48
50typedef struct JUNO_APP_ROOT_TAG JUNO_APP_ROOT_T;
51
53
63
64#ifdef __cplusplus
65}
66#endif
67#endif // JUNO_APP_API_H
struct JUNO_APP_ROOT_TAG JUNO_APP_ROOT_T
The application module.
Definition app_api.h:50
#define JUNO_MODULE_EMPTY
Helper for module definitions with no additional members.
Definition module.h:86
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
Module system and dependency injection primitives for LibJuno.
Status codes and failure-handling helpers for LibJuno.
Definition app_api.h:55
JUNO_STATUS_T(* OnStart)(JUNO_APP_ROOT_T *ptJunoApp)
Called once to initialize resources before processing.
Definition app_api.h:57
JUNO_STATUS_T(* OnProcess)(JUNO_APP_ROOT_T *ptJunoApp)
Main processing routine; may be invoked repeatedly.
Definition app_api.h:59
JUNO_STATUS_T(* OnExit)(JUNO_APP_ROOT_T *ptJunoApp)
Called once prior to shutdown to release resources.
Definition app_api.h:61