2021-05-29 06:56:12 +00:00
|
|
|
/*
|
2022-08-12 05:03:53 +00:00
|
|
|
* Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com>
|
2021-05-29 06:56:12 +00:00
|
|
|
*
|
|
|
|
* This file is part of Open5GS.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AF_EVENT_H
|
|
|
|
#define AF_EVENT_H
|
|
|
|
|
2022-08-12 05:03:53 +00:00
|
|
|
#include "ogs-proto.h"
|
2021-05-29 06:56:12 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct af_sess_s af_sess_t;
|
|
|
|
|
|
|
|
typedef enum {
|
2022-09-02 14:04:57 +00:00
|
|
|
AF_EVENT_BASE = OGS_MAX_NUM_OF_PROTO_EVENT,
|
2021-05-29 06:56:12 +00:00
|
|
|
|
2022-09-02 14:04:57 +00:00
|
|
|
AF_EVENT_SBI_LOCAL,
|
2021-05-29 06:56:12 +00:00
|
|
|
|
2022-09-02 14:04:57 +00:00
|
|
|
MAX_NUM_OF_AF_EVENT,
|
2021-05-29 06:56:12 +00:00
|
|
|
|
|
|
|
} af_event_e;
|
|
|
|
|
|
|
|
typedef struct af_event_s {
|
2022-08-12 05:03:53 +00:00
|
|
|
ogs_event_t h;
|
2021-05-29 06:56:12 +00:00
|
|
|
int local_id;
|
|
|
|
|
2022-08-12 05:03:53 +00:00
|
|
|
ogs_pkbuf_t *pkbuf;
|
|
|
|
|
2021-05-29 06:56:12 +00:00
|
|
|
struct {
|
2022-08-26 15:12:22 +00:00
|
|
|
ogs_sbi_service_type_e service_type;
|
2021-05-29 06:56:12 +00:00
|
|
|
void *data;
|
|
|
|
ogs_sbi_request_t *(*build)(af_sess_t *sess, void *data);
|
|
|
|
} local;
|
|
|
|
|
|
|
|
af_sess_t *sess;
|
|
|
|
} af_event_t;
|
|
|
|
|
2022-08-12 05:03:53 +00:00
|
|
|
af_event_t *af_event_new(int id);
|
2021-05-29 06:56:12 +00:00
|
|
|
|
|
|
|
const char *af_event_get_name(af_event_t *e);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* AF_EVENT_H */
|