libvigicrues  2.0.1
delegate.h
1 /*
2  * Copyright (c) 2017 Valentin Lahaye
3  *
4  * This file is part of a free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 3 of the License, or any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>
16  */
17 
18 #ifndef VIGICRUES_DELEGATE_H
19 #define VIGICRUES_DELEGATE_H
20 
21 #include <vigicrues.h>
22 
23 #define VIGICRUES_BUF_LENGTH 256
24 
25 #define VIGICRUES_REPORT_ERROR(code) \
26  if (p_error) { \
27  *p_error = (code); \
28  }
29 
30 typedef struct {
31  char *buf;
32  size_t size;
34 
35 vigicrues_status_t vigicrues_get_data(unsigned ent, const char *id,
36  enum vigicrues_e type, unsigned timeout,
37  vigicrues_data_t *p_data,
38  vigicrues_error_t *p_error);
39 
40 #endif
vigicrues_e
Specifies the type of data to retreive for a station.
Definition: vigicrues.h:80
vigicrues_error_t
Specifies the different error codes that can be reported in case of failure.
Definition: vigicrues.h:134
Definition: delegate.h:30
File containing macros, types and function prototypes needed to work with libvigicrues.
vigicrues_status_t
Specifies the values that can be returned by a function to indicate its execution status...
Definition: vigicrues.h:149