sswf::TagProtect Class Reference

Mark the movie as protected. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagProtect:

sswf::TagBase sswf::MemoryManager List of all members.

Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the protect tag in a Data buffer.
void SetEncodedPassword (const char *password)
 Set pre-encoded password for movie protection.
void SetPassword (const char *password)
 Set a non-encoded password for movie protection.
 TagProtect (TagBase *parent)
 Initialize the TagProtect object.
virtual swf_type_t TypeFlags (void) const
 Check the type of the TagProtect tag.

Private Member Functions

virtual ErrorManager::error_code_t PreSave (void)
 Defines the minimum version required for this tag.

Private Attributes

char * f_password

Detailed Description

The TagProtect object is used to mark a movie as protected against piracy. This is just a tag. The movie itself is not otherwise protected. Macromedia asks that movies marked as protected not be editable by a graphical tool. However, an tool can choose to ignore or not that tag.

You should put this tag close to the beginning of the movie.

Since version 5, it is possible to add a password in the movie itself. The password is encrypted using some MD5 algorithm. Note that, password or not, the entire movie can still be read anyway!

See also:
SWF Alexis' Reference—Protect

SWF Alexis' Reference—swf_tag


Constructor & Destructor Documentation

TagProtect::TagProtect ( TagBase parent  ) 

The TagProtect tag marks a movie as protected against piracy... The truth is that this is just a tag. All the other tags remain the same and are not in any way encoded. So the protection holds only if the tools you are using honor that protection. And since many tools in existance already do not (or can be used to remove this tag) that's not very much of a protection.

The tag used will depend on the version of the movie being saved.

Parameters:
parent The TagHeader where the TagProtect needs to be created


Member Function Documentation

ErrorManager::error_code_t TagProtect::PreSave ( void   )  [private, virtual]

The TagProtect object requires a minimum version of 2 unless a password is defined in which case the minimum version is 5.

Reimplemented from sswf::TagBase.

ErrorManager::error_code_t TagProtect::Save ( Data data  )  [virtual]

Saves the Protect tag in the specified Data buffer.

The SWF tag is chosen depending on the version of the movie:

2 to 4 -- SWF_TAG_PROTECT 5 -- SWF_TAG_PROTECT_DEBUG 6+ -- SWF_TAG_PROTECT_DEBUG2

Parameters:
data A data buffer where the TagProtect is saved
Returns:
This function returns 0 on success, non zero otherwise

Implements sswf::TagBase.

void TagProtect::SetEncodedPassword ( const char *  password  ) 

This function can be used to define the protection password.

In this case the library takes care of the password encoding.

Parameters:
password A pre-encoded MD5 password

void TagProtect::SetPassword ( const char *  password  ) 

This function can be used to define the protection password.

In this case the library takes care of the password encoding.

Note:
This function is not yet implemented.
Parameters:
password A clear text password to protect the movie

TagBase::swf_type_t TagProtect::TypeFlags ( void   )  const [virtual]

Defines the generic type of this tag. You should put only one in the whole movie, it should be close to the start of the movie and it is considered as being a control tag.

Returns:
Control, Unique and Start

Implements sswf::TagBase.


Member Data Documentation

char* sswf::TagProtect::f_password [private]


The documentation for this class was generated from the following files:
Generated on Tue Jun 26 02:36:45 2007 for libsswf by  doxygen 1.4.7