Skip to content

Commit

Permalink
Feature interface of the new c API
Browse files Browse the repository at this point in the history
  • Loading branch information
MircoValentiniECMWF committed Dec 19, 2024
1 parent e215a05 commit cb70a62
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/multiom/api/c/api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// multio_grib2 dictionary
int multio_grib2_dict_create( void** dict );
int multio_grib2_dict_set( void* dict, const char* key, const char* value );
int multio_grib2_dict_get( void* dict, const char* key, char** value );
int multio_grib2_dict_has( void* dict, const char* key, bool* has );
int multio_grib2_dict_iterate( void* dict, void** iterator, char** key, char** value );
int multio_grib2_dict_destroy( void* dict );

// Initialize all the options to a relevant default
int multio_grib2_init_options( void** opt_dict );

// options dict can be null, in this case default options can be applied
int multio_grib2_encoder_open( void* opt_dict, void** multio_grib2 );
int multio_grib2_encoder_extract_metadata( void* multio_grib2, grib_handle* grib, void** mars_dict, void** par_dict );
int multio_grib2_encoder_encode64( void* multio_grib2, void* mars_dict, void* par_dict, double* data, size_t data_len, grib_handle* out_handle );
int multio_grib2_encoder_encode32( void* multio_grib2, void* mars_dict, void* par_dict, float* data, size_t data_len, grib_handle* out_handle );
int multio_grib2_encoder_close( void* multio_grib2 );

0 comments on commit cb70a62

Please sign in to comment.