Mercury
mchecksum_private.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MCHECKSUM_PRIVATE_H
12 #define MCHECKSUM_PRIVATE_H
13 
14 #include "mchecksum.h"
15 
16 /* Remove warnings when plugin does not use callback arguments */
17 #if defined(__cplusplus)
18  #define MCHECKSUM_UNUSED
19 #elif defined(__GNUC__) && (__GNUC__ >= 4)
20  #define MCHECKSUM_UNUSED __attribute__((unused))
21 #else
22  #define MCHECKSUM_UNUSED
23 #endif
24 
25 /* Checksum class definition */
27  /* Private data */
28  void *data;
29  /* Callbacks */
30  int (*destroy)(struct mchecksum_class *checksum_class);
31  int (*reset)(struct mchecksum_class *checksum_class);
32  size_t (*get_size)(struct mchecksum_class *checksum_class);
33  int (*get)(struct mchecksum_class *checksum_class,
34  void *buf, size_t size, int finalize);
35  int (*update)(struct mchecksum_class *checksum_class,
36  const void *data, size_t size);
37 };
38 
39 #endif /* MCHECKSUM_PRIVATE_H */
int(* destroy)(struct mchecksum_class *checksum_class)
int(* update)(struct mchecksum_class *checksum_class, const void *data, size_t size)
int(* reset)(struct mchecksum_class *checksum_class)
size_t(* get_size)(struct mchecksum_class *checksum_class)