From 8b86373e323f288b46ecb13efdabf2396c75529e Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sun, 17 Jun 2018 12:15:18 +0000 Subject: [PATCH] Cleanup: Moved types from "cfgfile.h" to "icecasttypes.h" --- src/cfgfile.h | 27 +++------------------------ src/icecasttypes.h | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/cfgfile.h b/src/cfgfile.h index e89f5c82..9705bbb7 100644 --- a/src/cfgfile.h +++ b/src/cfgfile.h @@ -29,27 +29,6 @@ #define XMLSTR(str) ((xmlChar *)(str)) -typedef enum _operation_mode { - /* Default operation mode. may depend on context */ - OMODE_DEFAULT = 0, - /* The normal mode. */ - OMODE_NORMAL, - /* Mimic some of the behavior of older versions. - * This mode should only be used in transition to normal mode, - * e.g. to give some clients time to upgrade to new API. - */ - OMODE_LEGACY, - /* The struct mode includes some behavior for future versions - * that can for some reason not yet be used in the normal mode - * e.g. because it may break interfaces in some way. - * New applications should test against this mode and developer - * of software interacting with Icecast on an API level should - * have a look for strict mode behavior to avoid random breakage - * with newer versions of Icecast. - */ - OMODE_STRICT -} operation_mode; - typedef enum _http_header_type { /* static: headers are passed as is to the client. */ HTTP_HEADER_TYPE_STATIC @@ -76,12 +55,12 @@ typedef struct ice_config_dir_tag { struct ice_config_dir_tag *next; } ice_config_dir_t; -typedef struct _config_options { +struct _config_options { char *type; char *name; char *value; - struct _config_options *next; -} config_options_t; + config_options_t *next; +}; typedef enum _mount_type { MOUNT_TYPE_NORMAL, diff --git a/src/icecasttypes.h b/src/icecasttypes.h index 54122665..941c13f7 100644 --- a/src/icecasttypes.h +++ b/src/icecasttypes.h @@ -44,6 +44,29 @@ typedef struct auth_tag auth_t; typedef struct ice_config_tag ice_config_t; +typedef struct _config_options config_options_t; + +typedef enum _operation_mode { + /* Default operation mode. may depend on context */ + OMODE_DEFAULT = 0, + /* The normal mode. */ + OMODE_NORMAL, + /* Mimic some of the behavior of older versions. + * This mode should only be used in transition to normal mode, + * e.g. to give some clients time to upgrade to new API. + */ + OMODE_LEGACY, + /* The struct mode includes some behavior for future versions + * that can for some reason not yet be used in the normal mode + * e.g. because it may break interfaces in some way. + * New applications should test against this mode and developer + * of software interacting with Icecast on an API level should + * have a look for strict mode behavior to avoid random breakage + * with newer versions of Icecast. + */ + OMODE_STRICT +} operation_mode; + /* ---[ connection.[ch] ]--- */ typedef struct connection_tag connection_t;