e_info_server: make an internal header 78/304978/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 19 Jan 2024 01:27:48 +0000 (10:27 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 26 Jan 2024 00:59:19 +0000 (09:59 +0900)
Move the internal resources and the function declaration
to the internal header

Change-Id: If661de649b3fa73bb1b0d99c2cd37824645525b5

src/bin/e_info_server.c
src/bin/e_info_server.h
src/bin/e_info_server_intern.h [new file with mode: 0644]
src/bin/e_main.c

index f0bbe3b676c72c9bd74b86beed1a348e8ee02273..73b2eeca3ff01a464c6e17d3cbfba0478208205e 100644 (file)
@@ -1,9 +1,9 @@
 #include "e.h"
+#include "e_info_server_intern.h"
 #include "e_utils_intern.h"
 #include "e_policy_wl.h"
 #include "e_comp_object.h"
 #include "e_info_protocol.h"
-#include "e_info_server.h"
 #include "e_info_server_input.h"
 #include "services/e_service_quickpanel.h"
 #include "services/e_service_kvm.h"
index 74a6f0745a2bba1023aa5a758aeffa8584b121a2..a25d86bf1e605dac9f376cd837c315c39514f084 100644 (file)
@@ -1,13 +1,28 @@
 #ifdef E_TYPEDEFS
+
 typedef void (*E_Info_Hook_Cb)(void *data, const char *log_path);
 typedef struct _E_Info_Hook E_Info_Hook;
+
 #else
+
 #ifndef E_INFO_SERVER_H
 #define E_INFO_SERVER_H
 
 #include <e_info_shared_types.h>
 
+E_API extern int E_EVENT_INFO_ROTATION_MESSAGE;
+
 typedef struct E_Event_Info_Rotation_Message E_Event_Info_Rotation_Message;
+typedef struct _E_Info_Server_Hook E_Info_Server_Hook;
+
+typedef void (*E_Info_Server_Hook_Cb)(void *data);
+
+typedef enum _E_Info_Server_Hook_Point
+{
+   E_INFO_SERVER_HOOK_BUFFER_DUMP_BEGIN,
+   E_INFO_SERVER_HOOK_BUFFER_DUMP_END,
+   E_INFO_SERVER_HOOK_LAST
+} E_Info_Server_Hook_Point;
 
 struct E_Event_Info_Rotation_Message
 {
@@ -16,40 +31,6 @@ struct E_Event_Info_Rotation_Message
    int rotation;
 };
 
-E_API extern int E_EVENT_INFO_ROTATION_MESSAGE;
-
-E_API void e_info_server_hook_set(const char *module_name, E_Info_Hook_Cb func, void *data);
-
-EINTERN int e_info_server_init(void);
-EINTERN int e_info_server_shutdown(void);
-
-EINTERN void e_info_server_dump_client(E_Client *ec, char *fname);
-
-#define WL_HIDE_DEPRECATED
-#include <wayland-server.h>
-
-/* wayland private MACRO and structure definitions */
-#ifndef WL_CLOSURE_MAX_ARGS
-#define WL_CLOSURE_MAX_ARGS 20
-#endif
-
-struct wl_closure
-{
-   int count;
-   const struct wl_message *message;
-   uint32_t opcode;
-   uint32_t sender_id;
-   union wl_argument args[WL_CLOSURE_MAX_ARGS];
-   struct wl_list link;
-   struct wl_proxy *proxy;
-   struct wl_array extra[0];
-};
-
-struct argument_details {
-   char type;
-   int nullable;
-};
-
 struct _E_Info_Hook
 {
    const char *module_name;
@@ -57,17 +38,6 @@ struct _E_Info_Hook
    void *data;
 };
 
-typedef struct _E_Info_Server_Hook E_Info_Server_Hook;
-
-typedef enum _E_Info_Server_Hook_Point
-{
-   E_INFO_SERVER_HOOK_BUFFER_DUMP_BEGIN,
-   E_INFO_SERVER_HOOK_BUFFER_DUMP_END,
-   E_INFO_SERVER_HOOK_LAST
-} E_Info_Server_Hook_Point;
-
-typedef void (*E_Info_Server_Hook_Cb)(void *data);
-
 struct _E_Info_Server_Hook
 {
    EINA_INLIST;
@@ -77,11 +47,9 @@ struct _E_Info_Server_Hook
    unsigned char     delete_me : 1;
 };
 
+E_API void                e_info_server_hook_set(const char *module_name, E_Info_Hook_Cb func, void *data);
 E_API E_Info_Server_Hook *e_info_server_hook_add(E_Info_Server_Hook_Point hookpoint, E_Info_Server_Hook_Cb func, const void *data);
-
-E_API void e_info_server_hook_del(E_Info_Server_Hook *ph);
-
-EINTERN void e_info_server_hook_call(E_Info_Server_Hook_Point hookpoint);
+E_API void                e_info_server_hook_del(E_Info_Server_Hook *ph);
 
 #endif
 #endif
diff --git a/src/bin/e_info_server_intern.h b/src/bin/e_info_server_intern.h
new file mode 100644 (file)
index 0000000..8571d22
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef E_INFO_SERVER_INTERN_H
+#define E_INFO_SERVER_INTERN_H
+
+#define WL_HIDE_DEPRECATED
+#include <wayland-server.h>
+
+/* wayland private MACRO and structure definitions */
+#ifndef WL_CLOSURE_MAX_ARGS
+#define WL_CLOSURE_MAX_ARGS 20
+#endif
+
+struct wl_closure
+{
+   int count;
+   const struct wl_message *message;
+   uint32_t opcode;
+   uint32_t sender_id;
+   union wl_argument args[WL_CLOSURE_MAX_ARGS];
+   struct wl_list link;
+   struct wl_proxy *proxy;
+   struct wl_array extra[0];
+};
+
+struct argument_details {
+   char type;
+   int nullable;
+};
+
+EINTERN int e_info_server_init(void);
+EINTERN int e_info_server_shutdown(void);
+
+EINTERN void e_info_server_dump_client(E_Client *ec, char *fname);
+
+EINTERN void e_info_server_hook_call(E_Info_Server_Hook_Point hookpoint);
+
+#endif
index c7b2a689ad49027a18fb0c8670a334bbed2a860f..6133f4277e9197152c32a6c27dba5247dec9952b 100644 (file)
@@ -14,6 +14,7 @@
 #include "e_prefix_intern.h"
 #include "e_config_intern.h"
 #include "e_keyrouter_intern.h"
+#include "e_info_server_intern.h"
 
 #ifdef __linux__
 # include <sys/prctl.h>