Program Listing for File orchestration.h

Return to documentation for file (api/include/pntos/plugins/orchestration.h)

#pragma once

#include <pntos/aspn.h>
#include <pntos/plugins/common.h>

#ifdef __cplusplus
extern "C" {
#endif

PNTOS_ASSUME_NONNULL_BEGIN

typedef struct PntosMessageStreamConfig {
    void (*sequenced_stream_add)(PntosMediator* self,
                                 PntosMessageType type,
                                 char* PNTOS_NULLABLE source_identifier);
    void (*sequenced_stream_remove)(PntosMediator* self,
                                    PntosMessageType type,
                                    char* PNTOS_NULLABLE source_identifier);
    void (*sequenced_stream_all)(PntosMediator* self, bool enable);

    void (*immediate_stream_add)(PntosMediator* self,
                                 PntosMessageType type,
                                 char* PNTOS_NULLABLE source_identifier);
    void (*immediate_stream_remove)(PntosMediator* self,
                                    PntosMessageType type,
                                    char* PNTOS_NULLABLE source_identifier);
    void (*immediate_stream_all)(PntosMediator* self, bool enable);
} PntosMessageStreamConfig;

typedef struct PntosOrchestrationPlugin {
    PntosCommonPlugin common;
    void (*init_orchestration_plugin)(struct PntosOrchestrationPlugin* self,
                                      PntosPluginArray* PNTOS_NULLABLE plugins,
                                      PntosMessageStreamConfig stream_config);

    void (*process_pntos_message)(struct PntosOrchestrationPlugin* self,
                                  PntosMessage* message,
                                  bool sequenced);

    PntosStringArray* (*get_filter_description_list)(struct PntosOrchestrationPlugin* self);

    PntosMessageArray* PNTOS_NULLABLE (*request_solutions)(struct PntosOrchestrationPlugin* self,
                                                           AspnTypeTimestamp* solution_times,
                                                           size_t num_solution_times,
                                                           char* PNTOS_NULLABLE filter_description);

} PntosOrchestrationPlugin;

PNTOS_ASSUME_NONNULL_END

#ifdef __cplusplus
}
#endif