summaryrefslogtreecommitdiffstats
path: root/xlators/playground/template/src/template.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/playground/template/src/template.h')
-rw-r--r--xlators/playground/template/src/template.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/xlators/playground/template/src/template.h b/xlators/playground/template/src/template.h
index 2e9752cac09..e384c0181f7 100644
--- a/xlators/playground/template/src/template.h
+++ b/xlators/playground/template/src/template.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+ 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
@@ -16,4 +16,31 @@
#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__ */