[cleanup] chanage file names for readability 26/241926/1
authorYoungjae Shin <yj99.shin@samsung.com>
Fri, 21 Aug 2020 00:42:58 +0000 (09:42 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Fri, 21 Aug 2020 01:25:25 +0000 (10:25 +0900)
Change-Id: I90f348ca5c9f5e51e1cf32ba261b099358eb759b

107 files changed:
include/db/table-counters.h
include/db/table-firewall.h
include/db/table-restrictions.h
include/db/table-statistics.h
include/stc-counter.h [moved from include/counter.h with 100% similarity]
include/stc-db.h
include/stc-firewall.h
include/stc-gdbus.h [moved from include/stc-manager-gdbus.h with 99% similarity]
include/stc-pcap.h
include/stc-plugin-appstatus.h [moved from include/stc-manager-plugin-appstatus.h with 96% similarity]
include/stc-plugin-exception.h [moved from include/stc-manager-plugin-exception.h with 96% similarity]
include/stc-plugin-firewall.h [moved from include/stc-manager-plugin-firewall.h with 97% similarity]
include/stc-plugin-iface-appstatus.h [moved from plugin/appstatus/stc-plugin-appstatus.h with 97% similarity]
include/stc-plugin-iface-exception.h [moved from plugin/exception/stc-plugin-exception.h with 96% similarity]
include/stc-plugin-iface-firewall.h [moved from plugin/firewall/stc-plugin-firewall.h with 95% similarity]
include/stc-plugin-iface-monitor.h [moved from plugin/monitor/stc-plugin-monitor.h with 84% similarity]
include/stc-plugin-iface-pcap.h [moved from plugin/pcap/stc-plugin-pcap.h with 100% similarity]
include/stc-plugin-iface-procfs.h [moved from plugin/procfs/stc-plugin-procfs.h with 96% similarity]
include/stc-plugin-iface-tether.h [moved from plugin/tether/stc-plugin-tether.h with 97% similarity]
include/stc-plugin-monitor.h [moved from include/stc-manager-plugin-monitor.h with 96% similarity]
include/stc-plugin-pcap.h [moved from include/stc-manager-plugin-pcap.h with 97% similarity]
include/stc-plugin-procfs.h [moved from include/stc-manager-plugin-procfs.h with 96% similarity]
include/stc-plugin-tether.h [moved from include/stc-manager-plugin-tether.h with 96% similarity]
include/stc-restriction.h
include/stc-statistics.h
include/stc-transmission.h [moved from include/transmission.h with 100% similarity]
include/stc-util-inotify.h [moved from manager/helper/helper-inotify.h with 100% similarity]
include/stc-util.h [moved from include/stc-manager-util.h with 100% similarity]
include/stc.h [moved from include/stc-manager.h with 99% similarity]
manager/database/db-common.c
manager/database/db-guard.c
manager/database/table-counters.c
manager/database/table-firewall.c
manager/database/table-restrictions.c
manager/database/table-statistics.c
manager/helper/helper-cgroup.h
manager/helper/helper-file.h
manager/helper/helper-firewall.c
manager/helper/helper-firewall.h
manager/helper/helper-iptables.c
manager/helper/helper-iptables.h
manager/helper/helper-net-cls.c
manager/helper/helper-net-cls.h
manager/helper/helper-nfacct-rule.c
manager/helper/helper-nl.h
manager/helper/helper-procfs.c
manager/stcmgr-firewall.c [moved from manager/stc-firewall.c with 98% similarity]
manager/stcmgr-gdbus.c [moved from manager/stc-manager-gdbus.c with 98% similarity]
manager/stcmgr-pcap.c [moved from manager/stc-pcap.c with 99% similarity]
manager/stcmgr-plugin-appstatus.c [moved from manager/stc-manager-plugin-appstatus.c with 97% similarity]
manager/stcmgr-plugin-exception.c [moved from manager/stc-manager-plugin-exception.c with 97% similarity]
manager/stcmgr-plugin-firewall.c [moved from manager/stc-manager-plugin-firewall.c with 98% similarity]
manager/stcmgr-plugin-monitor.c [moved from manager/stc-manager-plugin-monitor.c with 98% similarity]
manager/stcmgr-plugin-pcap.c [moved from manager/stc-manager-plugin-pcap.c with 98% similarity]
manager/stcmgr-plugin-procfs.c [moved from manager/stc-manager-plugin-procfs.c with 97% similarity]
manager/stcmgr-plugin-tether.c [moved from manager/stc-manager-plugin-tether.c with 97% similarity]
manager/stcmgr-restriction.c [moved from manager/stc-restriction.c with 99% similarity]
manager/stcmgr-statistics.c [moved from manager/stc-statistics.c with 99% similarity]
manager/stcmgr.c [moved from manager/stc-manager.c with 93% similarity]
manager/util/stcutil-inotify.c [moved from manager/helper/helper-inotify.c with 98% similarity]
manager/util/stcutil.c [moved from manager/util/stc-manager-util.c with 99% similarity]
packaging/stc-manager.spec
plugin/appstatus/CMakeLists.txt
plugin/appstatus/stcplugin-appstatus.c [moved from plugin/appstatus/stc-plugin-appstatus.c with 99% similarity]
plugin/exception/CMakeLists.txt
plugin/exception/stcplugin-exception.c [moved from plugin/exception/stc-plugin-exception.c with 99% similarity]
plugin/firewall/CMakeLists.txt
plugin/firewall/stcplugin-firewall.c [moved from plugin/firewall/stc-plugin-firewall.c with 99% similarity]
plugin/monitor/CMakeLists.txt
plugin/monitor/stcplugin-monitor-app.c [moved from plugin/monitor/stc-plugin-monitor-app.c with 98% similarity]
plugin/monitor/stcplugin-monitor-app.h [moved from plugin/monitor/stc-plugin-monitor-app.h with 76% similarity]
plugin/monitor/stcplugin-monitor-connection.c [moved from plugin/monitor/stc-plugin-monitor-connection.c with 99% similarity]
plugin/monitor/stcplugin-monitor-connection.h [moved from plugin/monitor/stc-plugin-monitor-connection.h with 95% similarity]
plugin/monitor/stcplugin-monitor-context.h [moved from plugin/monitor/stc-plugin-monitor-context.h with 98% similarity]
plugin/monitor/stcplugin-monitor-ipt.c [moved from plugin/monitor/stc-plugin-monitor-ipt.c with 98% similarity]
plugin/monitor/stcplugin-monitor-ipt.h [moved from plugin/monitor/stc-plugin-monitor-ipt.h with 100% similarity]
plugin/monitor/stcplugin-monitor-proc.c [moved from plugin/monitor/stc-plugin-monitor-proc.c with 97% similarity]
plugin/monitor/stcplugin-monitor-proc.h [moved from plugin/monitor/stc-plugin-monitor-proc.h with 91% similarity]
plugin/monitor/stcplugin-monitor-rstn.c [moved from plugin/monitor/stc-plugin-monitor-rstn.c with 99% similarity]
plugin/monitor/stcplugin-monitor-rstn.h [moved from plugin/monitor/stc-plugin-monitor-rstn.h with 94% similarity]
plugin/monitor/stcplugin-monitor-time.c [moved from plugin/monitor/stc-plugin-monitor-time.c with 100% similarity]
plugin/monitor/stcplugin-monitor-time.h [moved from plugin/monitor/stc-plugin-monitor-time.h with 100% similarity]
plugin/monitor/stcplugin-monitor.c [moved from plugin/monitor/stc-plugin-monitor.c with 96% similarity]
plugin/pcap/CMakeLists.txt
plugin/pcap/stcplugin-pcap.c [moved from plugin/pcap/stc-plugin-pcap.c with 99% similarity]
plugin/pcap/stcplugin-pcap.h [moved from plugin/pcap/stc-plugin-pcap-internal.h with 99% similarity]
plugin/procfs/CMakeLists.txt
plugin/procfs/stcplugin-procfs.c [moved from plugin/procfs/stc-plugin-procfs.c with 99% similarity]
plugin/tether/CMakeLists.txt
plugin/tether/stcplugin-tether.c [moved from plugin/tether/stc-plugin-tether.c with 98% similarity]
res/dbus/net.stc.service [moved from res/dbus/net.stc-manager.service with 100% similarity]
tests/stcmgr.cpp [deleted file]
tests/stctest-common.cpp [moved from tests/common.cpp with 98% similarity]
tests/stctest-common.h [moved from tests/common.h with 100% similarity]
tests/stctest-firewall.cpp [moved from tests/firewall.cpp with 99% similarity]
tests/stctest-firewall.h [moved from tests/firewall.h with 98% similarity]
tests/stctest-gdbus.cpp [moved from tests/gdbus.cpp with 99% similarity]
tests/stctest-gdbus.h [moved from tests/gdbus.h with 99% similarity]
tests/stctest-main.cpp [moved from tests/unittest.cpp with 98% similarity]
tests/stctest-main.h [moved from tests/unittest.h with 100% similarity]
tests/stctest-manager.cpp [moved from tests/manager.cpp with 97% similarity]
tests/stctest-manager.h [moved from tests/manager.h with 94% similarity]
tests/stctest-restriction.cpp [moved from tests/restriction.cpp with 99% similarity]
tests/stctest-restriction.h [moved from tests/restriction.h with 97% similarity]
tests/stctest-statistics.cpp [moved from tests/statistics.cpp with 99% similarity]
tests/stctest-statistics.h [moved from tests/statistics.h with 97% similarity]
tests/stctest.h [moved from tests/stcmgr.h with 100% similarity]

index 41febcb..1faed2d 100644 (file)
 #ifndef __TABLE_COUNTERS_H__
 #define __TABLE_COUNTERS_H__
 
+#include <stdint.h>
+#include <sqlite3.h>
+#include "stc.h"
+
 typedef struct {
        long long int restriction_id;
        long long int data_counter;
index 70adca4..735320a 100644 (file)
@@ -18,6 +18,8 @@
 #define __TABLE_FIREWALL_H__
 
 #include <arpa/inet.h>
+#include <sqlite3.h>
+#include "stc-firewall.h"
 #include "helper-firewall.h"
 
 typedef stc_cb_ret_e
index 4f4528a..27493b7 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __TABLE_RESTRICTIONS_H__
 #define __TABLE_RESTRICTIONS_H__
 
+#include <sqlite3.h>
+
 typedef struct {
        char *app_id;
        char *ifname;
index a510f32..a5b6c0a 100644 (file)
@@ -17,6 +17,9 @@
 #ifndef __TABLE_STATISTICS_H__
 #define __TABLE_STATISTICS_H__
 
+#include "stc-db.h"
+#include <sqlite3.h>
+
 typedef struct {
        char *app_id;
        char *ifname;
similarity index 100%
rename from include/counter.h
rename to include/stc-counter.h
index e648d21..45c0610 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __STC_DB_H__
 #define __STC_DB_H__
 
-#include "stc-manager.h"
+#include "stc.h"
 
 #define MAX_DB_RETRY_COUNT 5
 #define MAX_USLEEP_TIMEOUT 500000
index 861dede..ee40f27 100644 (file)
@@ -18,8 +18,8 @@
 #define __STC_FIREWALL_H__
 
 #include <glib.h>
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
+#include "stc.h"
+#include "stc-gdbus.h"
 #include "table-firewall.h"
 
 /*****************************************************************************
similarity index 99%
rename from include/stc-manager-gdbus.h
rename to include/stc-gdbus.h
index b535ed2..141742c 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __STC_MANAGER_GDBUS_H__
 #define __STC_MANAGER_GDBUS_H__
 
-#include "stc-manager.h"
+#include "stc.h"
 #include "generated-code.h"
 
 #define STC_DBUS_SERVICE                   "net.stc"
index 1bd3d7e..c250181 100644 (file)
@@ -18,8 +18,8 @@
 #define __STC_PCAP_H__
 
 #include <glib.h>
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
+#include "stc.h"
+#include "stc-gdbus.h"
 
 /*****************************************************************************
  * Macros and Typedefs
similarity index 96%
rename from include/stc-manager-plugin-appstatus.h
rename to include/stc-plugin-appstatus.h
index 1140199..84753fc 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_APPSTATUS_FILEPATH          "/usr/lib/stc-plugin-appstatus.so"
 
-#include "stc-plugin-appstatus.h"
+#include "stc-plugin-iface-appstatus.h"
 
 int stc_plugin_appstatus_init(void);
 int stc_plugin_appstatus_deinit(void);
similarity index 96%
rename from include/stc-manager-plugin-exception.h
rename to include/stc-plugin-exception.h
index d826e3c..028c030 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_EXCEPTION_FILEPATH          "/usr/lib/stc-plugin-exception.so"
 
-#include "stc-plugin-exception.h"
+#include "stc-plugin-iface-exception.h"
 
 int stc_plugin_exception_init(void);
 int stc_plugin_exception_deinit(void);
similarity index 97%
rename from include/stc-manager-plugin-firewall.h
rename to include/stc-plugin-firewall.h
index 258abc5..b73e98a 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_FIREWALL_FILEPATH           "/usr/lib/stc-plugin-firewall.so"
 
-#include "stc-plugin-firewall.h"
+#include "stc-plugin-iface-firewall.h"
 
 int stc_plugin_firewall_init(void);
 int stc_plugin_firewall_deinit(void);
similarity index 97%
rename from plugin/appstatus/stc-plugin-appstatus.h
rename to include/stc-plugin-iface-appstatus.h
index 45025be..2d8703b 100644 (file)
@@ -18,8 +18,7 @@
 #define __STC_PLUGIN_APPSTATUS_H__
 
 #include <glib.h>
-#include "stc-error.h"
-#include "stc-manager.h"
+#include "stc.h"
 
 typedef stc_error_e (*stc_plugin_app_state_changed_cb)(stc_cmd_type_e cmd,
                                                       pid_t pid,
similarity index 96%
rename from plugin/exception/stc-plugin-exception.h
rename to include/stc-plugin-iface-exception.h
index 70e38e0..9bd0b27 100644 (file)
@@ -18,8 +18,7 @@
 #define __STC_PLUGIN_EXCEPTION_H__
 
 #include <glib.h>
-#include "stc-error.h"
-#include "stc-manager.h"
+#include "stc.h"
 
 typedef struct {
        int (*initialize_plugin) (void);
similarity index 95%
rename from plugin/firewall/stc-plugin-firewall.h
rename to include/stc-plugin-iface-firewall.h
index d9f9dc4..b7740e6 100644 (file)
@@ -26,9 +26,8 @@
 #include <signal.h>
 #include <errno.h>
 
-#include "stc-error.h"
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
+#include "stc.h"
+#include "stc-gdbus.h"
 
 typedef struct {
        stc_fw_chain_target_e target;
similarity index 84%
rename from plugin/monitor/stc-plugin-monitor.h
rename to include/stc-plugin-iface-monitor.h
index 0cc8c42..98cc8d5 100644 (file)
 #define __STC_PLUGIN_MONITOR_H__
 
 #include <glib.h>
-#include "stc-error.h"
-#include "stc-manager.h"
-#include "stc-manager-util.h"
-#include "stc-plugin-monitor-context.h"
-#include "stc-plugin-monitor-app.h"
-#include "stc-plugin-monitor-proc.h"
-#include "stc-plugin-monitor-rstn.h"
+#include "stc.h"
 #include "helper-nl.h"
+#include "db/table-restrictions.h"
 
 /* 1 seconds */
 #define CONTR_TIMER_INTERVAL 1
 #define VCONFKEY_SETAPPL_DATA_RESTRICTION_INT "db/setting/data_restriction"
 #endif
 
+#define MAC_ADDRESS_LEN 18
+
 typedef void (*stc_manager_stop_cb)(void);
 
 typedef struct {
+       uint32_t classid;  /**< classid for a package */
+       gchar *pkg_id;  /**< package id */
+       gchar *app_id;  /**< application id */
+       stc_app_type_e type;  /**< type of application */
+       stc_app_state_e state;
+       stc_data_counter_s data_usage;
+       stc_data_counter_s counter;
+       GHashTable *processes;  /**< applications instances */
+       char mac[MAC_ADDRESS_LEN + 1]; /**< application mac address */
+} stc_app_value_s;
+
+typedef struct {
+       pid_t pid;
+       stc_app_state_e ground;
+} stc_proc_value_s;
+
+typedef struct {
        int (*initialize_plugin) (stc_manager_stop_cb stop_cb);
        int (*deinitialize_plugin) (void);
 
similarity index 96%
rename from plugin/procfs/stc-plugin-procfs.h
rename to include/stc-plugin-iface-procfs.h
index 53635ca..0dc7f4b 100644 (file)
@@ -18,8 +18,7 @@
 #define __STC_PLUGIN_PROCFS_H__
 
 #include <glib.h>
-#include "stc-error.h"
-#include "stc-manager.h"
+#include "stc.h"
 
 typedef struct {
        int (*initialize_plugin) (void);
similarity index 97%
rename from plugin/tether/stc-plugin-tether.h
rename to include/stc-plugin-iface-tether.h
index f021516..d4dbcad 100644 (file)
@@ -19,8 +19,7 @@
 
 #include <glib.h>
 #include <arpa/inet.h>
-#include "stc-error.h"
-#include "stc-manager.h"
+#include "stc.h"
 
 #define TETHERING_SERVICE_INTERFACE   "org.tizen.tethering"
 #define SIGNAL_NAME_DHCP_STATUS       "dhcp_status"
similarity index 96%
rename from include/stc-manager-plugin-monitor.h
rename to include/stc-plugin-monitor.h
index 76a65bd..cb9257e 100644 (file)
@@ -19,7 +19,8 @@
 
 #define STC_PLUGIN_MONITOR_FILEPATH            "/usr/lib/stc-plugin-monitor.so"
 
-#include "stc-plugin-monitor.h"
+#include "db/table-restrictions.h"
+#include "stc-plugin-iface-monitor.h"
 
 int stc_plugin_monitor_init(stc_manager_stop_cb stop_cb);
 int stc_plugin_monitor_deinit(void);
similarity index 97%
rename from include/stc-manager-plugin-pcap.h
rename to include/stc-plugin-pcap.h
index 7c8fe7e..85ad9d6 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_PCAP_FILEPATH               "/usr/lib/stc-plugin-pcap.so"
 
-#include "stc-plugin-pcap.h"
+#include "stc-plugin-iface-pcap.h"
 
 int stc_plugin_pcap_init(void);
 int stc_plugin_pcap_deinit(void);
similarity index 96%
rename from include/stc-manager-plugin-procfs.h
rename to include/stc-plugin-procfs.h
index 9e7b565..8320852 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_PROCFS_FILEPATH             "/usr/lib/stc-plugin-procfs.so"
 
-#include "stc-plugin-procfs.h"
+#include "stc-plugin-iface-procfs.h"
 
 int stc_plugin_procfs_init(void);
 int stc_plugin_procfs_deinit(void);
similarity index 96%
rename from include/stc-manager-plugin-tether.h
rename to include/stc-plugin-tether.h
index 8fd874b..14bfb8c 100644 (file)
@@ -19,7 +19,7 @@
 
 #define STC_PLUGIN_TETHER_FILEPATH             "/usr/lib/stc-plugin-tether.so"
 
-#include "stc-plugin-tether.h"
+#include "stc-plugin-iface-tether.h"
 
 int stc_plugin_tether_init(void);
 int stc_plugin_tether_deinit(void);
index 1ee0255..63de665 100644 (file)
 #define __STC_RESTRICTION_H__
 
 #include <glib.h>
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
-#include "table-restrictions.h"
-#include "transmission.h"
+#include "stc.h"
+#include "stc-gdbus.h"
+#include "db/table-restrictions.h"
+#include "stc-transmission.h"
 
 /*****************************************************************************
  * Macros and Typedefs
index a76607e..d619faa 100644 (file)
@@ -18,8 +18,8 @@
 #define __STC_STATISTICS_H__
 
 #include <glib.h>
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
+#include "stc.h"
+#include "stc-gdbus.h"
 
 /*****************************************************************************
  * Macros and Typedefs
similarity index 99%
rename from include/stc-manager.h
rename to include/stc.h
index cfa2404..7d03d58 100644 (file)
@@ -18,7 +18,7 @@
 #define __STC_MANAGER_H__
 
 #include "stc-error.h"
-#include "stc-manager-util.h"
+#include "stc-util.h"
 
 #define NET_RELEASE_AGENT "/usr/bin/net-cls-release"
 #define NET_CLS_SUBSYS "net_cls"
index 3519710..f8c217d 100644 (file)
 #include <sys/stat.h>
 
 #include "stc-db.h"
+#include "db/table-statistics.h"
+#include "db/table-restrictions.h"
+#include "db/table-counters.h"
+#include "db/table-firewall.h"
 #include "db-internal.h"
-#include "table-statistics.h"
-#include "table-restrictions.h"
-#include "table-counters.h"
-#include "table-firewall.h"
 
 #define SQLITE_BUSY_TIMEOUT 500000
 
index 54b7fc5..43a4297 100644 (file)
@@ -18,7 +18,7 @@
 #include <sys/stat.h>
 
 #include "stc-db.h"
-#include "table-statistics.h"
+#include "db/table-statistics.h"
 
 #define VCONF_KEY_DB_ENTRIES_COUNT "db/stc-manager/datausage_timer"
 #define ENTRY_SIZE 128
index c4c0db1..e95fa68 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #include "stc-db.h"
+#include "db/table-counters.h"
 #include "db-internal.h"
-#include "table-counters.h"
 
 #define DELETE_COUNTER "DELETE FROM counters WHERE restriction_id=?"
 
index 995e8cd..1d82e2f 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #include "stc-db.h"
+#include "db/table-firewall.h"
 #include "db-internal.h"
-#include "table-firewall.h"
 
 #define BUF_SIZE_FOR_IP   64
 
index 1466a65..dd71443 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #include "stc-db.h"
+#include "db/table-restrictions.h"
 #include "db-internal.h"
-#include "table-restrictions.h"
 
 /* DELETE statements */
 #define DELETE_RESTRICTIONS "DELETE FROM restrictions " \
index 2bfff70..ab565d2 100644 (file)
@@ -20,8 +20,9 @@
  * @file        table-statistics.c
  */
 
+#include "stc.h"
 #include "stc-db.h"
-#include "table-statistics.h"
+#include "db/table-statistics.h"
 #include "db-internal.h"
 
 /* DELETE statements */
index 73abd40..94030a8 100644 (file)
@@ -25,7 +25,7 @@
 #include <sys/mount.h>
 #include <stdlib.h>
 
-#include "stc-manager.h"
+#include "stc.h"
 #include "helper-file.h"
 
 #define DEFAULT_CGROUP                  "/sys/fs/cgroup"
index b45a668..5a329dc 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 
-#include "stc-manager.h"
+#include "stc.h"
 
 /**
  * @desc write string to the file
index a9b0817..dc26e9e 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "stc-manager-gdbus.h"
+#include "stc-gdbus.h"
 #include "helper-firewall.h"
 
 #define STC_FIREWALL_DBUS_SERVICE                    "net.stc.iptables"
index 4966769..1c6b3e0 100644 (file)
@@ -19,8 +19,7 @@
 
 #include <arpa/inet.h>
 
-#include "stc-manager.h"
-#include "stc-error.h"
+#include "stc.h"
 
 #define FIREWALL_CHAIN_TARGET_IN     "INPUT"
 #define FIREWALL_CHAIN_TARGET_OUT    "OUTPUT"
index ffffd21..feaf9b3 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "stc-manager-gdbus.h"
+#include "stc-gdbus.h"
 #include "helper-iptables.h"
 
 #define STC_IPTABLES_DBUS_SERVICE                    "net.stc.iptables"
index f9f069a..b4bdb59 100644 (file)
@@ -18,8 +18,7 @@
 #define __STC_HELPER_IPTABLES_H__
 
 #include <arpa/inet.h>
-#include "stc-manager.h"
-#include "stc-error.h"
+#include "stc.h"
 
 #define STC_IN_CHAIN      "STC_IN"
 #define STC_OUT_CHAIN     "STC_OUT"
index 88041cc..6ae6bac 100644 (file)
@@ -21,7 +21,7 @@
 #include <unistd.h>
 
 #include "helper-cgroup.h"
-#include "counter.h"
+#include "stc-counter.h"
 #include "stc-db.h"
 #include "helper-file.h"
 #include "helper-net-cls.h"
index d27a5b2..58d3cfd 100644 (file)
@@ -21,7 +21,7 @@
 #include <glib.h>
 #include <stdbool.h>
 
-#include "stc-manager.h"
+#include "stc.h"
 
 #define PATH_TO_NET_CGROUP_DIR CGROUP_NETWORK
 
index 5694d14..109e385 100644 (file)
@@ -24,7 +24,7 @@
 #include <unistd.h>
 #include <arpa/inet.h>
 
-#include "counter.h"
+#include "stc-counter.h"
 #include "helper-nfacct-rule.h"
 #include "helper-iptables.h"
 
index 3df7da1..a34a589 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/genetlink.h>
 #include <linux/rtnetlink.h>
 
-#include "stc-manager.h"
+#include "stc.h"
 
 #define NLA_BUF_MAX 65560      /*(65 * 1024) - used in tc_common,
                                  we'll do the same */
index a0d9f0e..837e1d9 100644 (file)
@@ -34,8 +34,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include "stc-error.h"
-#include "stc-manager-util.h"
+#include "stc.h"
 #include "helper-procfs.h"
 
 #define USRAPPS "/usr/apps/"
similarity index 98%
rename from manager/stc-firewall.c
rename to manager/stcmgr-firewall.c
index c13d406..a29e17c 100644 (file)
  */
 
 #include "stc-db.h"
-#include "table-firewall.h"
-#include "helper-firewall.h"
 #include "stc-firewall.h"
-#include "stc-manager-gdbus.h"
-#include "stc-manager-plugin-firewall.h"
+#include "db/table-firewall.h"
+#include "helper-firewall.h"
+#include "stc-gdbus.h"
+#include "stc-plugin-firewall.h"
 
 #define FIREWALL_DBUS_ERROR_NAME "net.stc.firewall.Error.Failed"
 
similarity index 98%
rename from manager/stc-manager-gdbus.c
rename to manager/stcmgr-gdbus.c
index a5cb068..c564073 100644 (file)
  * limitations under the License.
  */
 
-#include "stc-manager-gdbus.h"
-#include "stc-manager.h"
+#include "stc.h"
+#include "stc-gdbus.h"
+#include "helper-iptables.h"
 #include "stc-statistics.h"
 #include "stc-restriction.h"
 #include "stc-firewall.h"
 #include "stc-pcap.h"
-#include "stc-manager-util.h"
-#include "stc-manager-plugin-appstatus.h"
-#include "stc-manager-plugin-procfs.h"
-#include "stc-manager-plugin-monitor.h"
-#include "stc-manager-plugin-firewall.h"
-#include "helper-iptables.h"
+#include "stc-plugin-appstatus.h"
+#include "stc-plugin-procfs.h"
+#include "stc-plugin-monitor.h"
+#include "stc-plugin-firewall.h"
 
 #define MANAGER_DBUS_ERROR_NAME "net.stc.manager.Error.Failed"
 
similarity index 99%
rename from manager/stc-pcap.c
rename to manager/stcmgr-pcap.c
index 29f5037..44de950 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "stc-db.h"
 #include "stc-pcap.h"
-#include "stc-manager-plugin-pcap.h"
+#include "stc-plugin-pcap.h"
 
 #define PCAP_DBUS_ERROR_NAME "net.stc.pcap.Error.Failed"
 
similarity index 97%
rename from manager/stc-manager-plugin-appstatus.c
rename to manager/stcmgr-plugin-appstatus.c
index a79bc93..48ac87a 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-appstatus.h"
+#include "stc.h"
+#include "stc-plugin-appstatus.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 97%
rename from manager/stc-manager-plugin-exception.c
rename to manager/stcmgr-plugin-exception.c
index ad1c092..3f8e3e1 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-exception.h"
+#include "stc.h"
+#include "stc-plugin-exception.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 98%
rename from manager/stc-manager-plugin-firewall.c
rename to manager/stcmgr-plugin-firewall.c
index adb87fb..026529e 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-firewall.h"
+#include "stc.h"
+#include "stc-plugin-firewall.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 98%
rename from manager/stc-manager-plugin-monitor.c
rename to manager/stcmgr-plugin-monitor.c
index efdf759..0ca5f48 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-monitor.h"
+#include "stc.h"
+#include "stc-plugin-monitor.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 98%
rename from manager/stc-manager-plugin-pcap.c
rename to manager/stcmgr-plugin-pcap.c
index 8134391..9c69c00 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-pcap.h"
+#include "stc.h"
+#include "stc-plugin-pcap.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 97%
rename from manager/stc-manager-plugin-procfs.c
rename to manager/stcmgr-plugin-procfs.c
index 1067f5e..0fab8bb 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-procfs.h"
+#include "stc.h"
+#include "stc-plugin-procfs.h"
 
 static gboolean stc_plugin_enabled = FALSE;
 static void *handle_plugin;
similarity index 97%
rename from manager/stc-manager-plugin-tether.c
rename to manager/stcmgr-plugin-tether.c
index 4c5e528..48d0609 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <dlfcn.h>
 
-#include "stc-manager.h"
-#include "stc-manager-plugin-tether.h"
+#include "stc.h"
+#include "stc-plugin-tether.h"
 
 static gboolean stc_tether_plugin_enabled = FALSE;
 static void *tether_plugin_handle;
similarity index 99%
rename from manager/stc-restriction.c
rename to manager/stcmgr-restriction.c
index 47bfee8..c8e8249 100644 (file)
  */
 
 #include "stc-db.h"
-#include "table-restrictions.h"
 #include "stc-restriction.h"
-#include "stc-manager-gdbus.h"
-#include "stc-manager-plugin-monitor.h"
+#include "db/table-restrictions.h"
+#include "stc-gdbus.h"
+#include "stc-plugin-monitor.h"
 
 #define RESTRICTION_DBUS_ERROR_NAME "net.stc.restriction.Error.Failed"
 
similarity index 99%
rename from manager/stc-statistics.c
rename to manager/stcmgr-statistics.c
index ee61443..7ebdda5 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 #include "stc-db.h"
-#include "table-statistics.h"
 #include "stc-statistics.h"
-#include "stc-manager-gdbus.h"
+#include "db/table-statistics.h"
+#include "stc-gdbus.h"
 
 #define STATISTICS_DBUS_ERROR_NAME "net.stc.statistics.Error.Failed"
 
similarity index 93%
rename from manager/stc-manager.c
rename to manager/stcmgr.c
index 0011c97..66bb119 100644 (file)
 #include <signal.h>
 #include <errno.h>
 #include <sys/wait.h>
-#include "stc-manager.h"
-#include "stc-manager-gdbus.h"
+#include "stc.h"
+#include "stc-gdbus.h"
 #include "stc-db.h"
-#include "counter.h"
-#include "table-restrictions.h"
+#include "stc-counter.h"
+#include "stc-util-inotify.h"
+#include "db/table-restrictions.h"
 #include "helper-cgroup.h"
 #include "helper-nfacct-rule.h"
 #include "helper-iptables.h"
-#include "helper-inotify.h"
 #include "stc-firewall.h"
-#include "stc-manager-plugin-appstatus.h"
-#include "stc-manager-plugin-exception.h"
-#include "stc-manager-plugin-procfs.h"
-#include "stc-manager-plugin-tether.h"
-#include "stc-manager-plugin-pcap.h"
-#include "stc-manager-plugin-monitor.h"
-#include "stc-manager-plugin-firewall.h"
+#include "stc-plugin-appstatus.h"
+#include "stc-plugin-exception.h"
+#include "stc-plugin-procfs.h"
+#include "stc-plugin-tether.h"
+#include "stc-plugin-pcap.h"
+#include "stc-plugin-monitor.h"
+#include "stc-plugin-firewall.h"
 
 #define BUF_SIZE_FOR_ERR 100
 
similarity index 98%
rename from manager/helper/helper-inotify.c
rename to manager/util/stcutil-inotify.c
index 1283cc6..d2a6d32 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <glib.h>
 
-#include "helper-inotify.h"
-#include "stc-manager-util.h"
+#include "stc-util.h"
+#include "stc-util-inotify.h"
 
 typedef struct {
        GIOChannel *channel;
similarity index 99%
rename from manager/util/stc-manager-util.c
rename to manager/util/stcutil.c
index 3e77610..1f608b2 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "stc-manager-util.h"
+#include "stc-util.h"
 
 typedef struct {
        int state;
index c19c312..5763874 100644 (file)
@@ -150,7 +150,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
 cp res/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-manager.conf
 
 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
-cp res/dbus/net.stc-manager.service %{buildroot}%{_datadir}/dbus-1/system-services/net.stc.service
+cp res/dbus/net.stc.service %{buildroot}%{_datadir}/dbus-1/system-services/net.stc.service
 
 #OS Upgrade
 mkdir -p %{buildroot}%{upgrade_script_path}
index 0a3acf7..30b45f3 100644 (file)
@@ -23,7 +23,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-appstatus.c
+       stcplugin-appstatus.c
        )
 
 # library build
similarity index 99%
rename from plugin/appstatus/stc-plugin-appstatus.c
rename to plugin/appstatus/stcplugin-appstatus.c
index 7036271..7aa77b2 100644 (file)
@@ -24,7 +24,7 @@
 #include <dlog.h>
 #include <gio/gio.h>
 
-#include "stc-plugin-appstatus.h"
+#include "stc-plugin-iface-appstatus.h"
 
 //LCOV_EXCL_START
 #define AUL_APP_STATUS_DBUS_PATH                   "/Org/Tizen/Aul/AppStatus"
index 06b6d93..734f587 100644 (file)
@@ -22,7 +22,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-exception.c
+       stcplugin-exception.c
        )
 
 # library build
similarity index 99%
rename from plugin/exception/stc-plugin-exception.c
rename to plugin/exception/stcplugin-exception.c
index ec4e2fd..578cfa7 100644 (file)
@@ -25,7 +25,8 @@
 #include <gio/gio.h>
 #include <pkgmgr-info.h>
 
-#include "stc-plugin-exception.h"
+#include "stc.h"
+#include "stc-plugin-iface-exception.h"
 
 //LCOV_EXCL_START
 #define EXE_TYPE_APPLICATION "app"
index 2576f2d..d09e512 100644 (file)
@@ -21,7 +21,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-firewall.c
+       stcplugin-firewall.c
        )
 
 # library build
similarity index 99%
rename from plugin/firewall/stc-plugin-firewall.c
rename to plugin/firewall/stcplugin-firewall.c
index 6a497cc..a108a76 100644 (file)
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-#include "stc-plugin-firewall.h"
-#include "table-firewall.h"
+#include "stc.h"
+#include "stc-plugin-iface-firewall.h"
+#include "db/table-firewall.h"
 #include "helper-firewall.h"
 
 #define LOCK_NAME          "admin"
index c05a448..ce792eb 100644 (file)
@@ -30,13 +30,13 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-monitor.c
-       stc-plugin-monitor-proc.c
-       stc-plugin-monitor-connection.c
-       stc-plugin-monitor-rstn.c
-       stc-plugin-monitor-app.c
-       stc-plugin-monitor-ipt.c
-       stc-plugin-monitor-time.c
+       stcplugin-monitor.c
+       stcplugin-monitor-proc.c
+       stcplugin-monitor-connection.c
+       stcplugin-monitor-rstn.c
+       stcplugin-monitor-app.c
+       stcplugin-monitor-ipt.c
+       stcplugin-monitor-time.c
        )
 
 # library build
similarity index 98%
rename from plugin/monitor/stc-plugin-monitor-app.c
rename to plugin/monitor/stcplugin-monitor-app.c
index 4b5703b..1c4d997 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stcplugin-monitor-app.h"
 
+#include "stc.h"
 #include "stc-db.h"
-#include "counter.h"
-#include "stc-manager.h"
-#include "stc-plugin-monitor.h"
-#include "stc-plugin-monitor-app.h"
-#include "stc-plugin-monitor-rstn.h"
-#include "stc-plugin-monitor-proc.h"
-#include "stc-plugin-monitor-ipt.h"
-#include "table-statistics.h"
+#include "stc-counter.h"
+#include "stc-plugin-tether.h"
+#include "db/table-statistics.h"
 #include "helper-net-cls.h"
-#include "stc-manager-plugin-tether.h"
+#include "stc-plugin-iface-monitor.h"
+#include "stcplugin-monitor-rstn.h"
+#include "stcplugin-monitor-proc.h"
+#include "stcplugin-monitor-ipt.h"
 
 static void __print_app(gpointer key, gpointer value,
                                          gpointer data)
similarity index 76%
rename from plugin/monitor/stc-plugin-monitor-app.h
rename to plugin/monitor/stcplugin-monitor-app.h
index cfd623f..81ac9b1 100644 (file)
 
 #include <glib.h>
 
-#include "stc-error.h"
-#include "stc-manager.h"
-#include "stc-plugin-monitor-context.h"
-#include "stc-plugin-monitor-connection.h"
+#include "stc.h"
+#include "stc-plugin-iface-monitor.h"
+#include "stcplugin-monitor-context.h"
+#include "stcplugin-monitor-connection.h"
 
-#define MAC_ADDRESS_LEN 18
 #define SUBSCRIBERID_NONE "none_subid"
 
-typedef struct {
-       uint32_t classid;  /**< classid for a package */
-       gchar *pkg_id;  /**< package id */
-       gchar *app_id;  /**< application id */
-       stc_app_type_e type;  /**< type of application */
-       stc_app_state_e state;
-       stc_data_counter_s data_usage;
-       stc_data_counter_s counter;
-       GHashTable *processes;  /**< applications instances */
-       char mac[MAC_ADDRESS_LEN+1]; /**< application mac address */
-} stc_app_value_s;
-
 
 stc_error_e stc_plugin_monitor_app_add(uint32_t classid,
                                const char *app_id,
 #include <vconf/vconf.h>
 #include <openssl/sha.h>
 
+#include "stc-gdbus.h"
 #include "stc-firewall.h"
-#include "stc-manager-gdbus.h"
+#include "stc-plugin-firewall.h"
 #include "stc-plugin-monitor.h"
-#include "stc-plugin-monitor-connection.h"
-#include "stc-manager-plugin-firewall.h"
+#include "stcplugin-monitor-connection.h"
 
 /* connman service dbus details */
 #define CONNMAN_SERVICE                          "net.connman"
@@ -18,9 +18,7 @@
 #define __STC_PLUGIN_MONITOR_CONNECTION_H__
 
 #include <glib.h>
-#include "stc-error.h"
-#include "stc-manager.h"
-#include "stc-manager-util.h"
+#include "stc.h"
 
 #define IMSI_LENGTH 16
 #define SHA256_DIGEST_LENGTH 32
similarity index 98%
rename from plugin/monitor/stc-plugin-monitor-context.h
rename to plugin/monitor/stcplugin-monitor-context.h
index 3e8f324..76c8f04 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __STC_PLUGIN_MONITOR_CONTEXT_H__
 #define __STC_PLUGIN_MONITOR_CONTEXT_H__
 
-#include "stc-manager.h"
+#include "stc.h"
 
 typedef struct {
        time_t now;
similarity index 98%
rename from plugin/monitor/stc-plugin-monitor-ipt.c
rename to plugin/monitor/stcplugin-monitor-ipt.c
index f9df3fb..d846ce7 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#include "stc-plugin-monitor-ipt.h"
-#include "stc-plugin-monitor-context.h"
+#include "stcplugin-monitor-ipt.h"
+#include "stcplugin-monitor-context.h"
 
 static nfacct_rule_jump __get_jump_by_intend(struct nfacct_rule *counter)
 {
similarity index 97%
rename from plugin/monitor/stc-plugin-monitor-proc.c
rename to plugin/monitor/stcplugin-monitor-proc.c
index b4564c0..7545c48 100644 (file)
  * limitations under the License.
  */
 
-#include "stc-plugin-monitor.h"
-#include "stc-plugin-monitor-proc.h"
-#include "stc-plugin-monitor-connection.h"
 #include "helper-net-cls.h"
+#include "db/table-restrictions.h"
+#include "stc-plugin-iface-monitor.h"
+#include "stcplugin-monitor-proc.h"
+#include "stcplugin-monitor-app.h"
+#include "stcplugin-monitor-rstn.h"
+#include "stcplugin-monitor-connection.h"
 
 static void __print_proc(gpointer key, gpointer value,
                                gpointer data)
similarity index 91%
rename from plugin/monitor/stc-plugin-monitor-proc.h
rename to plugin/monitor/stcplugin-monitor-proc.h
index 22bb06a..8ce67e6 100644 (file)
 
 #include <glib.h>
 
-#include "stc-error.h"
-#include "stc-manager.h"
-
-typedef struct {
-       pid_t pid;
-       stc_app_state_e ground;
-} stc_proc_value_s;
+#include "stc.h"
+#include "stc-plugin-iface-monitor.h"
 
 typedef struct {
        pid_t pid;
similarity index 99%
rename from plugin/monitor/stc-plugin-monitor-rstn.c
rename to plugin/monitor/stcplugin-monitor-rstn.c
index 5398c1d..a5092c6 100644 (file)
 #include <bundle_internal.h>
 #include <syspopup_caller.h>
 
-#include "counter.h"
-#include "stc-plugin-monitor.h"
-#include "stc-plugin-monitor-rstn.h"
-#include "stc-plugin-monitor-ipt.h"
-#include "stc-plugin-monitor-time.h"
-#include "table-counters.h"
-#include "table-restrictions.h"
-#include "table-statistics.h"
+#include "stc-counter.h"
+#include "stc-plugin-tether.h"
+#include "db/table-counters.h"
+#include "db/table-restrictions.h"
+#include "db/table-statistics.h"
 #include "helper-net-cls.h"
-#include "stc-manager-plugin-tether.h"
+#include "stc-plugin-iface-monitor.h"
+#include "stcplugin-monitor-rstn.h"
+#include "stcplugin-monitor-ipt.h"
+#include "stcplugin-monitor-time.h"
 
 static void __print_rstn(stc_rstn_data_s *rstn_data)
 {
similarity index 94%
rename from plugin/monitor/stc-plugin-monitor-rstn.h
rename to plugin/monitor/stcplugin-monitor-rstn.h
index 41b1e80..24f41a6 100644 (file)
 
 #include <glib.h>
 
-#include "stc-error.h"
-#include "stc-manager.h"
-#include "stc-plugin-monitor-context.h"
-#include "stc-plugin-monitor-connection.h"
+#include "stc.h"
 #include "stc-restriction.h"
-#include "table-restrictions.h"
+#include "db/table-restrictions.h"
+#include "stcplugin-monitor-context.h"
+#include "stcplugin-monitor-connection.h"
 
 #define GRANULARITY 10
 
similarity index 96%
rename from plugin/monitor/stc-plugin-monitor.c
rename to plugin/monitor/stcplugin-monitor.c
index 7922b88..c301683 100644 (file)
 #include <vconf.h>
 #include <vconf-keys.h>
 
+#include "stc-counter.h"
 #include "helper-nl.h"
 #include "helper-nfacct-rule.h"
 #include "helper-net-cls.h"
 #include "helper-cgroup.h"
 #include "helper-iptables.h"
-#include "counter.h"
-#include "table-statistics.h"
-#include "table-counters.h"
-#include "stc-plugin-monitor.h"
-#include "stc-plugin-monitor-connection.h"
-#include "stc-plugin-monitor-rstn.h"
-#include "stc-manager-plugin-exception.h"
+#include "db/table-statistics.h"
+#include "db/table-counters.h"
+#include "stc-plugin-exception.h"
+#include "stc-plugin-iface-monitor.h"
+#include "stcplugin-monitor-connection.h"
+#include "stcplugin-monitor-rstn.h"
+#include "stcplugin-monitor-context.h"
+#include "stcplugin-monitor-app.h"
+#include "stcplugin-monitor-proc.h"
+
 
 static stc_system_s *g_system = NULL;
 static stc_manager_stop_cb g_stop_cb = NULL;
@@ -589,10 +593,10 @@ API stc_plugin_monitor_s stc_plugin_monitor = {
                stc_plugin_monitor_deinitialize,
        .add_application =
                stc_plugin_monitor_app_add,
-       .remove_application =
-               stc_plugin_monitor_app_remove,
-       .lookup_application =
-               stc_plugin_monitor_app_lookup,
+       .remove_application =
+               stc_plugin_monitor_app_remove,
+       .lookup_application =
+               stc_plugin_monitor_app_lookup,
        .add_restriction =
                stc_plugin_monitor_rstn_add,
        .remove_restriction =
index 48c7dae..d388170 100644 (file)
@@ -21,7 +21,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-pcap.c
+       stcplugin-pcap.c
        )
 
 # library build
similarity index 99%
rename from plugin/pcap/stc-plugin-pcap.c
rename to plugin/pcap/stcplugin-pcap.c
index 018254c..13f5941 100644 (file)
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stcplugin-pcap.h"
 
-#include "stc-plugin-pcap.h"
-#include "stc-plugin-pcap-internal.h"
+#include "stc-plugin-iface-pcap.h"
 
 #define ENCAPTYPE_ETHERNET  1
 #define ENCAPTYPE_NFLOG     141
similarity index 99%
rename from plugin/pcap/stc-plugin-pcap-internal.h
rename to plugin/pcap/stcplugin-pcap.h
index 2817613..0742b61 100644 (file)
@@ -37,8 +37,7 @@
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 
-#include "stc-error.h"
-#include "stc-manager.h"
+#include "stc.h"
 
 #define BUFF_SIZE_IP        16
 #define BUFF_SIZE_IP6       46
index 6e529c1..c61b895 100644 (file)
@@ -24,7 +24,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-procfs.c
+       stcplugin-procfs.c
        )
 
 # library build
similarity index 99%
rename from plugin/procfs/stc-plugin-procfs.c
rename to plugin/procfs/stcplugin-procfs.c
index f54794a..f1255d0 100644 (file)
 #include <linux/cn_proc.h>
 #include <glib.h>
 
-#include "stc-plugin-procfs.h"
+#include "stc-plugin-iface-procfs.h"
 #include "helper-net-cls.h"
 #include "helper-procfs.h"
-#include "stc-manager-plugin-monitor.h"
-#include "stc-manager-plugin-exception.h"
+#include "stc-plugin-monitor.h"
+#include "stc-plugin-exception.h"
 
 //LCOV_EXCL_START
 typedef struct {
index 7918d2e..52d8970 100644 (file)
@@ -23,7 +23,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 ADD_DEFINITIONS("-DUSE_DLOG")
 
 SET(SRCS_PLUGIN
-       stc-plugin-tether.c
+       stcplugin-tether.c
        )
 
 # library build
similarity index 98%
rename from plugin/tether/stc-plugin-tether.c
rename to plugin/tether/stcplugin-tether.c
index 4b1e0b8..87e35c1 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include <vconf/vconf.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <string.h>
@@ -23,8 +22,9 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "stc-plugin-tether.h"
-#include "stc-manager-plugin-monitor.h"
+#include "stc.h"
+#include "stc-plugin-monitor.h"
+#include "stc-plugin-iface-tether.h"
 
 static GSList *station_list = NULL;
 static GDBusConnection *connection = NULL;
diff --git a/tests/stcmgr.cpp b/tests/stcmgr.cpp
deleted file mode 100644 (file)
index c3f401f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "stcmgr.h"
similarity index 98%
rename from tests/common.cpp
rename to tests/stctest-common.cpp
index 0f2b8d4..a663897 100644 (file)
@@ -13,8 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-#include "common.h"
+#include "stctest-common.h"
 
 GMainLoop *MainLoop::m_mainLoop = NULL;
 guint MainLoop::m_timerId = 0;
similarity index 100%
rename from tests/common.h
rename to tests/stctest-common.h
similarity index 99%
rename from tests/firewall.cpp
rename to tests/stctest-firewall.cpp
index 43f32e2..f99f86a 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-firewall.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <iostream>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
-
-#include "firewall.h"
-#include "common.h"
+#include "stctest-common.h"
 
 static void AsyncReadyCallback(GObject *source_object,
        GAsyncResult *res, gpointer user_data)
similarity index 98%
rename from tests/firewall.h
rename to tests/stctest-firewall.h
index f52e10b..b1e8fe2 100644 (file)
@@ -19,8 +19,8 @@
 #include <glib.h>
 #include <gio/gio.h>
 
-#include "stcmgr.h"
-#include "gdbus.h"
+#include "stctest.h"
+#include "stctest-gdbus.h"
 
 #define FIREWALL_RULE_CHAIN      "chain"
 #define FIREWALL_RULE_DIRECTION  "direction"
similarity index 99%
rename from tests/gdbus.cpp
rename to tests/stctest-gdbus.cpp
index e882fea..05f6620 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-gdbus.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,8 +21,6 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "gdbus.h"
-
 GDbus::GDbus()
 {
        this->m_pConnection = NULL;
similarity index 99%
rename from tests/gdbus.h
rename to tests/stctest-gdbus.h
index f545629..f0089a0 100644 (file)
@@ -19,7 +19,7 @@
 #include <glib.h>
 #include <gio/gio.h>
 
-#include "stcmgr.h"
+#include "stctest.h"
 
 #define GMAINTIMEOUT 10000
 #define DBUS_REPLY_TIMEOUT (120 * 1000)
similarity index 98%
rename from tests/unittest.cpp
rename to tests/stctest-main.cpp
index 41d57c4..c713126 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-main.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <unistd.h>
-
-#include "unittest.h"
-#include "restriction.h"
-#include "statistics.h"
-#include "manager.h"
-#include "stc-manager.h"
-#include "firewall.h"
+#include "stc.h"
+#include "stctest-restriction.h"
+#include "stctest-statistics.h"
+#include "stctest-manager.h"
+#include "stctest-firewall.h"
 
 #define GTEST_MAC "1:c:e:b:00:da"
 
similarity index 100%
rename from tests/unittest.h
rename to tests/stctest-main.h
similarity index 97%
rename from tests/manager.cpp
rename to tests/stctest-manager.cpp
index a99149c..69fda53 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-manager.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,8 +21,6 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "manager.h"
-
 Manager::Manager()
 {
        Create();
similarity index 94%
rename from tests/manager.h
rename to tests/stctest-manager.h
index 61b31ca..02eb323 100644 (file)
@@ -16,8 +16,8 @@
 #ifndef __STC_MGR_MANAGER_H__
 #define __STC_MGR_MANAGER_H__
 
-#include "stcmgr.h"
-#include "gdbus.h"
+#include "stctest.h"
+#include "stctest-gdbus.h"
 
 class Manager : public GDbus {
 private:
similarity index 99%
rename from tests/restriction.cpp
rename to tests/stctest-restriction.cpp
index 9a3bb4b..aee684f 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-restriction.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <iostream>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
-
-#include "restriction.h"
-#include "common.h"
+#include "stctest-common.h"
 
 static void AsyncReadyCallback(GObject *source_object,
        GAsyncResult *res, gpointer user_data)
similarity index 97%
rename from tests/restriction.h
rename to tests/stctest-restriction.h
index 06cbf2c..0adc768 100644 (file)
@@ -19,8 +19,8 @@
 #include <glib.h>
 #include <gio/gio.h>
 
-#include "stcmgr.h"
-#include "gdbus.h"
+#include "stctest.h"
+#include "stctest-gdbus.h"
 
 #define RESTRICTION_RULE_APP_ID             "app_id"
 #define RESTRICTION_RULE_IFNAME             "ifname"
similarity index 99%
rename from tests/statistics.cpp
rename to tests/stctest-statistics.cpp
index de870c4..41bd95c 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "stctest-statistics.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,8 +21,7 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "statistics.h"
-#include "common.h"
+#include "stctest-common.h"
 
 static void AsyncReadyCallback(GObject *source_object,
        GAsyncResult *res, gpointer user_data)
similarity index 97%
rename from tests/statistics.h
rename to tests/stctest-statistics.h
index 5f3ebcc..42f34a3 100644 (file)
@@ -16,8 +16,8 @@
 #ifndef __STC_MGR_STATISTICS_H__
 #define __STC_MGR_STATISTICS_H__
 
-#include "stcmgr.h"
-#include "gdbus.h"
+#include "stctest.h"
+#include "stctest-gdbus.h"
 
 #define STATISTICS_RULE_APP_ID           "app_id"
 #define STATISTICS_RULE_INTERVAL_FROM    "from"
similarity index 100%
rename from tests/stcmgr.h
rename to tests/stctest.h