From 043ca50814b0a3709ad7b7ea362d98558b8bd0e9 Mon Sep 17 00:00:00 2001 From: Kaian Date: Mon, 23 Mar 2020 13:01:51 +0100 Subject: [PATCH] settings: move enum declaration to their files --- CMakeLists.txt | 4 ++- src/ncurses/manager.h | 13 ++++++++++ src/ncurses/windows/call_flow_win.h | 15 ++++++++++++ src/setting.h | 38 +++-------------------------- src/storage/storage.h | 7 ++++++ 5 files changed, 41 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c014673..d572372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,7 +177,9 @@ configure_file( ###################################################################### set(ENUM_HEADERS - src/setting.h + src/ncurses/manager.h + src/ncurses/windows/call_flow_win.h + src/storage/storage.h src/storage/packet/packet.h ) diff --git a/src/ncurses/manager.h b/src/ncurses/manager.h index 360816a..79c0098 100644 --- a/src/ncurses/manager.h +++ b/src/ncurses/manager.h @@ -58,6 +58,19 @@ enum ncurses_errors NCURSES_ERROR_INIT = 0, }; +typedef enum +{ + SETTING_BACKGROUND_DARK, + SETTING_BACKGROUND_DEFAULT, +} SettingBackground; + +typedef enum +{ + SETTING_COLORMODE_REQUEST, + SETTING_COLORMODE_CSEQ, + SETTING_COLORMODE_CALLID, +} SettingColorMode; + /** * @brief Initialize ncurses mode * diff --git a/src/ncurses/windows/call_flow_win.h b/src/ncurses/windows/call_flow_win.h index 35d83da..41e8e15 100644 --- a/src/ncurses/windows/call_flow_win.h +++ b/src/ncurses/windows/call_flow_win.h @@ -88,6 +88,21 @@ typedef enum CF_ARROW_DIR_SPIRAL_LEFT } CallFlowArrowDir; +typedef enum +{ + SETTING_ARROW_HIGHLIGH_BOLD, + SETTING_ARROW_HIGHLIGH_REVERSE, + SETTING_ARROW_HIGHLIGH_REVERSEBOLD, +} SettingArrowHighlight; + +typedef enum +{ + SETTING_SDP_OFF, + SETTING_SDP_FIRST, + SETTING_SDP_FULL, + SETTING_SDP_COMPRESSED, +} SettingSdpMode; + /** * @brief Structure to hold one column information * diff --git a/src/setting.h b/src/setting.h index 72d67e9..2eaac87 100644 --- a/src/setting.h +++ b/src/setting.h @@ -45,6 +45,9 @@ #include #include #include "storage/attribute.h" +#include "storage/storage.h" +#include "ncurses/manager.h" +#include "ncurses/windows/call_flow_win.h" //! Max setting value #define SETTING_MAX_LEN 1024 @@ -175,41 +178,6 @@ typedef enum SETTING_COUNT } SettingId; -typedef enum -{ - SETTING_BACKGROUND_DARK, - SETTING_BACKGROUND_DEFAULT, -} SettingBackground; - -typedef enum -{ - SETTING_COLORMODE_REQUEST, - SETTING_COLORMODE_CSEQ, - SETTING_COLORMODE_CALLID, -} SettingColorMode; - -typedef enum -{ - SETTING_STORAGE_MODE_NONE, - SETTING_STORAGE_MODE_MEMORY, - SETTING_STORAGE_MODE_DISK, -} SettingStorageMode; - -typedef enum -{ - SETTING_ARROW_HIGHLIGH_BOLD, - SETTING_ARROW_HIGHLIGH_REVERSE, - SETTING_ARROW_HIGHLIGH_REVERSEBOLD, -} SettingArrowHighlight; - -typedef enum -{ - SETTING_SDP_OFF, - SETTING_SDP_FIRST, - SETTING_SDP_FULL, - SETTING_SDP_COMPRESSED, -} SettingSdpMode; - /** * @brief Configurable Setting structure */ diff --git a/src/storage/storage.h b/src/storage/storage.h index fd442a8..b349f66 100644 --- a/src/storage/storage.h +++ b/src/storage/storage.h @@ -42,6 +42,13 @@ typedef enum STORAGE_MODE_DISK, } StorageMode; +typedef enum +{ + SETTING_STORAGE_MODE_NONE, + SETTING_STORAGE_MODE_MEMORY, + SETTING_STORAGE_MODE_DISK, +} SettingStorageMode; + //! Shorter declaration of sip_call_list structure typedef struct _Storage Storage; //! Shorter declaration of sip stats