File: data_tag.h

package info (click to toggle)
rtl-433 25.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,192 kB
  • sloc: ansic: 55,982; cpp: 3,263; python: 2,544; php: 55; javascript: 43; sh: 18; makefile: 16
file content (35 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/** @file
    Custom data tags for data struct.

    Copyright (C) 2021 Christian Zuckschwerdt

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
*/

#ifndef INCLUDE_TAGS_H_
#define INCLUDE_TAGS_H_

struct gpsd_client;
struct mg_mgr;
struct data;

typedef struct data_tag {
    char const *key;
    char const *val;
    char const **includes;
    struct gpsd_client *gpsd_client;
} data_tag_t;

/// Create a data tag. Might fail and return NULL.
data_tag_t *data_tag_create(char *params, struct mg_mgr *mgr);

/// Free a data tag.
void data_tag_free(data_tag_t *tag);

/// Apply a data tag.
struct data *data_tag_apply(data_tag_t *tag, struct data *data, char const *filename);

#endif /* INCLUDE_TAGS_H_ */