File diff r25615:0966a6886a7c → r25616:f6fb8fecc5a4
src/network/core/tcp_content_type.h
Show inline comments
 
@@ -48,40 +48,39 @@ enum ContentID {
 
/** Container for all important information about a piece of content. */
 
struct ContentInfo {
 
	/** The state the content can be in. */
 
	enum State {
 
		UNSELECTED,     ///< The content has not been selected
 
		SELECTED,       ///< The content has been manually selected
 
		AUTOSELECTED,   ///< The content has been selected as dependency
 
		ALREADY_HERE,   ///< The content is already at the client side
 
		DOES_NOT_EXIST, ///< The content does not exist in the content system
 
		INVALID,        ///< The content's invalid
 
	};
 

	
 
	ContentType type;        ///< Type of content
 
	ContentID id;            ///< Unique (server side) ID for the content
 
	uint32 filesize;         ///< Size of the file
 
	char filename[48];       ///< Filename (for the .tar.gz; only valid on download)
 
	char name[32];           ///< Name of the content
 
	char version[16];        ///< Version of the content
 
	char url[96];            ///< URL related to the content
 
	char description[512];   ///< Description of the content
 
	uint32 unique_id;        ///< Unique ID; either GRF ID or shortname
 
	byte md5sum[16];         ///< The MD5 checksum
 
	uint8 dependency_count;  ///< Number of dependencies
 
	ContentID *dependencies; ///< Malloced array of dependencies (unique server side ids)
 
	uint8 tag_count;         ///< Number of tags
 
	char (*tags)[32];        ///< Malloced array of tags (strings)
 
	StringList tags;         ///< Tags associated with the content
 
	State state;             ///< Whether the content info is selected (for download)
 
	bool upgrade;            ///< This item is an upgrade
 

	
 
	ContentInfo();
 
	~ContentInfo();
 

	
 
	void TransferFrom(ContentInfo *other);
 

	
 
	bool IsSelected() const;
 
	bool IsValid() const;
 
	const char *GetTextfile(TextfileType type) const;
 
};
 

	
 
#endif /* NETWORK_CORE_TCP_CONTENT_TYPE_H */