Go to the documentation of this file.
12 #ifndef NETWORK_CORE_TCP_CONTENT_TYPE_H
13 #define NETWORK_CORE_TCP_CONTENT_TYPE_H
bool IsSelected() const
Is the state either selected or autoselected?
uint8 tag_count
Number of tags.
~ContentInfo()
Free everything allocated.
const char * GetTextfile(TextfileType type) const
Search a textfile file next to this file in the content list.
ContentType type
Type of content.
@ CONTENT_TYPE_GAME_LIBRARY
The content consists of a GS library.
bool upgrade
This item is an upgrade.
@ DOES_NOT_EXIST
The content does not exist in the content system.
char(* tags)[32]
Malloced array of tags (strings)
@ CONTENT_TYPE_NEWGRF
The content consists of a NewGRF.
@ PACKET_CONTENT_SERVER_CONTENT
Reply with the content of the given ID.
State
The state the content can be in.
@ INVALID_CONTENT_ID
Sentinel for invalid content.
@ CONTENT_TYPE_END
Helper to mark the end of the types.
@ PACKET_CONTENT_CLIENT_INFO_EXTID_MD5
Queries the content server for information about a list of external IDs and MD5.
char filename[48]
Filename (for the .tar.gz; only valid on download)
bool IsValid() const
Is the information from this content info valid?
ContentType
The values in the enum are important; they are used as database 'keys'.
PacketContentType
Enum with all types of TCP content packets.
void TransferFrom(ContentInfo *other)
Copy data from other ContentInfo and take ownership of allocated stuff.
@ PACKET_CONTENT_END
Must ALWAYS be on the end of this list!! (period)
@ CONTENT_TYPE_GAME
The content consists of a game script.
@ UNSELECTED
The content has not been selected.
@ PACKET_CONTENT_CLIENT_INFO_ID
Queries the content server for information about a list of internal IDs.
Container for all important information about a piece of content.
byte md5sum[16]
The MD5 checksum.
@ SELECTED
The content has been manually selected.
@ PACKET_CONTENT_CLIENT_CONTENT
Request a content file given an internal ID.
char url[96]
URL related to the content.
char description[512]
Description of the content.
@ PACKET_CONTENT_CLIENT_INFO_EXTID
Queries the content server for information about a list of external IDs.
@ CONTENT_TYPE_AI
The content consists of an AI.
@ CONTENT_TYPE_BASE_GRAPHICS
The content consists of base graphics.
@ ALREADY_HERE
The content is already at the client side.
@ AUTOSELECTED
The content has been selected as dependency.
@ CONTENT_TYPE_AI_LIBRARY
The content consists of an AI library.
size_t Size() const
Get the size of the data as send over the network.
ContentID
Unique identifier for the content.
ContentInfo()
Clear everything in the struct.
@ CONTENT_TYPE_BEGIN
Helper to mark the begin of the types.
uint8 dependency_count
Number of dependencies.
@ PACKET_CONTENT_SERVER_INFO
Reply of content server with information about content.
char version[16]
Version of the content.
State state
Whether the content info is selected (for download)
@ CONTENT_TYPE_BASE_SOUNDS
The content consists of base sounds.
uint32 unique_id
Unique ID; either GRF ID or shortname.
@ PACKET_CONTENT_CLIENT_INFO_LIST
Queries the content server for a list of info of a given content type.
@ CONTENT_TYPE_SCENARIO
The content consists of a scenario.
TextfileType
Additional text files accompanying Tar archives.
char name[32]
Name of the content.
@ INVALID
The content's invalid.
ContentID * dependencies
Malloced array of dependencies (unique server side ids)
ContentID id
Unique (server side) ID for the content.
@ CONTENT_TYPE_HEIGHTMAP
The content consists of a heightmap.
uint32 filesize
Size of the file.
@ CONTENT_TYPE_BASE_MUSIC
The content consists of base music.