Browse Source

Create private.h instead syms.h and show.h

Serj Kalichev 1 year ago
parent
commit
cc99c80d80
6 changed files with 11 additions and 21 deletions
  1. 1 2
      src/Makefile.am
  2. 1 1
      src/plugin.c
  3. 7 4
      src/private.h
  4. 1 1
      src/show.c
  5. 0 11
      src/show.h
  6. 1 2
      src/syms.c

+ 1 - 2
src/Makefile.am

@@ -10,11 +10,10 @@ kplugin_sysrepo_la_CFLAGS = $(AM_LDFLAGS)
 
 kplugin_sysrepo_la_SOURCES += \
 	src/plugin.c \
-	src/syms.h \
+	src/private.h \
 	src/syms.c \
 	src/sr_copypaste.h \
 	src/sr_copypaste.c \
 	src/pline.h \
 	src/pline.c \
-	src/show.h \
 	src/show.c

+ 1 - 1
src/plugin.c

@@ -13,7 +13,7 @@
 #include <sysrepo.h>
 #include <sysrepo/xpath.h>
 
-#include "syms.h"
+#include "private.h"
 
 
 const uint8_t kplugin_sysrepo_major = KPLUGIN_MAJOR;

+ 7 - 4
src/syms.h → src/private.h

@@ -1,9 +1,9 @@
 /*
- * syms.h
+ * private.h
  */
 
-#ifndef _syms_h
-#define _syms_h
+#ifndef _pligin_sysrepo_private_h
+#define _plugin_sysrepo_private_h
 
 #include <faux/faux.h>
 #include <klish/kcontext_base.h>
@@ -49,7 +49,10 @@ int srp_show(kcontext_t *context);
 int srp_show_running(kcontext_t *context);
 int srp_deactivate(kcontext_t *context);
 
+// Private
+bool_t show_xpath(sr_session_ctx_t *sess, const char *xpath, uint32_t flags);
+
 C_DECL_END
 
 
-#endif // _syms_h
+#endif // _plugin_sysrepo_private_h

+ 1 - 1
src/show.c

@@ -16,7 +16,7 @@
 
 #include "sr_copypaste.h"
 #include "pline.h"
-#include "show.h"
+#include "private.h"
 
 #define LEVEL_SPACES_NUM 4
 

+ 0 - 11
src/show.h

@@ -1,11 +0,0 @@
-#ifndef _show_h
-#define _show_h
-
-#include <sysrepo.h>
-#include <sysrepo/xpath.h>
-
-
-bool_t show_xpath(sr_session_ctx_t *sess, const char *xpath, uint32_t flags);
-
-
-#endif // _show_h

+ 1 - 2
src/syms.c

@@ -21,8 +21,7 @@
 
 #include "sr_copypaste.h"
 #include "pline.h"
-#include "syms.h"
-#include "show.h"
+#include "private.h"
 
 
 static faux_argv_t *param2argv(const faux_argv_t *cur_path,