The Battle for Wesnoth  1.15.0-dev
Classes | Typedefs | Enumerations | Functions
state.hpp File Reference
#include "addon/info.hpp"
#include <map>
Include dependency graph for state.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  addon_tracking_info
 Stores additional status information about add-ons. More...
 

Typedefs

typedef std::map< std::string, addon_tracking_infoaddons_tracking_list
 

Enumerations

enum  ADDON_STATUS {
  ADDON_NONE, ADDON_INSTALLED, ADDON_INSTALLED_UPGRADABLE, ADDON_INSTALLED_OUTDATED,
  ADDON_INSTALLED_LOCAL_ONLY, ADDON_INSTALLED_BROKEN, ADDON_NOT_TRACKED
}
 Defines various add-on installation statuses. More...
 
enum  ADDON_STATUS_FILTER {
  FILTER_ALL, FILTER_INSTALLED, FILTER_UPGRADABLE, FILTER_PUBLISHABLE,
  FILTER_NOT_INSTALLED, FILTER_COUNT
}
 Add-on installation status filters for the user interface. More...
 
enum  ADDON_SORT { SORT_NAMES, SORT_UPDATED, SORT_CREATED }
 Add-on fallback/default sorting criteria for the user interface. More...
 
enum  ADDON_SORT_DIRECTION { DIRECTION_ASCENDING, DIRECTION_DESCENDING }
 Add-on fallback/default sorting direction. More...
 

Functions

bool is_installed_addon_status (ADDON_STATUS s)
 
addon_tracking_info get_addon_tracking_info (const addon_info &addon)
 Get information about an add-on comparing its local state with the add-ons server entry. More...
 

Typedef Documentation

◆ addons_tracking_list

typedef std::map<std::string, addon_tracking_info> addons_tracking_list

Definition at line 63 of file state.hpp.

Enumeration Type Documentation

◆ ADDON_SORT

enum ADDON_SORT

Add-on fallback/default sorting criteria for the user interface.

Enumerator
SORT_NAMES 

Sort by add-on name.

SORT_UPDATED 

Sort by last upload time.

SORT_CREATED 

Sort by creation time.

Definition at line 95 of file state.hpp.

◆ ADDON_SORT_DIRECTION

Add-on fallback/default sorting direction.

Enumerator
DIRECTION_ASCENDING 

Ascending sort.

DIRECTION_DESCENDING 

Descending sort.

Definition at line 104 of file state.hpp.

◆ ADDON_STATUS

Defines various add-on installation statuses.

Enumerator
ADDON_NONE 

Add-on is not installed.

ADDON_INSTALLED 

Version in the server matches local installation.

ADDON_INSTALLED_UPGRADABLE 

Version in the server is newer than local installation.

ADDON_INSTALLED_OUTDATED 

Version in the server is older than local installation.

ADDON_INSTALLED_LOCAL_ONLY 

No version in the server.

ADDON_INSTALLED_BROKEN 

Dependencies not satisfied.

Todo:
This option isn't currently implemented!
ADDON_NOT_TRACKED 

No tracking information available.

Definition at line 21 of file state.hpp.

◆ ADDON_STATUS_FILTER

Add-on installation status filters for the user interface.

These are not currently an exact match with the ADDON_STATUS enum type in order to keep the UI aspect simple for the user. This might change later.

Enumerator
FILTER_ALL 
FILTER_INSTALLED 
FILTER_UPGRADABLE 
FILTER_PUBLISHABLE 
FILTER_NOT_INSTALLED 
FILTER_COUNT 

Definition at line 83 of file state.hpp.

Function Documentation

◆ get_addon_tracking_info()

addon_tracking_info get_addon_tracking_info ( const addon_info addon)

◆ is_installed_addon_status()

bool is_installed_addon_status ( ADDON_STATUS  s)
inline