#include <libsswf.h>
Public Member Functions | |
virtual ErrorManager::error_code_t | Save (Data &data) |
Save the product info tag in the Data buffer. | |
void | SetBuild (int64_t build_number) |
Set the product build number. | |
void | SetCompileDate (int64_t date) |
Set the date when the product was compiled. | |
void | SetEdition (long edition) |
Set the edition identifier. | |
void | SetProduct (long product_id) |
Set the product identifier. | |
void | SetVersion (int major, int minor) |
Set the version of the tool saving this SWF file. | |
TagProductInfo (TagBase *parent) | |
Initializes the TagProductInfo. | |
virtual swf_type_t | TypeFlags (void) const |
The type of this tag. | |
Private Member Functions | |
virtual ErrorManager::error_code_t | ParseTag (swf_tag_t tag, const Data &data) |
virtual ErrorManager::error_code_t | PreSave (void) |
Presumably, this tag appeared in version 3 of SWF. | |
Private Attributes | |
int64_t | f_build_number |
int64_t | f_date |
long | f_edition |
int | f_major |
int | f_minor |
long | f_product_id |
Since I do not know of any way to get a product ID which is unique, I have no idea how you can pretend that this would be unique...
TagProductInfo::TagProductInfo | ( | TagBase * | parent | ) |
By default, the TagProductInfo is set to all zeroes except for the major version which is set to 1.
[in] | parent | a TagHeader tag |
void sswf::TagProductInfo::SetEdition(uint32_t edition);
void sswf::TagProductInfo::SetVersion(int major, int minor);
References f_build_number, f_date, f_edition, f_major, f_minor, and f_product_id.
virtual ErrorManager::error_code_t sswf::TagProductInfo::ParseTag | ( | swf_tag_t | tag, | |
const Data & | data | |||
) | [private, virtual] |
Implements sswf::TagBase.
ErrorManager::error_code_t TagProductInfo::PreSave | ( | void | ) | [private, virtual] |
Tells the TagHeader that a version 3+ movie is required.
Reimplemented from sswf::TagBase.
References sswf::ErrorManager::ERROR_CODE_NONE, and sswf::TagBase::MinimumVersion().
ErrorManager::error_code_t TagProductInfo::Save | ( | Data & | data | ) | [virtual] |
This function saves the product info in the Data output buffer.
[in,out] | data | The Data buffer where the result is saved |
Implements sswf::TagBase.
References sswf::ErrorManager::ERROR_CODE_NONE, f_build_number, f_date, f_edition, f_major, f_minor, f_product_id, sswf::Data::PutByte(), sswf::Data::PutDLong(), sswf::Data::PutLong(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_PRODUCT_INFO.
void TagProductInfo::SetBuild | ( | int64_t | build | ) |
This function saves your product build number.
There is no limit to the build number, any 64 bits value is acceptable.
This is usually not necessary for Linux products since we don't use build numbers, just a version. Yet, some versions have more than 2 numbers, this build number can be used to include extraneous numbers.
[in] | build | The product build number |
References f_build_number.
void TagProductInfo::SetCompileDate | ( | int64_t | date | ) |
This function saves the date when your product was compiled.
The date is saved on 64 bits.
At this time I do not know what the unit/structure of this date is. (seconds, milliseconds or microseconds?)
date | The date when the product was compiled |
References f_date.
void TagProductInfo::SetEdition | ( | long | edition | ) |
This function saves your product edition identifier.
There is no limit to the identifier, any 32 bits value is acceptable.
This is anything you'd like. If you have different editions of your products (i.e. Free, Pro, Studio, Delux, etc.) use this field to differenciate their output.
[in] | edition | The product edition identifier |
References f_edition.
void TagProductInfo::SetProduct | ( | long | product | ) |
This function saves your product identifier.
There is no limit to the identifier, any 32 bits value is acceptable.
We would need a way to define a unique identifier...
[in] | product | The product identifier |
References f_product_id.
void TagProductInfo::SetVersion | ( | int | major, | |
int | minor | |||
) |
This function saves the version information.
The version can be anything. Note that both numbers are limited to a value from 0 to 255.
By default, the TagProductInfo sets 1 in the major version and 0 in the minor version.
[in] | major | The major version of the tool saving this SWF animation |
[in] | minor | The minor version of the tool saving this SWF animation |
TagBase::swf_type_t TagProductInfo::TypeFlags | ( | void | ) | const [virtual] |
The TagProductInfo is a DEFINE type.
Implements sswf::TagBase.
References SWF_TYPE_DEFINE.
int64_t sswf::TagProductInfo::f_build_number [private] |
Referenced by Save(), SetBuild(), and TagProductInfo().
int64_t sswf::TagProductInfo::f_date [private] |
Referenced by Save(), SetCompileDate(), and TagProductInfo().
long sswf::TagProductInfo::f_edition [private] |
Referenced by Save(), SetEdition(), and TagProductInfo().
int sswf::TagProductInfo::f_major [private] |
Referenced by Save(), SetVersion(), and TagProductInfo().
int sswf::TagProductInfo::f_minor [private] |
Referenced by Save(), SetVersion(), and TagProductInfo().
long sswf::TagProductInfo::f_product_id [private] |
Referenced by Save(), SetProduct(), and TagProductInfo().