From ecc26c6f221bf02e81c21de0dc07ca37a0860972 Mon Sep 17 00:00:00 2001 From: Kaian Date: Mon, 24 Jun 2019 11:56:19 +0200 Subject: [PATCH] storage: move storage files to a new dir --- CMakeLists.txt | 24 ++++++++++++------------ src/capture/capture.c | 2 +- src/capture/capture_hep.c | 2 +- src/capture/capture_pcap.c | 6 +++--- src/capture/capture_txt.c | 2 +- src/capture/dissectors/packet_rtcp.c | 2 +- src/capture/dissectors/packet_rtp.c | 2 +- src/capture/dissectors/packet_sip.c | 2 +- src/ncurses/manager.h | 4 ++-- src/ncurses/windows/auth_validate_win.h | 2 +- src/ncurses/windows/call_flow_win.h | 2 +- src/ncurses/windows/call_list_win.c | 2 +- src/ncurses/windows/call_raw_win.h | 4 ++-- src/ncurses/windows/column_select_win.h | 2 +- src/ncurses/windows/filter_win.c | 4 ++-- src/ncurses/windows/rtp_player_win.h | 2 +- src/ncurses/windows/save_win.c | 2 +- src/ncurses/windows/save_win.h | 2 +- src/ncurses/windows/stats_win.c | 2 +- src/setting.c | 2 +- src/setting.h | 2 +- src/{ => storage}/attribute.c | 0 src/{ => storage}/attribute.h | 0 src/{ => storage}/call.c | 2 +- src/{ => storage}/call.h | 2 +- src/{ => storage}/filter.c | 2 +- src/{ => storage}/filter.h | 2 +- src/{ => storage}/group.c | 0 src/{ => storage}/group.h | 2 +- src/{ => storage}/message.c | 2 +- src/{ => storage}/message.h | 2 +- src/{ => storage}/storage.c | 0 src/{ => storage}/storage.h | 0 src/{ => storage}/stream.c | 2 +- src/{ => storage}/stream.h | 2 +- src/{ => storage}/timeval.c | 0 src/{ => storage}/timeval.h | 0 37 files changed, 46 insertions(+), 46 deletions(-) rename src/{ => storage}/attribute.c (100%) rename src/{ => storage}/attribute.h (100%) rename src/{ => storage}/call.c (99%) rename src/{ => storage}/call.h (99%) rename src/{ => storage}/filter.c (99%) rename src/{ => storage}/filter.h (99%) rename src/{ => storage}/group.c (100%) rename src/{ => storage}/group.h (99%) rename src/{ => storage}/message.c (99%) rename src/{ => storage}/message.h (99%) rename src/{ => storage}/storage.c (100%) rename src/{ => storage}/storage.h (100%) rename src/{ => storage}/stream.c (99%) rename src/{ => storage}/stream.h (99%) rename src/{ => storage}/timeval.c (100%) rename src/{ => storage}/timeval.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a96f5d..ea7e8c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ set(SOURCES src/capture/capture.c src/capture/capture_pcap.c src/capture/capture_txt.c + src/glib/gasyncqueuesource.c + src/glib/glib-extra.c src/ncurses/manager.c src/ncurses/windows/call_flow_win.c src/ncurses/windows/call_list_win.c @@ -56,19 +58,17 @@ set(SOURCES src/ncurses/dialog.c src/ncurses/keybinding.c src/ncurses/scrollbar.c - src/glib/gasyncqueuesource.c - src/filter.c - src/group.c - src/main.c - src/stream.c + src/storage/filter.c + src/storage/group.c + src/storage/stream.c + src/storage/attribute.c + src/storage/storage.c + src/storage/call.c + src/storage/message.c + src/storage/timeval.c src/setting.c - src/attribute.c - src/storage.c - src/call.c - src/message.c - src/timeval.c - src/glib/glib-extra.c - ) + src/main.c +) ###################################################################### # HEP Support diff --git a/src/capture/capture.c b/src/capture/capture.c index 11e9aae..af4b5eb 100644 --- a/src/capture/capture.c +++ b/src/capture/capture.c @@ -31,7 +31,7 @@ #include #include "glib/gasyncqueuesource.h" #include "setting.h" -#include "storage.h" +#include "storage/storage.h" #include "capture.h" static CaptureManager *manager = NULL; diff --git a/src/capture/capture_hep.c b/src/capture/capture_hep.c index e850cf3..8f0ab1a 100644 --- a/src/capture/capture_hep.c +++ b/src/capture/capture_hep.c @@ -48,7 +48,7 @@ #include #include #include -#include "timeval.h" +#include "storage/timeval.h" #include "setting.h" #include "glib/glib-extra.h" #include "capture/dissectors/packet_hep.h" diff --git a/src/capture/capture_pcap.c b/src/capture/capture_pcap.c index c4206a3..10dee82 100644 --- a/src/capture/capture_pcap.c +++ b/src/capture/capture_pcap.c @@ -41,10 +41,10 @@ #include "capture_hep.h" #include "capture_pcap.h" #include "capture/dissectors/packet_link.h" -#include "storage.h" -#include "stream.h" +#include "storage/storage.h" +#include "storage/stream.h" #include "setting.h" -#include "timeval.h" +#include "storage/timeval.h" GQuark capture_pcap_error_quark() diff --git a/src/capture/capture_txt.c b/src/capture/capture_txt.c index b2d2231..e215554 100644 --- a/src/capture/capture_txt.c +++ b/src/capture/capture_txt.c @@ -32,7 +32,7 @@ #include #include #include -#include "timeval.h" +#include "storage/timeval.h" #include "packet.h" #include "capture/dissectors/packet_sip.h" #include "capture/capture_txt.h" diff --git a/src/capture/dissectors/packet_rtcp.c b/src/capture/dissectors/packet_rtcp.c index 87029a6..a8cb17e 100644 --- a/src/capture/dissectors/packet_rtcp.c +++ b/src/capture/dissectors/packet_rtcp.c @@ -29,7 +29,7 @@ #include "config.h" #include #include "glib/glib-extra.h" -#include "storage.h" +#include "storage/storage.h" #include "capture/parser.h" #include "capture/packet.h" #include "packet_ip.h" diff --git a/src/capture/dissectors/packet_rtp.c b/src/capture/dissectors/packet_rtp.c index f4b3b47..9423f16 100644 --- a/src/capture/dissectors/packet_rtp.c +++ b/src/capture/dissectors/packet_rtp.c @@ -32,7 +32,7 @@ #include "config.h" #include #include "glib/glib-extra.h" -#include "storage.h" +#include "storage/storage.h" #include "capture/parser.h" #include "capture/packet.h" #include "packet_ip.h" diff --git a/src/capture/dissectors/packet_sip.c b/src/capture/dissectors/packet_sip.c index 968a4cf..4524594 100644 --- a/src/capture/dissectors/packet_sip.c +++ b/src/capture/dissectors/packet_sip.c @@ -29,7 +29,7 @@ #include "config.h" #include #include "glib/glib-extra.h" -#include "storage.h" +#include "storage/storage.h" #include "capture/packet.h" #include "packet_tcp.h" #include "packet_sdp.h" diff --git a/src/ncurses/manager.h b/src/ncurses/manager.h index 0535c02..ee5e46b 100644 --- a/src/ncurses/manager.h +++ b/src/ncurses/manager.h @@ -40,8 +40,8 @@ #include "ncurses/window.h" #include "ncurses/theme.h" #include "ncurses/keybinding.h" -#include "storage.h" -#include "group.h" +#include "storage/storage.h" +#include "storage/group.h" #include "setting.h" //! Refresh UI every 200 ms diff --git a/src/ncurses/windows/auth_validate_win.h b/src/ncurses/windows/auth_validate_win.h index 84ec253..d453abe 100644 --- a/src/ncurses/windows/auth_validate_win.h +++ b/src/ncurses/windows/auth_validate_win.h @@ -35,7 +35,7 @@ #include "config.h" #include -#include "group.h" +#include "storage/group.h" #include "ncurses/manager.h" /** diff --git a/src/ncurses/windows/call_flow_win.h b/src/ncurses/windows/call_flow_win.h index 276bda6..769eb70 100644 --- a/src/ncurses/windows/call_flow_win.h +++ b/src/ncurses/windows/call_flow_win.h @@ -58,7 +58,7 @@ #include #include "ncurses/manager.h" #include "ncurses/scrollbar.h" -#include "group.h" +#include "storage/group.h" //! Configurable some day #define CF_COLUMN_WIDTH 30 diff --git a/src/ncurses/windows/call_list_win.c b/src/ncurses/windows/call_list_win.c index 9b91d3a..d02b690 100644 --- a/src/ncurses/windows/call_list_win.c +++ b/src/ncurses/windows/call_list_win.c @@ -31,7 +31,7 @@ #include #include "glib/glib-extra.h" #include "setting.h" -#include "filter.h" +#include "storage/filter.h" #ifdef USE_HEP #include "capture/capture_hep.h" #endif diff --git a/src/ncurses/windows/call_raw_win.h b/src/ncurses/windows/call_raw_win.h index 054af37..789c9a7 100644 --- a/src/ncurses/windows/call_raw_win.h +++ b/src/ncurses/windows/call_raw_win.h @@ -33,8 +33,8 @@ #define __SNGREP_CALL_RAW_WIN_H #include "config.h" -#include "group.h" -#include "message.h" +#include "storage/group.h" +#include "storage/message.h" #include "ncurses/manager.h" //! Sorter declaration of struct call_raw_info diff --git a/src/ncurses/windows/column_select_win.h b/src/ncurses/windows/column_select_win.h index 6706e11..4facf27 100644 --- a/src/ncurses/windows/column_select_win.h +++ b/src/ncurses/windows/column_select_win.h @@ -34,7 +34,7 @@ #include #include "ncurses/manager.h" #include "ncurses/scrollbar.h" -#include "attribute.h" +#include "storage/attribute.h" /** * @brief Enum of available fields diff --git a/src/ncurses/windows/filter_win.c b/src/ncurses/windows/filter_win.c index b497c0e..f461317 100644 --- a/src/ncurses/windows/filter_win.c +++ b/src/ncurses/windows/filter_win.c @@ -34,8 +34,8 @@ #include "ncurses/manager.h" #include "filter_win.h" #include "call_list_win.h" -#include "storage.h" -#include "filter.h" +#include "storage/storage.h" +#include "storage/filter.h" #include "setting.h" /** diff --git a/src/ncurses/windows/rtp_player_win.h b/src/ncurses/windows/rtp_player_win.h index 9c42b61..c9bf3c9 100644 --- a/src/ncurses/windows/rtp_player_win.h +++ b/src/ncurses/windows/rtp_player_win.h @@ -25,7 +25,7 @@ #include #include #include "ncurses/manager.h" -#include "stream.h" +#include "storage/stream.h" typedef struct _RtpPlayerInfo RtpPlayerInfo; diff --git a/src/ncurses/windows/save_win.c b/src/ncurses/windows/save_win.c index 452f1d3..cdf573f 100644 --- a/src/ncurses/windows/save_win.c +++ b/src/ncurses/windows/save_win.c @@ -41,7 +41,7 @@ #include "capture/codecs/codec_g711a.h" #include "glib/glib-extra.h" #include "setting.h" -#include "filter.h" +#include "storage/filter.h" #include "capture/capture_txt.h" #include "ncurses/dialog.h" #include "ncurses/windows/save_win.h" diff --git a/src/ncurses/windows/save_win.h b/src/ncurses/windows/save_win.h index 8a59e81..ea8c8f7 100644 --- a/src/ncurses/windows/save_win.h +++ b/src/ncurses/windows/save_win.h @@ -35,7 +35,7 @@ #include "config.h" #include -#include "group.h" +#include "storage/group.h" #include "ncurses/manager.h" /** diff --git a/src/ncurses/windows/stats_win.c b/src/ncurses/windows/stats_win.c index ac173f9..1f899e7 100644 --- a/src/ncurses/windows/stats_win.c +++ b/src/ncurses/windows/stats_win.c @@ -56,7 +56,7 @@ #include "config.h" #include #include "glib/glib-extra.h" -#include "storage.h" +#include "storage/storage.h" #include "capture/dissectors/packet_sip.h" #include "stats_win.h" diff --git a/src/setting.c b/src/setting.c index 5fda840..0047ae4 100644 --- a/src/setting.c +++ b/src/setting.c @@ -34,7 +34,7 @@ #include "ncurses/keybinding.h" #include "glib/glib-extra.h" #include "setting.h" -#include "timeval.h" +#include "storage/timeval.h" /** * @brief Storage settings diff --git a/src/setting.h b/src/setting.h index 7caf5e6..55e2cee 100644 --- a/src/setting.h +++ b/src/setting.h @@ -43,7 +43,7 @@ #define __SNGREP_SETTING_H #include -#include "attribute.h" +#include "storage/attribute.h" //! Max setting value #define SETTING_MAX_LEN 1024 diff --git a/src/attribute.c b/src/storage/attribute.c similarity index 100% rename from src/attribute.c rename to src/storage/attribute.c diff --git a/src/attribute.h b/src/storage/attribute.h similarity index 100% rename from src/attribute.h rename to src/storage/attribute.h diff --git a/src/call.c b/src/storage/call.c similarity index 99% rename from src/call.c rename to src/storage/call.c index 7dd2c0d..69e4e01 100644 --- a/src/call.c +++ b/src/storage/call.c @@ -33,7 +33,7 @@ #include "glib/glib-extra.h" #include "call.h" #include "capture/dissectors/packet_sip.h" -#include "storage.h" +#include "storage/storage.h" #include "setting.h" Call * diff --git a/src/call.h b/src/storage/call.h similarity index 99% rename from src/call.h rename to src/storage/call.h index 860f7c9..6fa0282 100644 --- a/src/call.h +++ b/src/storage/call.h @@ -32,7 +32,7 @@ #include #include "stream.h" #include "message.h" -#include "attribute.h" +#include "storage/attribute.h" //! Shorter declaration of sip_call structure typedef struct _Call Call; diff --git a/src/filter.c b/src/storage/filter.c similarity index 99% rename from src/filter.c rename to src/storage/filter.c index 49a0dc4..29126af 100644 --- a/src/filter.c +++ b/src/storage/filter.c @@ -30,7 +30,7 @@ #include #include #include "glib/glib-extra.h" -#include "storage.h" +#include "storage/storage.h" #include "ncurses/windows/call_list_win.h" #include "filter.h" diff --git a/src/filter.h b/src/storage/filter.h similarity index 99% rename from src/filter.h rename to src/storage/filter.h index ae83646..32d22ad 100644 --- a/src/filter.h +++ b/src/storage/filter.h @@ -41,7 +41,7 @@ #define __SNGREP_FILTER_H #include -#include "storage.h" +#include "storage/storage.h" //! Shorter declaration of sip_call_group structure typedef struct _Filter Filter; diff --git a/src/group.c b/src/storage/group.c similarity index 100% rename from src/group.c rename to src/storage/group.c diff --git a/src/group.h b/src/storage/group.h similarity index 99% rename from src/group.h rename to src/storage/group.h index b907964..5694ada 100644 --- a/src/group.h +++ b/src/storage/group.h @@ -34,7 +34,7 @@ #define __SNGREP_GROUP_H_ #include -#include "storage.h" +#include "storage/storage.h" //! Shorter declaration of sip_call_group structure typedef struct _SipCallGroup CallGroup; diff --git a/src/message.c b/src/storage/message.c similarity index 99% rename from src/message.c rename to src/storage/message.c index 3186774..4173b9c 100644 --- a/src/message.c +++ b/src/storage/message.c @@ -34,7 +34,7 @@ #include "message.h" #include "capture/dissectors/packet_sip.h" #include "capture/dissectors/packet_sdp.h" -#include "storage.h" +#include "storage/storage.h" Message * msg_new(Packet *packet) diff --git a/src/message.h b/src/storage/message.h similarity index 99% rename from src/message.h rename to src/storage/message.h index dd077c9..f3f1ac9 100644 --- a/src/message.h +++ b/src/storage/message.h @@ -32,7 +32,7 @@ #include #include "capture/dissectors/packet_sdp.h" #include "capture/packet.h" -#include "attribute.h" +#include "storage/attribute.h" #include "timeval.h" //! Get IP Address info from message's packet diff --git a/src/storage.c b/src/storage/storage.c similarity index 100% rename from src/storage.c rename to src/storage/storage.c diff --git a/src/storage.h b/src/storage/storage.h similarity index 100% rename from src/storage.h rename to src/storage/storage.h diff --git a/src/stream.c b/src/storage/stream.c similarity index 99% rename from src/stream.c rename to src/storage/stream.c index a383543..170f90c 100644 --- a/src/stream.c +++ b/src/storage/stream.c @@ -33,7 +33,7 @@ #include #include "glib/glib-extra.h" #include "stream.h" -#include "storage.h" +#include "storage/storage.h" Stream * stream_new(enum StreamType type, Message *msg, PacketSdpMedia *media) diff --git a/src/stream.h b/src/storage/stream.h similarity index 99% rename from src/stream.h rename to src/storage/stream.h index a8fdf0c..23cf061 100644 --- a/src/stream.h +++ b/src/storage/stream.h @@ -30,7 +30,7 @@ #define __SNGREP_STREAM_H #include "config.h" -#include "message.h" +#include "storage/message.h" #include "capture/capture_pcap.h" #include "capture/dissectors/packet_sdp.h" #include "capture/dissectors/packet_rtp.h" diff --git a/src/timeval.c b/src/storage/timeval.c similarity index 100% rename from src/timeval.c rename to src/storage/timeval.c diff --git a/src/timeval.h b/src/storage/timeval.h similarity index 100% rename from src/timeval.h rename to src/storage/timeval.h