1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
4 * Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
5 *
6 * Copyright (c) 2015 Research Organization for Information Science
7 * and Technology (RIST). All rights reserved.
8 * $COPYRIGHT$
9 *
10 * Additional copyrights may follow
11 *
12 * $HEADER$
13 */
14
15 /**
16 * @file
17 *
18 * This interface is for use by PMIx servers to obtain network-related info
19 * such as security keys that need to be shared across applications, and to
20 * setup network support for applications prior to launch
21 *
22 * Available plugins may be defined at runtime via the typical MCA parameter
23 * syntax.
24 */
25
26 #ifndef PMIX_PLOG_H
27 #define PMIX_PLOG_H
28
29 #include <src/include/pmix_config.h>
30 #include "pmix_common.h"
31
32 #include "src/class/pmix_list.h"
33 #include "src/mca/mca.h"
34 #include "src/mca/base/pmix_mca_base_var.h"
35 #include "src/mca/base/pmix_mca_base_framework.h"
36 #include "src/include/pmix_globals.h"
37
38 BEGIN_C_DECLS
39
40 /****** MODULE DEFINITION ******/
41
42 /**
43 * Initialize the module. Returns an error if the module cannot
44 * run, success if it can and wants to be used.
45 */
46 typedef pmix_status_t (*pmix_plog_base_module_init_fn_t)(void);
47
48
49 /**
50 * Finalize the module
51 */
52 typedef void (*pmix_plog_base_module_fini_fn_t)(void);
53
54 /**
55 * Log data to channel, if possible
56 */
57 typedef pmix_status_t (*pmix_plog_base_module_log_fn_t)(const pmix_proc_t *source,
58 const pmix_info_t data[], size_t ndata,
59 const pmix_info_t directives[], size_t ndirs,
60 pmix_op_cbfunc_t cbfunc, void *cbdata);
61
62 /**
63 * Base structure for a PLOG module
64 */
65 typedef struct {
66 char *name;
67 char **channels;
68 /* init/finalize */
69 pmix_plog_base_module_init_fn_t init;
70 pmix_plog_base_module_fini_fn_t finalize;
71 pmix_plog_base_module_log_fn_t log;
72 } pmix_plog_module_t;
73
74 /**
75 * Base structure for a PLOG API
76 */
77 typedef struct {
78 pmix_plog_base_module_log_fn_t log;
79 } pmix_plog_API_module_t;
80
81
82 /* declare the global APIs */
83 PMIX_EXPORT extern pmix_plog_API_module_t pmix_plog;
84
85 /*
86 * the standard component data structure
87 */
88 struct pmix_plog_base_component_t {
89 pmix_mca_base_component_t base;
90 pmix_mca_base_component_data_t data;
91 };
92 typedef struct pmix_plog_base_component_t pmix_plog_base_component_t;
93
94 /*
95 * Macro for use in components that are of type plog
96 */
97 #define PMIX_PLOG_BASE_VERSION_1_0_0 \
98 PMIX_MCA_BASE_VERSION_1_0_0("plog", 1, 0, 0)
99
100 END_C_DECLS
101
102 #endif