settings: move enum declaration to their files

This commit is contained in:
Kaian 2020-03-23 13:01:51 +01:00
parent e0ba40a100
commit 043ca50814
5 changed files with 41 additions and 36 deletions

View File

@ -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
)

View File

@ -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
*

View File

@ -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
*

View File

@ -45,6 +45,9 @@
#include <glib.h>
#include <glib-object.h>
#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
*/

View File

@ -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