summaryrefslogtreecommitdiffstats
path: root/xlators/playground/template/src/template.h
blob: e384c0181f71d8259a501be909b0d52020a3c98a (plain)
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
36
37
38
39
40
41
42
43
44
45
46
/*
   Copyright (c) 2013-2018 Red Hat, Inc. <http://www.redhat.com>
   This file is part of GlusterFS.

   This file is licensed to you under your choice of the GNU Lesser
   General Public License, version 3 or any later version (LGPLv3 or
   later), or the GNU General Public License, version 2 (GPLv2), in all
   cases as published by the Free Software Foundation.
*/
#ifndef __TEMPLATE_H__
#define __TEMPLATE_H__

#include "glusterfs.h"
#include "logging.h"
#include "dict.h"
#include "xlator.h"
#include "defaults.h"

struct template_private {
        /* Add all the relevant fields you need here */
        int32_t dummy;
};

typedef struct template_private template_private_t;

/* Below section goes to template-mem-types.h */
#include "mem-types.h"

enum gf_template_mem_types_ {
        gf_template_mt_private_t = gf_common_mt_end + 1,
        gf_template_mt_end,
};

/* This normally goes to another file 'template-messages.h",
   required for 'gf_msg()'.
   NOTE: make sure you have added your component (in this case,
   TEMPLATE) in `libglusterfs/src/glfs-message-id.h`.
 */
#include "glfs-message-id.h"

GLFS_MSGID(TEMPLATE,
           TEMPLATE_MSG_NO_MEMORY,
           TEMPLATE_MSG_NO_GRAPH
        );

#endif /* __TEMPLATE_H__ */