/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, visit http://www.fsf.org/ */ #ifndef SAT_CFG_H #define SAT_CFG_H 1 #include #define TIME_FORMAT_MAX_LENGTH 50 /** \brief Symbolic references for boolean config values. */ typedef enum { SAT_CFG_BOOL_USE_LOCAL_TIME = 0, /*!< Display local time instead of UTC. */ SAT_CFG_BOOL_USE_NSEW, /*!< Use N, S, E and W instead of sign */ SAT_CFG_BOOL_USE_IMPERIAL, /*!< Use Imperial units instead of Metric */ SAT_CFG_BOOL_MAIN_WIN_POS, /*!< Restore position of main window */ SAT_CFG_BOOL_MOD_WIN_POS, /*!< Restore size and position of module windows */ SAT_CFG_BOOL_MOD_STATE, /*!< Restore module state */ SAT_CFG_BOOL_RULES_HINT, /*!< Enable rules hint in GtkSatList. */ SAT_CFG_BOOL_MAP_SHOW_QTH_INFO, /*!< Show QTH info on map */ SAT_CFG_BOOL_MAP_SHOW_NEXT_EV, /*!< Show next event on map */ SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK, /*!< Track mouse cursor on map. */ SAT_CFG_BOOL_MAP_SHOW_GRID, /*!< Show grid on map. */ SAT_CFG_BOOL_MAP_KEEP_RATIO, /*!< Keep original aspect ratio */ SAT_CFG_BOOL_POL_SHOW_QTH_INFO, /*!< Show QTH info on polar plot */ SAT_CFG_BOOL_POL_SHOW_NEXT_EV, /*!< Show next event on polar plot */ SAT_CFG_BOOL_POL_SHOW_CURS_TRACK, /*!< Track mouse cursor on polar plot. */ SAT_CFG_BOOL_POL_SHOW_EXTRA_AZ_TICKS, /*!< Extra Az ticks at every 30 deg. */ SAT_CFG_BOOL_TLE_SERVER_AUTH, /*!< TLE server requires authentication. */ SAT_CFG_BOOL_TLE_PROXY_AUTH, /*!< Proxy requires authentication. */ SAT_CFG_BOOL_KEEP_LOG_FILES, /*!< Whether to keep old log files */ SAT_CFG_BOOL_NUM /*!< Number of boolean parameters */ } sat_cfg_bool_e; /** \brief Symbolic references for integer config values. */ typedef enum { SAT_CFG_INT_MODULE_TIMEOUT = 0, /*!< Module refresh rate */ SAT_CFG_INT_MODULE_LAYOUT, /*!< Module layout */ SAT_CFG_INT_MODULE_VIEW_1, /*!< Type of view 1 */ SAT_CFG_INT_MODULE_VIEW_2, /*!< Type of view 2 */ SAT_CFG_INT_MODULE_VIEW_3, /*!< Type of view 3 */ SAT_CFG_INT_WARP_FACTOR, /*!< Time compression factor. */ SAT_CFG_INT_LIST_REFRESH, /*!< List refresh rate (cycle). */ SAT_CFG_INT_LIST_COLUMNS, /*!< List column visibility. */ SAT_CFG_INT_MAP_REFRESH, /*!< Map refresh rate (cycle). */ SAT_CFG_INT_MAP_INFO_COL, /*!< Info text colour on maps. */ SAT_CFG_INT_MAP_INFO_BGD_COL, /*!< Info text bgd colour on maps. */ SAT_CFG_INT_MAP_QTH_COL, /*!< QTH mark colour on map. */ SAT_CFG_INT_MAP_SAT_COL, /*!< Satellite colour on maps */ SAT_CFG_INT_MAP_SAT_SEL_COL, /*!< Selected satellite colour */ SAT_CFG_INT_MAP_SAT_COV_COL, /*!< Map coverage area colour */ SAT_CFG_INT_MAP_GRID_COL, /*!< Grid colour. */ SAT_CFG_INT_MAP_TICK_COL, /*!< Tick labels colour. */ SAT_CFG_INT_MAP_TRACK_COL, /*!< Ground Track colour. */ SAT_CFG_INT_MAP_TRACK_NUM, /*!< Number of orbits to show ground track for */ SAT_CFG_INT_POLAR_REFRESH, /*!< Polar refresh rate (cycle). */ SAT_CFG_INT_POLAR_ORIENTATION, /*!< Orientation of the polar charts. */ SAT_CFG_INT_POLAR_BGD_COL, /*!< Polar view, background colour. */ SAT_CFG_INT_POLAR_AXIS_COL, /*!< Polar view, axis colour. */ SAT_CFG_INT_POLAR_TICK_COL, /*!< Tick label colour, e.g. N/W/S/E */ SAT_CFG_INT_POLAR_SAT_COL, /*!< Satellite colour. */ SAT_CFG_INT_POLAR_SAT_SEL_COL, /*!< Selected satellite colour. */ SAT_CFG_INT_POLAR_TRACK_COL, /*!< Track colour. */ SAT_CFG_INT_POLAR_INFO_COL, /*!< Info colour. */ SAT_CFG_INT_SINGLE_SAT_REFRESH, /*!< Single-sat refresh rate (cycle). */ SAT_CFG_INT_SINGLE_SAT_FIELDS, /*!< Single-sat fields. */ SAT_CFG_INT_PRED_MIN_EL, /*!< Minimum elevation for passes. */ SAT_CFG_INT_PRED_NUM_PASS, /*!< Number of passes to predict. */ SAT_CFG_INT_PRED_LOOK_AHEAD, /*!< Look-ahead time limit in days. */ SAT_CFG_INT_PRED_RESOLUTION, /*!< Time resolution in seconds */ SAT_CFG_INT_PRED_NUM_ENTRIES, /*!< Number of entries in single pass. */ SAT_CFG_INT_PRED_SINGLE_COL, /*!< Visible columns in single-pass dialog */ SAT_CFG_INT_PRED_MULTI_COL, /*!< Visible columns in multi-pass dialog */ SAT_CFG_INT_PRED_SAVE_FORMAT, /*!< Last used save format for predictions */ SAT_CFG_INT_PRED_SAVE_CONTENTS, /*!< Last selection for save file contents */ SAT_CFG_INT_SKYATGL_TIME, /*!< Time span for sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_01, /*!< Colour 1 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_02, /*!< Colour 2 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_03, /*!< Colour 3 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_04, /*!< Colour 4 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_05, /*!< Colour 5 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_06, /*!< Colour 6 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_07, /*!< Colour 7 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_08, /*!< Colour 8 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_09, /*!< Colour 9 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_10, /*!< Colour 10 in sky at a glance predictions */ SAT_CFG_INT_WINDOW_POS_X, /*!< Main window X during last session */ SAT_CFG_INT_WINDOW_POS_Y, /*!< Main window Y during last session */ SAT_CFG_INT_WINDOW_WIDTH, /*!< Main window width during last session */ SAT_CFG_INT_WINDOW_HEIGHT, /*!< Main window height during last session */ SAT_CFG_INT_WEB_BROWSER_TYPE, /*!< Web browser type, see browser_type_t */ SAT_CFG_INT_TLE_AUTO_UPD_FREQ, /*!< TLE auto-update frequency. */ SAT_CFG_INT_TLE_AUTO_UPD_ACTION, /*!< TLE auto-update action. */ SAT_CFG_INT_TLE_LAST_UPDATE, /*!< Date and time of last update, Unix seconds. */ SAT_CFG_INT_LOG_CLEAN_AGE, /*!< Age of log file to delete (seconds) */ SAT_CFG_INT_LOG_LEVEL, /*!< Logging level */ SAT_CFG_INT_NUM /*!< Number of integer parameters. */ } sat_cfg_int_e; /** \brief Symbolic references for string config values. */ typedef enum { SAT_CFG_STR_TIME_FORMAT = 0,/*!< Time format. */ SAT_CFG_STR_DEF_QTH, /*!< Default QTH file. */ SAT_CFG_STR_OPEN_MODULES, /*!< Open modules. */ SAT_CFG_STR_WEB_BROWSER, /*!< Web browser string. */ SAT_CFG_STR_MAP_FILE, /*!< Map file (abs or rel). */ SAT_CFG_STR_MAP_FONT, /*!< Map font. */ SAT_CFG_STR_POL_FONT, /*!< Polar view font. */ SAT_CFG_STR_TLE_SERVER, /*!< Server for TLE updates. */ SAT_CFG_STR_TLE_FILES, /*!< ; separated list of files on server. */ SAT_CFG_STR_TLE_PROXY, /*!< Proxy server. */ SAT_CFG_STR_TLE_FILE_DIR, /*!< Local directory from which tle were last updated. */ SAT_CFG_STR_TLE_FILE_EXT, /*!< File extensions. */ SAT_CFG_STR_PRED_SAVE_DIR, /*!< Last used save directory for pass predictions */ SAT_CFG_STR_NUM /*!< Number of string parameters */ } sat_cfg_str_e; guint sat_cfg_load (void); guint sat_cfg_save (void); void sat_cfg_close (void); gboolean sat_cfg_get_bool (sat_cfg_bool_e param); gboolean sat_cfg_get_bool_def (sat_cfg_bool_e param); void sat_cfg_set_bool (sat_cfg_bool_e param, gboolean value); void sat_cfg_reset_bool (sat_cfg_bool_e param); gchar *sat_cfg_get_str (sat_cfg_str_e param); gchar *sat_cfg_get_str_def (sat_cfg_str_e param); void sat_cfg_set_str (sat_cfg_str_e param, const gchar *value); void sat_cfg_reset_str (sat_cfg_str_e param); gint sat_cfg_get_int (sat_cfg_int_e param); gint sat_cfg_get_int_def (sat_cfg_int_e param); void sat_cfg_set_int (sat_cfg_int_e param, gint value); void sat_cfg_reset_int (sat_cfg_int_e param); #endif