Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_runner.h File Reference

Helps to run query, store, delete or print commands. These share a lot of functionality but differ in crucial parts. To keep this organized the runner keeps some shared state. More...

#include "olaf_config.h"
#include "olaf_db.h"
#include "pffft.h"

Go to the source code of this file.

Data Structures

struct  Olaf_Runner
 Helps to run query, store, delete or print commands. These share a lot of functionality but differ in crucial parts. To keep this organized the runner keeps some shared state. More...

Macros

#define OLAF_RUNNER_MODE_QUERY   233
 Runner mode for querying the database.
#define OLAF_RUNNER_MODE_STORE   434
 Runner mode for storing fingerprints in the database.
#define OLAF_RUNNER_MODE_DELETE   653
 Runner mode for deleting fingerprints from the database.
#define OLAF_RUNNER_MODE_PRINT   9043
 Runner mode for printing fingerprints.
#define OLAF_RUNNER_MODE_CACHE   2342
 Runner mode for caching fingerprints.

Typedefs

typedef struct Olaf_Runner Olaf_Runner
 Typedef for struct Olaf_Runner.

Functions

Olaf_Runnerolaf_runner_new (int mode, Olaf_Config *config, FILE *fp_cache_file, FILE *fp_meta_file)
 Create a new runner.
void olaf_runner_destroy (Olaf_Runner *runner)
 Delete the resources related to the runner.

Detailed Description

Helps to run query, store, delete or print commands. These share a lot of functionality but differ in crucial parts. To keep this organized the runner keeps some shared state.

Function Documentation

◆ olaf_runner_destroy()

void olaf_runner_destroy ( Olaf_Runner * runner)

Delete the resources related to the runner.

Parameters
runnerThe runner state to clear.

◆ olaf_runner_new()

Olaf_Runner * olaf_runner_new ( int mode,
Olaf_Config * config,
FILE * fp_cache_file,
FILE * fp_meta_file )

Create a new runner.

Parameters
[in]modeThe mode
[in]configThe configuration
[in]fp_cache_fileThe output cache file
[in]fp_meta_fileThe output meta data file
Returns
A new runner struct state of the runner