Ver Fonte

ipc: move BIPC, BIPCServer from system

ambrop7 há 15 anos atrás
pai
commit
59243516dd
7 ficheiros alterados com 13 adições e 9 exclusões
  1. 1 0
      CMakeLists.txt
  2. 1 1
      ipc/BIPC.c
  3. 3 3
      ipc/BIPC.h
  4. 1 1
      ipc/BIPCServer.c
  5. 2 2
      ipc/BIPCServer.h
  6. 5 0
      ipc/CMakeLists.txt
  7. 0 2
      system/CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -82,6 +82,7 @@ add_subdirectory(predicate)
 add_subdirectory(nspr_support)
 add_subdirectory(server_connection)
 add_subdirectory(security)
+add_subdirectory(ipc)
 
 # example programs
 add_subdirectory(examples)

+ 1 - 1
system/BIPC.c → ipc/BIPC.c

@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <system/BIPC.h>
+#include <ipc/BIPC.h>
 
 #define COMPONENT_SOURCE 1
 #define COMPONENT_SINK 2

+ 3 - 3
system/BIPC.h → ipc/BIPC.h

@@ -25,16 +25,16 @@
  * Uses unix sockets on *nix systems, and named pipes on Windows.
  */
 
-#ifndef BADVPN_SYSTEM_BIPC_H
-#define BADVPN_SYSTEM_BIPC_H
+#ifndef BADVPN_IPC_BIPC_H
+#define BADVPN_IPC_BIPC_H
 
 #include <misc/debug.h>
 #include <misc/dead.h>
 #include <system/BSocket.h>
 #include <system/DebugObject.h>
-#include <system/BIPCServer.h>
 #include <flow/SeqPacketSocketSink.h>
 #include <flow/SeqPacketSocketSource.h>
+#include <ipc/BIPCServer.h>
 
 /**
  * Handler function called when an error occurs.

+ 1 - 1
system/BIPCServer.c → ipc/BIPCServer.c

@@ -20,7 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <system/BIPCServer.h>
+#include <ipc/BIPCServer.h>
 
 static void listener_handler (BIPCServer *o)
 {

+ 2 - 2
system/BIPCServer.h → ipc/BIPCServer.h

@@ -25,8 +25,8 @@
  * message-oriented two-way IPC.
  */
 
-#ifndef BADVPN_SYSTEM_BIPCSERVER_H
-#define BADVPN_SYSTEM_BIPCSERVER_H
+#ifndef BADVPN_IPC_BIPCSERVER_H
+#define BADVPN_IPC_BIPCSERVER_H
 
 #include <misc/debug.h>
 #include <misc/dead.h>

+ 5 - 0
ipc/CMakeLists.txt

@@ -0,0 +1,5 @@
+add_library(ipc
+    BIPC.c
+    BIPCServer.c
+)
+target_link_libraries(ipc system flow)

+ 0 - 2
system/CMakeLists.txt

@@ -7,8 +7,6 @@ set(BSYSTEM_ADDITIONAL_SOURCES)
 if (NOT WIN32)
     list(APPEND BSYSTEM_ADDITIONAL_SOURCES
         BLog_syslog.c
-        BIPC.c
-        BIPCServer.c
     )
 endif ()