List of all members.
Public Member Functions |
| | SOL () |
| | ~SOL () |
| size_t | size () const |
| | Get the number of Elements in this class.
|
| size_t | fileSize () const |
| bool | extractHeader (const std::vector< boost::uint8_t > &data) |
| | Extract the header from the file.
|
| bool | extractHeader (const std::string &filespec) |
| | Extract the header from the file.
|
| bool | formatHeader (const std::vector< boost::uint8_t > &data) |
| | Create the file header.
|
| bool | formatHeader (const std::string &name) |
| | Create the file header.
|
| bool | formatHeader (const std::string &name, int filesize) |
| | Create the file header.
|
| bool | writeFile () |
| | Write the data to disk as a .sol file.
|
| bool | writeFile (const std::string &filespec, const std::string &objname) |
| | Write the data to disk as a .sol file.
|
| bool | readFile (const std::string &filespec) |
| | Read a .sol file from disk.
|
| std::vector< boost::uint8_t > | getHeader () |
| | Get the stored copy of the header.
|
| void | addObj (boost::shared_ptr< Element > el) |
| | Add the AMF objects that are the data of the file.
|
std::vector< boost::shared_ptr
< cygnal::Element > > & | getElements () |
| | Return a reference to the elements in this object.
|
| boost::shared_ptr< Element > | getElement (size_t size) |
| | Get an element referenced by index in the array.
|
| void | setFilespec (const std::string &filespec) |
| | Set the filespec for the .sol file. Set's the full path and file name to the .sol file to be read or written.
|
| const std::string & | getFilespec () const |
| | Get the filespec of the .sol file.
|
| void | setObjectName (const std::string &objname) |
| | Set the name of the SharedObject.
|
| const std::string & | getObjectName () const |
| | Get the filespec of the .sol file.
|
| bool | updateSO (boost::shared_ptr< cygnal::Element > &el) |
| bool | updateSO (int index, boost::shared_ptr< cygnal::Element > &el) |
| void | dump () |
| | Dump the internal data of this class in a human readable form.
|
Protected Attributes |
std::vector< boost::shared_ptr
< Element > > | _amfobjs |
Detailed Description
This class is for accessing the data in SharedObject files, also called "Flash cookies". These .sol files are just a collection of AMF0 data, with a simple file header.
Constructor & Destructor Documentation
Member Function Documentation
| void cygnal::SOL::addObj |
( |
boost::shared_ptr< Element > |
el |
) |
|
Add the AMF objects that are the data of the file.
- Parameters:
-
| el | A smart pointer to the Element to add to the .sol file. |
- Returns:
- nothing.
| void cygnal::SOL::dump |
( |
|
) |
|
| bool cygnal::SOL::extractHeader |
( |
const std::string & |
filespec |
) |
|
Extract the header from the file.
- Parameters:
-
| filespec | The name and path of the .sol file to parse. |
- Returns:
- true if this succeeded. false if it doesn't.
| bool cygnal::SOL::extractHeader |
( |
const std::vector< boost::uint8_t > & |
data |
) |
|
Extract the header from the file.
- Parameters:
-
| data | a reference to a vector of bytes that contains the .sol file data. |
- Returns:
- true if this succeeded. false if it doesn't.
| size_t cygnal::SOL::fileSize |
( |
|
) |
const [inline] |
| bool cygnal::SOL::formatHeader |
( |
const std::vector< boost::uint8_t > & |
data |
) |
|
Create the file header.
- Parameters:
-
| data | a reference to a vector of bytes that contains the .sol file data. |
- Returns:
- true if this succeeded. false if it doesn't.
Referenced by formatHeader(), and writeFile().
| bool cygnal::SOL::formatHeader |
( |
const std::string & |
name |
) |
|
Create the file header.
- Parameters:
-
| name | The name of the SharedObject for this file. |
- Returns:
- true if this succeeded. false if it doesn't.
References formatHeader().
| bool cygnal::SOL::formatHeader |
( |
const std::string & |
name, |
|
|
int |
filesize | |
|
) |
| | |
Create the file header.
- Parameters:
-
| name | The name of the SharedObject for this file. |
| filesize | The size of the file. |
- Returns:
- true if this succeeded. false if it doesn't.
References _, __FUNCTION__, hexify(), SOL_BLOCK_MARK, and SOL_MAGIC.
| boost::shared_ptr<Element> cygnal::SOL::getElement |
( |
size_t |
size |
) |
[inline] |
Get an element referenced by index in the array.
- Parameters:
-
| size | The index of the property to retrieve. |
- Returns:
- A smart pointer to the element at the specified location.
| std::vector<boost::shared_ptr<cygnal::Element> >& cygnal::SOL::getElements |
( |
|
) |
[inline] |
Return a reference to the elements in this object.
- Returns:
- A smart pointer to the array of properities for this .sol file.
| const std::string& cygnal::SOL::getFilespec |
( |
|
) |
const [inline] |
Get the filespec of the .sol file.
- Returns:
- A string which contains the full path and name of the .sol file.
| std::vector<boost::uint8_t> cygnal::SOL::getHeader |
( |
|
) |
[inline] |
Get the stored copy of the header.
- Returns:
- A vector of raw bytes that is a binary form of the header.
| const std::string& cygnal::SOL::getObjectName |
( |
|
) |
const [inline] |
Get the filespec of the .sol file.
- Returns:
- A string which contains the name of the SharedObject in the .sol file.
| bool cygnal::SOL::readFile |
( |
const std::string & |
filespec |
) |
|
| void cygnal::SOL::setFilespec |
( |
const std::string & |
filespec |
) |
[inline] |
Set the filespec for the .sol file. Set's the full path and file name to the .sol file to be read or written.
- Parameters:
-
| filespec | The name and path of the .sol file to parse. |
- Returns:
- nothing.
| void cygnal::SOL::setObjectName |
( |
const std::string & |
objname |
) |
[inline] |
Set the name of the SharedObject.
- Parameters:
-
| objname | The name of the SharedObject in the .sol file. |
- Returns:
- nothing.
| size_t cygnal::SOL::size |
( |
|
) |
const [inline] |
Get the number of Elements in this class.
- Returns:
- The count of Elements.
Referenced by writeFile().
| bool cygnal::SOL::updateSO |
( |
int |
index, |
|
|
boost::shared_ptr< cygnal::Element > & |
el | |
|
) |
| | |
| bool cygnal::SOL::writeFile |
( |
const std::string & |
filespec, |
|
|
const std::string & |
name | |
|
) |
| | |
| bool cygnal::SOL::writeFile |
( |
|
) |
|
Write the data to disk as a .sol file.
- Returns:
- true if this succeeded. false if it doesn't.
Member Data Documentation
The documentation for this class was generated from the following files: