[cleanup] change file location and mode 25/241925/1
authorYoungjae Shin <yj99.shin@samsung.com>
Thu, 20 Aug 2020 08:35:39 +0000 (17:35 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 20 Aug 2020 08:35:39 +0000 (17:35 +0900)
Change-Id: I1f74ff9259a5c02a161bb75d4dd2ea15b0c6de6f

135 files changed:
CMakeLists.txt
LICENSE.APLv2 [moved from LICENSE with 100% similarity]
dbus-interface/CMakeLists.txt [moved from interfaces/CMakeLists.txt with 100% similarity]
dbus-interface/stcmanager-iface-firewall.xml [moved from interfaces/stcmanager-iface-firewall.xml with 100% similarity]
dbus-interface/stcmanager-iface-manager.xml [moved from interfaces/stcmanager-iface-manager.xml with 100% similarity]
dbus-interface/stcmanager-iface-pcap.xml [moved from interfaces/stcmanager-iface-pcap.xml with 100% similarity]
dbus-interface/stcmanager-iface-restriction.xml [moved from interfaces/stcmanager-iface-restriction.xml with 100% similarity]
dbus-interface/stcmanager-iface-statistics.xml [moved from interfaces/stcmanager-iface-statistics.xml with 100% similarity]
include/counter.h [moved from src/configure/include/counter.h with 100% similarity]
include/db/table-counters.h [moved from src/database/include/table-counters.h with 100% similarity, mode: 0644]
include/db/table-firewall.h [moved from src/database/include/table-firewall.h with 100% similarity, mode: 0644]
include/db/table-restrictions.h [moved from src/database/include/table-restrictions.h with 100% similarity, mode: 0644]
include/db/table-statistics.h [moved from src/database/include/table-statistics.h with 100% similarity, mode: 0644]
include/stc-db.h [moved from src/database/include/stc-db.h with 100% similarity, mode: 0644]
include/stc-error.h [changed mode: 0755->0644]
include/stc-firewall.h [changed mode: 0755->0644]
include/stc-manager-gdbus.h [changed mode: 0755->0644]
include/stc-manager-plugin-appstatus.h [changed mode: 0755->0644]
include/stc-manager-plugin-exception.h [changed mode: 0755->0644]
include/stc-manager-plugin-firewall.h [changed mode: 0755->0644]
include/stc-manager-plugin-monitor.h [changed mode: 0755->0644]
include/stc-manager-plugin-pcap.h [changed mode: 0755->0644]
include/stc-manager-plugin-procfs.h [changed mode: 0755->0644]
include/stc-manager-plugin-tether.h [changed mode: 0755->0644]
include/stc-manager-util.h [changed mode: 0755->0644]
include/stc-manager.h [changed mode: 0755->0644]
include/stc-pcap.h [changed mode: 0755->0644]
include/stc-restriction.h [changed mode: 0755->0644]
include/stc-statistics.h [changed mode: 0755->0644]
include/transmission.h [changed mode: 0755->0644]
manager/CMakeLists.txt [moved from src/CMakeLists.txt with 68% similarity]
manager/database/db-common.c [moved from src/database/db-common.c with 100% similarity, mode: 0644]
manager/database/db-guard.c [moved from src/database/db-guard.c with 100% similarity]
manager/database/db-internal.h [moved from src/database/include/db-internal.h with 100% similarity, mode: 0644]
manager/database/table-counters.c [moved from src/database/tables/table-counters.c with 100% similarity, mode: 0644]
manager/database/table-firewall.c [moved from src/database/tables/table-firewall.c with 100% similarity, mode: 0644]
manager/database/table-restrictions.c [moved from src/database/tables/table-restrictions.c with 100% similarity, mode: 0644]
manager/database/table-statistics.c [moved from src/database/tables/table-statistics.c with 100% similarity, mode: 0644]
manager/helper/configure_stub.h [moved from src/configure/include/configure_stub.h with 100% similarity]
manager/helper/helper-cgroup.c [moved from src/helper/helper-cgroup.c with 100% similarity, mode: 0644]
manager/helper/helper-cgroup.h [moved from src/helper/helper-cgroup.h with 100% similarity]
manager/helper/helper-file.c [moved from src/helper/helper-file.c with 100% similarity, mode: 0644]
manager/helper/helper-file.h [moved from src/helper/helper-file.h with 100% similarity]
manager/helper/helper-firewall.c [moved from src/helper/helper-firewall.c with 100% similarity, mode: 0644]
manager/helper/helper-firewall.h [moved from src/helper/helper-firewall.h with 100% similarity]
manager/helper/helper-inotify.c [moved from src/helper/helper-inotify.c with 100% similarity]
manager/helper/helper-inotify.h [moved from src/helper/helper-inotify.h with 100% similarity]
manager/helper/helper-iptables.c [moved from src/helper/helper-iptables.c with 100% similarity, mode: 0644]
manager/helper/helper-iptables.h [moved from src/helper/helper-iptables.h with 100% similarity, mode: 0644]
manager/helper/helper-net-cls.c [moved from src/helper/helper-net-cls.c with 100% similarity, mode: 0644]
manager/helper/helper-net-cls.h [moved from src/helper/helper-net-cls.h with 100% similarity]
manager/helper/helper-nfacct-rule.c [moved from src/helper/helper-nfacct-rule.c with 99% similarity, mode: 0644]
manager/helper/helper-nfacct-rule.h [moved from src/helper/helper-nfacct-rule.h with 99% similarity, mode: 0644]
manager/helper/helper-nl.c [moved from src/helper/helper-nl.c with 100% similarity, mode: 0644]
manager/helper/helper-nl.h [moved from src/helper/helper-nl.h with 100% similarity]
manager/helper/helper-procfs.c [moved from src/helper/helper-procfs.c with 100% similarity]
manager/helper/helper-procfs.h [moved from src/helper/helper-procfs.h with 100% similarity]
manager/stc-firewall.c [moved from src/stc-firewall.c with 100% similarity, mode: 0644]
manager/stc-manager-gdbus.c [moved from src/stc-manager-gdbus.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-appstatus.c [moved from src/stc-manager-plugin-appstatus.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-exception.c [moved from src/stc-manager-plugin-exception.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-firewall.c [moved from src/stc-manager-plugin-firewall.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-monitor.c [moved from src/stc-manager-plugin-monitor.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-pcap.c [moved from src/stc-manager-plugin-pcap.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-procfs.c [moved from src/stc-manager-plugin-procfs.c with 100% similarity, mode: 0644]
manager/stc-manager-plugin-tether.c [moved from src/stc-manager-plugin-tether.c with 100% similarity, mode: 0644]
manager/stc-manager.c [moved from src/stc-manager.c with 100% similarity, mode: 0644]
manager/stc-pcap.c [moved from src/stc-pcap.c with 100% similarity, mode: 0644]
manager/stc-restriction.c [moved from src/stc-restriction.c with 100% similarity, mode: 0644]
manager/stc-statistics.c [moved from src/stc-statistics.c with 100% similarity, mode: 0644]
manager/util/stc-manager-util.c [moved from src/stc-manager-util.c with 100% similarity, mode: 0644]
misc/CMakeLists.txt [moved from src/utils/CMakeLists.txt with 100% similarity]
misc/net-cls-release.c [moved from src/utils/net-cls-release.c with 100% similarity]
packaging/stc-manager.manifest [moved from stc-manager.manifest with 98% similarity]
packaging/stc-manager.spec
plugin/CMakeLists.txt
plugin/appstatus/CMakeLists.txt
plugin/appstatus/stc-plugin-appstatus.c [changed mode: 0755->0644]
plugin/appstatus/stc-plugin-appstatus.h [moved from plugin/appstatus/include/stc-plugin-appstatus.h with 100% similarity]
plugin/exception/CMakeLists.txt
plugin/exception/stc-plugin-exception.c [changed mode: 0755->0644]
plugin/exception/stc-plugin-exception.h [moved from plugin/exception/include/stc-plugin-exception.h with 100% similarity]
plugin/firewall/CMakeLists.txt
plugin/firewall/stc-plugin-firewall.c [changed mode: 0755->0644]
plugin/firewall/stc-plugin-firewall.h [moved from plugin/firewall/include/stc-plugin-firewall.h with 100% similarity, mode: 0644]
plugin/monitor/CMakeLists.txt
plugin/monitor/stc-plugin-monitor-app.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-app.h [moved from plugin/monitor/include/stc-plugin-monitor-app.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-connection.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-connection.h [moved from plugin/monitor/include/stc-plugin-monitor-connection.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-context.h [moved from plugin/monitor/include/stc-plugin-monitor-context.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-ipt.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-ipt.h [moved from plugin/monitor/include/stc-plugin-monitor-ipt.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-proc.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-proc.h [moved from plugin/monitor/include/stc-plugin-monitor-proc.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-rstn.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-rstn.h [moved from plugin/monitor/include/stc-plugin-monitor-rstn.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor-time.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor-time.h [moved from plugin/monitor/include/stc-plugin-monitor-time.h with 100% similarity, mode: 0644]
plugin/monitor/stc-plugin-monitor.c [changed mode: 0755->0644]
plugin/monitor/stc-plugin-monitor.h [moved from plugin/monitor/include/stc-plugin-monitor.h with 100% similarity, mode: 0644]
plugin/pcap/CMakeLists.txt
plugin/pcap/stc-plugin-pcap-internal.h [moved from plugin/pcap/include/stc-plugin-pcap-internal.h with 100% similarity, mode: 0644]
plugin/pcap/stc-plugin-pcap.c [changed mode: 0755->0644]
plugin/pcap/stc-plugin-pcap.h [moved from plugin/pcap/include/stc-plugin-pcap.h with 100% similarity, mode: 0644]
plugin/procfs/CMakeLists.txt
plugin/procfs/stc-plugin-procfs.c [changed mode: 0755->0644]
plugin/procfs/stc-plugin-procfs.h [moved from plugin/procfs/include/stc-plugin-procfs.h with 100% similarity, mode: 0644]
plugin/tether/CMakeLists.txt
plugin/tether/stc-plugin-tether.c [changed mode: 0755->0644]
plugin/tether/stc-plugin-tether.h [moved from plugin/tether/include/stc-plugin-tether.h with 100% similarity]
res/500.stc-manager_upgrade.sh [moved from scripts/500.stc-manager_upgrade.sh with 100% similarity, mode: 0755]
res/dbus/net.stc-manager.service [moved from resources/dbus/net.stc-manager.service with 100% similarity, mode: 0644]
res/dbus/stc-manager.conf [moved from resources/dbus/stc-manager.conf with 100% similarity, mode: 0644]
res/exceptions [moved from data/exceptions with 100% similarity]
res/firewall_db.sql [moved from data/firewall_db.sql with 100% similarity]
res/systemd/stc-manager.service [moved from resources/systemd/stc-manager.service with 100% similarity]
res/traffic_db.sql [moved from data/traffic_db.sql with 100% similarity]
tests/CMakeLists.txt [moved from unittest/CMakeLists.txt with 100% similarity]
tests/common.cpp [moved from unittest/common.cpp with 99% similarity]
tests/common.h [moved from unittest/common.h with 100% similarity]
tests/firewall.cpp [moved from unittest/firewall.cpp with 99% similarity]
tests/firewall.h [moved from unittest/firewall.h with 100% similarity]
tests/gdbus.cpp [moved from unittest/gdbus.cpp with 100% similarity]
tests/gdbus.h [moved from unittest/gdbus.h with 100% similarity]
tests/manager.cpp [moved from unittest/manager.cpp with 100% similarity]
tests/manager.h [moved from unittest/manager.h with 100% similarity]
tests/restriction.cpp [moved from unittest/restriction.cpp with 100% similarity]
tests/restriction.h [moved from unittest/restriction.h with 100% similarity]
tests/statistics.cpp [moved from unittest/statistics.cpp with 99% similarity]
tests/statistics.h [moved from unittest/statistics.h with 100% similarity]
tests/stcmgr.cpp [moved from unittest/stcmgr.cpp with 100% similarity]
tests/stcmgr.h [moved from unittest/stcmgr.h with 100% similarity]
tests/unittest.cpp [moved from unittest/unittest.cpp with 100% similarity]
tests/unittest.h [moved from unittest/unittest.h with 100% similarity]

index 3386c69..011c4bc 100644 (file)
@@ -1,16 +1,17 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(stc-manager C CXX)
 SET(PACKAGE ${PROJECT_NAME})
-SET(INTERFACES "${CMAKE_SOURCE_DIR}/interfaces")
+SET(INTERFACES "${CMAKE_SOURCE_DIR}/dbus-interface")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(LIBDIR ${PREFIX}/${LIB_PATH})
 
-SET(DATA_DIR   ${CMAKE_SOURCE_DIR}/data)
+SET(DATA_DIR   ${CMAKE_SOURCE_DIR}/res)
 
-ADD_SUBDIRECTORY(interfaces)
-ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(dbus-interface)
+ADD_SUBDIRECTORY(manager)
 ADD_SUBDIRECTORY(plugin)
+ADD_SUBDIRECTORY(misc)
 
 IF(BUILD_GTESTS)
-       ADD_SUBDIRECTORY(unittest)
+       ADD_SUBDIRECTORY(tests)
 ENDIF(BUILD_GTESTS)
similarity index 100%
rename from LICENSE
rename to LICENSE.APLv2
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/table-counters.h
rename to include/db/table-counters.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/table-firewall.h
rename to include/db/table-firewall.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/table-restrictions.h
rename to include/db/table-restrictions.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/table-statistics.h
rename to include/db/table-statistics.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/stc-db.h
rename to include/stc-db.h
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 68%
rename from src/CMakeLists.txt
rename to manager/CMakeLists.txt
index 9883098..3c0d1b7 100644 (file)
@@ -21,10 +21,9 @@ FOREACH(flag ${stc_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(SOURCE_DIR                  ${CMAKE_SOURCE_DIR}/src)
+SET(SOURCE_DIR                  ${CMAKE_SOURCE_DIR}/manager)
 SET(HELPER_SOURCE_DIR           ${SOURCE_DIR}/helper)
 SET(DATABASE_SOURCE_DIR         ${SOURCE_DIR}/database)
-SET(CONFIGURE_SOURCE_DIR        ${SOURCE_DIR}/configure)
 SET(LIMITATION_SOURCE_DIR       ${SOURCE_DIR}/limitation)
 SET(PLUGIN_DIR                  ${CMAKE_SOURCE_DIR}/plugin)
 SET(APPSTATUS_SOURCE_DIR        ${PLUGIN_DIR}/appstatus)
@@ -36,40 +35,31 @@ SET(MONITOR_SOURCE_DIR          ${PLUGIN_DIR}/monitor)
 SET(FIREWALL_SOURCE_DIR         ${PLUGIN_DIR}/firewall)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/interfaces)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/dbus-interface)
 
 INCLUDE_DIRECTORIES(${SOURCE_DIR})
 INCLUDE_DIRECTORIES(${HELPER_SOURCE_DIR})
 
 INCLUDE_DIRECTORIES(${DATABASE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${DATABASE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/db)
 
-INCLUDE_DIRECTORIES(${CONFIGURE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CONFIGURE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${APPSTATUS_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${EXCEPTION_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${PROCFS_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${PCAP_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${TETHER_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${MONITOR_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${FIREWALL_SOURCE_DIR})
 
-INCLUDE_DIRECTORIES(${LIMITATION_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${LIMITATION_SOURCE_DIR}/include)
-
-INCLUDE_DIRECTORIES(${APPSTATUS_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${EXCEPTION_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${PROCFS_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${PCAP_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${TETHER_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${MONITOR_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${FIREWALL_SOURCE_DIR}/include)
-
-FILE(GLOB SOURCE_SRCS        ${SOURCE_DIR}/*.c)
+FILE(GLOB SOURCE_SRCS        ${SOURCE_DIR}/*.c util/*.c)
 FILE(GLOB HELPER_SRCS        ${HELPER_SOURCE_DIR}/*.c)
-FILE(GLOB CONFIGURE_SRCS     ${CONFIGURE_SOURCE_DIR}/*.c)
-FILE(GLOB LIMITATION_SRCS    ${LIMITATION_SOURCE_DIR}/*.c)
 
-SET(SRCS ${SRCS} ${SOURCE_SRCS} ${HELPER_SRCS} ${CONFIGURE_SRCS} ${LIMITATION_SRCS})
+SET(SRCS ${SRCS} ${SOURCE_SRCS} ${HELPER_SRCS})
 
 IF("${ENABLE_DATABASE}" STREQUAL "YES")
        FILE(GLOB DATABASE_SRCS           ${DATABASE_SOURCE_DIR}/*.c)
-       FILE(GLOB DATABASE_TABLES_SRCS    ${DATABASE_SOURCE_DIR}/tables/*.c)
 
-       SET(SRCS ${SRCS} ${DATABASE_SRCS} ${DATABASE_TABLES_SRCS})
+       SET(SRCS ${SRCS} ${DATABASE_SRCS})
 
        INSTALL(FILES ${DATA_DIR}/traffic_db.sql DESTINATION /usr/share)
        INSTALL(FILES ${DATA_DIR}/firewall_db.sql DESTINATION /usr/share)
@@ -99,5 +89,3 @@ ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${stc_pkgs_LDFLAGS} -ldl)
 INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${BIN_DIR})
 ADD_DEPENDENCIES(${PROJECT_NAME} GENERATED_DBUS_CODE)
-
-ADD_SUBDIRECTORY(utils)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/db-common.c
rename to manager/database/db-common.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/include/db-internal.h
rename to manager/database/db-internal.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/tables/table-counters.c
rename to manager/database/table-counters.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/tables/table-firewall.c
rename to manager/database/table-firewall.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/tables/table-restrictions.c
rename to manager/database/table-restrictions.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/database/tables/table-statistics.c
rename to manager/database/table-statistics.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-cgroup.c
rename to manager/helper/helper-cgroup.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-file.c
rename to manager/helper/helper-file.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-firewall.c
rename to manager/helper/helper-firewall.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-iptables.c
rename to manager/helper/helper-iptables.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-iptables.h
rename to manager/helper/helper-iptables.h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-net-cls.c
rename to manager/helper/helper-net-cls.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/helper/helper-nfacct-rule.c
rename to manager/helper/helper-nfacct-rule.c
index ff703d3..5694d14
@@ -959,4 +959,3 @@ void generate_counter_name(nfacct_rule_s *counter)
                 warn_symbol, counter->iotype, counter->iftype,
                 counter->classid, counter->ifname);
 }
-
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/helper/helper-nfacct-rule.h
rename to manager/helper/helper-nfacct-rule.h
index f313849..5e09471
@@ -141,4 +141,3 @@ netlink_serialization_command *
 netlink_create_command(struct netlink_serialization_params *params);
 
 #endif /* __STC_NFACCT_RULE_H__ */
-
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/helper/helper-nl.c
rename to manager/helper/helper-nl.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-firewall.c
rename to manager/stc-firewall.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-gdbus.c
rename to manager/stc-manager-gdbus.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-appstatus.c
rename to manager/stc-manager-plugin-appstatus.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-exception.c
rename to manager/stc-manager-plugin-exception.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-firewall.c
rename to manager/stc-manager-plugin-firewall.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-monitor.c
rename to manager/stc-manager-plugin-monitor.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-pcap.c
rename to manager/stc-manager-plugin-pcap.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-procfs.c
rename to manager/stc-manager-plugin-procfs.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-plugin-tether.c
rename to manager/stc-manager-plugin-tether.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager.c
rename to manager/stc-manager.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-pcap.c
rename to manager/stc-pcap.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-restriction.c
rename to manager/stc-restriction.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-statistics.c
rename to manager/stc-statistics.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/stc-manager-util.c
rename to manager/util/stc-manager-util.c
similarity index 100%
rename from src/utils/CMakeLists.txt
rename to misc/CMakeLists.txt
similarity index 98%
rename from stc-manager.manifest
rename to packaging/stc-manager.manifest
index 81ace0c..97e8c31 100644 (file)
@@ -3,4 +3,3 @@
                <domain name="_"/>
        </request>
 </manifest>
-
index 0690fde..c19c312 100644 (file)
@@ -5,6 +5,7 @@ Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
 
 %define enable_database YES
 %define enable_statistics YES
@@ -93,7 +94,7 @@ A smart traffic control manager extension for firewall plugin
 
 %prep
 %setup -q
-chmod 644 %{SOURCE0}
+cp %{SOURCE1001} ./%{name}.manifest
 
 %build
 
@@ -135,29 +136,29 @@ rm -rf %{buildroot}
 
 #Exceptions file
 mkdir -p %{buildroot}/%{_localstatedir}/lib/stc
-cp data/exceptions %{buildroot}/%{_localstatedir}/lib/stc/exceptions
+cp res/exceptions %{buildroot}/%{_localstatedir}/lib/stc/exceptions
 
 #Systemd service file
 mkdir -p %{buildroot}%{_unitdir}
-cp resources/systemd/stc-manager.service %{buildroot}%{_unitdir}/stc-manager.service
+cp res/systemd/stc-manager.service %{buildroot}%{_unitdir}/stc-manager.service
 
 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
 ln -s ../stc-manager.service %{buildroot}%{_unitdir}/multi-user.target.wants/stc-manager.service
 
 #DBus DAC (stc-manager.manifest enables DBus SMACK)
 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
-cp resources/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-manager.conf
+cp res/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-manager.conf
 
 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
-cp resources/dbus/net.stc-manager.service %{buildroot}%{_datadir}/dbus-1/system-services/net.stc.service
+cp res/dbus/net.stc-manager.service %{buildroot}%{_datadir}/dbus-1/system-services/net.stc.service
 
 #OS Upgrade
 mkdir -p %{buildroot}%{upgrade_script_path}
-cp -f scripts/%{upgrade_script_filename} %{buildroot}%{upgrade_script_path}
+cp -f res/%{upgrade_script_filename} %{buildroot}%{upgrade_script_path}
 
 %files
 %manifest %{name}.manifest
-%license LICENSE
+%license LICENSE.APLv2
 %defattr(-,root,root,-)
 %attr(500,root,root) %{_bindir}/*
 
index 98f28b7..d1777f2 100644 (file)
@@ -1,15 +1,14 @@
-SET(SOURCE_DIR               ${CMAKE_SOURCE_DIR}/src)
+SET(SOURCE_DIR               ${CMAKE_SOURCE_DIR}/manager)
 SET(HELPER_SOURCE_DIR        ${SOURCE_DIR}/helper)
 SET(DATABASE_SOURCE_DIR      ${SOURCE_DIR}/database)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/interfaces)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/dbus-interface)
 
 INCLUDE_DIRECTORIES(${SOURCE_DIR})
 INCLUDE_DIRECTORIES(${HELPER_SOURCE_DIR})
 
-INCLUDE_DIRECTORIES(${DATABASE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${DATABASE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/db)
 
 ADD_SUBDIRECTORY(appstatus)
 ADD_SUBDIRECTORY(exception)
index d4d7428..0a3acf7 100644 (file)
@@ -16,8 +16,6 @@ FOREACH(flag ${appstatus_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
old mode 100755 (executable)
new mode 100644 (file)
index 1ccf391..06b6d93 100644 (file)
@@ -15,8 +15,6 @@ FOREACH(flag ${exception_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
old mode 100755 (executable)
new mode 100644 (file)
index 05c4d90..2576f2d 100644 (file)
@@ -14,8 +14,6 @@ FOREACH(flag ${firewall_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from plugin/firewall/include/stc-plugin-firewall.h
rename to plugin/firewall/stc-plugin-firewall.h
index e1e0048..c05a448 100644 (file)
@@ -18,12 +18,10 @@ FOREACH(flag ${monitor_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/configure/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/tether/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/exception/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/appstatus/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/firewall/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/tether)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/exception)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/appstatus)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/firewall)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from plugin/monitor/include/stc-plugin-monitor.h
rename to plugin/monitor/stc-plugin-monitor.h
index be4b022..48c7dae 100644 (file)
@@ -14,8 +14,6 @@ FOREACH(flag ${pcap_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from plugin/pcap/include/stc-plugin-pcap.h
rename to plugin/pcap/stc-plugin-pcap.h
index 17ab7f2..6e529c1 100644 (file)
@@ -14,9 +14,8 @@ FOREACH(flag ${procfs_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/monitor/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/exception/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/monitor)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/exception)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from plugin/procfs/include/stc-plugin-procfs.h
rename to plugin/procfs/stc-plugin-procfs.h
index b64cfbd..7918d2e 100644 (file)
@@ -14,8 +14,7 @@ FOREACH(flag ${tether_plugin_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/monitor/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/plugin/monitor)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
similarity index 100%
rename from scripts/500.stc-manager_upgrade.sh
rename to res/500.stc-manager_upgrade.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from resources/dbus/net.stc-manager.service
rename to res/dbus/net.stc-manager.service
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from resources/dbus/stc-manager.conf
rename to res/dbus/stc-manager.conf
similarity index 100%
rename from data/exceptions
rename to res/exceptions
similarity index 100%
rename from data/firewall_db.sql
rename to res/firewall_db.sql
similarity index 100%
rename from data/traffic_db.sql
rename to res/traffic_db.sql
similarity index 100%
rename from unittest/CMakeLists.txt
rename to tests/CMakeLists.txt
similarity index 99%
rename from unittest/common.cpp
rename to tests/common.cpp
index 3fbaf8d..0f2b8d4 100644 (file)
@@ -63,4 +63,3 @@ void MainLoop::quit(void)
 {
        timeoutCb(NULL);
 }
-
similarity index 100%
rename from unittest/common.h
rename to tests/common.h
similarity index 99%
rename from unittest/firewall.cpp
rename to tests/firewall.cpp
index 0cf9521..43f32e2 100644 (file)
@@ -536,4 +536,3 @@ error_e Firewall::Lock()
 
        return ERROR_NONE;
 }
-
similarity index 100%
rename from unittest/firewall.h
rename to tests/firewall.h
similarity index 100%
rename from unittest/gdbus.cpp
rename to tests/gdbus.cpp
similarity index 100%
rename from unittest/gdbus.h
rename to tests/gdbus.h
similarity index 100%
rename from unittest/manager.cpp
rename to tests/manager.cpp
similarity index 100%
rename from unittest/manager.h
rename to tests/manager.h
similarity index 100%
rename from unittest/restriction.h
rename to tests/restriction.h
similarity index 99%
rename from unittest/statistics.cpp
rename to tests/statistics.cpp
index 6c80db1..de870c4 100644 (file)
@@ -153,7 +153,7 @@ void Statistics::MakeRuleParams(GVariant **params, int mode)
                break;
        case 3: /* get all */
        default:
-               *params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));            
+               *params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
                break;
        }
 
similarity index 100%
rename from unittest/statistics.h
rename to tests/statistics.h
similarity index 100%
rename from unittest/stcmgr.cpp
rename to tests/stcmgr.cpp
similarity index 100%
rename from unittest/stcmgr.h
rename to tests/stcmgr.h
similarity index 100%
rename from unittest/unittest.cpp
rename to tests/unittest.cpp
similarity index 100%
rename from unittest/unittest.h
rename to tests/unittest.h