Airframe Application Utilities
libairframe 0.7.2 API documentation

Main Page | Data Structures | File List | Data Fields | Globals

mio_sink_file.h File Reference

MIO file sink initializers. More...

#include <airframe/mio.h>

Go to the source code of this file.


Data Structures

struct  _MIOSinkFileConfig
 File sink configuration context. More...

Typedefs

typedef _MIOSinkFileConfig MIOSinkFileConfig
 File sink configuration context.

Functions

gboolean mio_sink_init_file_single (MIOSink *sink, const char *spec, MIOType vsp_type, void *cfg, GError **err)
 Initialize a file sink for writing to a single file.
gboolean mio_sink_init_file_pattern (MIOSink *sink, const char *spec, MIOType vsp_type, void *cfg, GError **err)
 Initialize a file sink for writing to a multiple files based upon a pattern.

Detailed Description

MIO file sink initializers.

Most applications should use the interface in mio_config.h to access these initializers.


Typedef Documentation

typedef struct _MIOSinkFileConfig MIOSinkFileConfig
 

File sink configuration context.

Pass as the cfg argument to any file sink initializer.


Function Documentation

gboolean mio_sink_init_file_pattern MIOSink sink,
const char *  spec,
MIOType  vsp_type,
void *  cfg,
GError **  err
 

Initialize a file sink for writing to a multiple files based upon a pattern.

Fails over to mio_sink_file_single() if specifier does not have any pattern variables.

The following pattern variables are supported:

  • T timestamp at sink open in YYYYMMDDHHMMSS format
  • S serial number (from cfg) in decimal
  • X serial number (from cfg) in hex
  • d dirname of source active at sink open
  • s basename of source active at sink open
  • e extension of source active at sink open

Parameters:
sink pointer to MIOSink to initialize. This MIOSink will be overwritten.
spec input specifier to initialize MIOSink with. Must be a filename.
vsp_type requested sink pointer type, or MIO_T_ANY for default.
cfg pointer to configuration context. Must be a pointer to an MIOSinkFileConfig.
err An error description pointer.
Returns:
TRUE if the MIOSink was successfully initialized.

gboolean mio_sink_init_file_single MIOSink sink,
const char *  spec,
MIOType  vsp_type,
void *  cfg,
GError **  err
 

Initialize a file sink for writing to a single file.

Fails over to mio_sink_init_stdout() if specifier is the special string "-".

Parameters:
sink pointer to MIOSink to initialize. This MIOSink will be overwritten.
spec input specifier to initialize MIOSink with. Must be a filename.
vsp_type requested sink pointer type, or MIO_T_ANY for default.
cfg pointer to configuration context. Must be a pointer to an MIOSinkFileConfig.
err An error description pointer.
Returns:
TRUE if the MIOSink was successfully initialized.