SmiTokenDA Class Reference

#include <TokenImpl.h>

Inheritance diagram for SmiTokenDA:

IProtectedToken IToken List of all members.

Public Member Functions

 SmiTokenDA (const smbios::ISmbiosItem &item, const calling_interface_token *token)
virtual ~SmiTokenDA () throw ()
u32 getType () const
 Returns the Token Type, per Dell SMBIOS Spec.
virtual bool isActive () const
 Returns true if bitfield-type token is set.
virtual void activate () const
 Sets the bitmask for bitfield-type tokens.
virtual bool isString () const
 Returns true for string-type tokens.
virtual bool isBool () const
 Returns true for bool-type tokens.
virtual unsigned int getStringLength () const
 Returns length for string-type tokens.
virtual const std::string getString (u8 *byteArray=0, unsigned int size=0) const
 returns std:string and raw value in first parameter.
virtual void setString (const u8 *byteArray, size_t size) const
virtual const ISmbiosItem & getItemRef () const
virtual std::string getTokenClass () const
virtual u32 getValueFormat () const
virtual bool tryPassword (std::string pw) const
virtual std::ostream & streamify (std::ostream &cout) const

Protected Member Functions

 SmiTokenDA ()
 SmiTokenDA (const SmiTokenDA &)
void operator= (const SmiTokenDA &)

Private Attributes

std::auto_ptr< const smbios::ISmbiosItem > item
calling_interface_structure structure
calling_interface_token token
std::string password

Detailed Description

Definition at line 188 of file TokenImpl.h.


Constructor & Destructor Documentation

SmiTokenDA (  const smbios::ISmbiosItem &  item,
const calling_interface_token *  token
) 
 

Definition at line 35 of file TokenDA.cpp.

References SmiTokenDA::item, SmiTokenDA::structure, and SmiTokenDA::token.

~SmiTokenDA (   )  throw () [virtual]
 

Definition at line 47 of file TokenDA.cpp.

SmiTokenDA (   )  [protected]
 

SmiTokenDA (  const SmiTokenDA &   )  [protected]
 


Member Function Documentation

void activate (   )  const [virtual]
 

Sets the bitmask for bitfield-type tokens.

Implements IToken.

Definition at line 117 of file TokenDA.cpp.

References calling_interface_structure::cmdIOAddress, calling_interface_structure::cmdIOCode, SmiFactory::DELL_CALLING_INTERFACE_SMI, smbios::executeWithPassword(), SmiFactory::getFactory(), calling_interface_token::location, SmiTokenDA::password, IDellCallingInterfaceSmi::setArg(), IDellCallingInterfaceSmi::setClass(), IDellCallingInterfaceSmi::setSelect(), SmiTokenDA::structure, SmiTokenDA::token, and calling_interface_token::value.

const ISmbiosItem & getItemRef (   )  const [virtual]
 

Implements IToken.

Definition at line 67 of file TokenDA.cpp.

References SmiTokenDA::item.

const string getString (  u8 *  byteArray = 0,
unsigned int  size = 0
)  const [virtual]
 

returns std:string and raw value in first parameter.

Parameters:
byteArray If Non-NULL, getString() will store the raw string here.
size This must be the length of the space allocated for byteArray. getString() will not overflow this length.
Returns:
Returns a C++-style std::string initialized with the contents of byteArray. Only useful for strings that hold C-style zero-terminated strings.

Implements IToken.

Definition at line 139 of file TokenDA.cpp.

References calling_interface_structure::cmdIOAddress, calling_interface_structure::cmdIOCode, SmiFactory::DELL_CALLING_INTERFACE_SMI, ISmi::execute(), SmiFactory::getFactory(), IDellCallingInterfaceSmi::getRes(), calling_interface_token::location, IDellCallingInterfaceSmi::setArg(), IDellCallingInterfaceSmi::setClass(), IDellCallingInterfaceSmi::setSelect(), SmiTokenDA::structure, and SmiTokenDA::token.

unsigned int getStringLength (   )  const [virtual]
 

Returns length for string-type tokens.

Implements IToken.

Definition at line 181 of file TokenDA.cpp.

string getTokenClass (   )  const [virtual]
 

Implements IToken.

Definition at line 50 of file TokenDA.cpp.

u32 getType (   )  const [virtual]
 

Returns the Token Type, per Dell SMBIOS Spec.

Implements IToken.

Definition at line 72 of file TokenDA.cpp.

References SmiTokenDA::token, and calling_interface_token::tokenId.

Referenced by SmiTokenDA::streamify().

u32 getValueFormat (   )  const [virtual]
 

Implements IProtectedToken.

Definition at line 55 of file TokenDA.cpp.

bool isActive (   )  const [virtual]
 

Returns true if bitfield-type token is set.

Implements IToken.

Definition at line 77 of file TokenDA.cpp.

References calling_interface_structure::cmdIOAddress, calling_interface_structure::cmdIOCode, SmiFactory::DELL_CALLING_INTERFACE_SMI, ISmi::execute(), SmiFactory::getFactory(), IDellCallingInterfaceSmi::getRes(), calling_interface_token::location, IDellCallingInterfaceSmi::setArg(), IDellCallingInterfaceSmi::setClass(), IDellCallingInterfaceSmi::setSelect(), SmiTokenDA::structure, SmiTokenDA::token, and calling_interface_token::value.

bool isBool (   )  const [virtual]
 

Returns true for bool-type tokens.

Implements IToken.

Definition at line 134 of file TokenDA.cpp.

bool isString (   )  const [virtual]
 

Returns true for string-type tokens.

Implements IToken.

Definition at line 129 of file TokenDA.cpp.

void operator= (  const SmiTokenDA &   )  [protected]
 

void setString (  const u8 *  byteArray,
size_t  size
)  const [virtual]
 

Implements IToken.

Definition at line 165 of file TokenDA.cpp.

References calling_interface_structure::cmdIOAddress, calling_interface_structure::cmdIOCode, SmiFactory::DELL_CALLING_INTERFACE_SMI, smbios::executeWithPassword(), SmiFactory::getFactory(), calling_interface_token::location, SmiTokenDA::password, IDellCallingInterfaceSmi::setArg(), IDellCallingInterfaceSmi::setClass(), IDellCallingInterfaceSmi::setSelect(), SmiTokenDA::structure, and SmiTokenDA::token.

std::ostream & streamify (  std::ostream &  cout  )  const [virtual]
 

Implements IToken.

Definition at line 187 of file TokenDA.cpp.

References calling_interface_structure::cmdIOAddress, calling_interface_structure::cmdIOCode, SmiTokenDA::getType(), calling_interface_structure::handle, calling_interface_token::location, SmiTokenDA::structure, SmiTokenDA::token, calling_interface_structure::type, and calling_interface_token::value.

bool tryPassword (  std::string  pw  )  const [virtual]
 

Implements IProtectedToken.

Definition at line 60 of file TokenDA.cpp.

References SmiTokenDA::password.


Member Data Documentation

std::auto_ptr<const smbios::ISmbiosItem> item [private]
 

Definition at line 215 of file TokenImpl.h.

Referenced by SmiTokenDA::getItemRef(), and SmiTokenDA::SmiTokenDA().

std::string password [mutable, private]
 

Definition at line 218 of file TokenImpl.h.

Referenced by SmiTokenDA::activate(), SmiTokenDA::setString(), and SmiTokenDA::tryPassword().

calling_interface_structure structure [private]
 

Definition at line 216 of file TokenImpl.h.

Referenced by SmiTokenDA::activate(), SmiTokenDA::getString(), SmiTokenDA::isActive(), SmiTokenDA::setString(), SmiTokenDA::SmiTokenDA(), and SmiTokenDA::streamify().

calling_interface_token token [private]
 

Definition at line 217 of file TokenImpl.h.

Referenced by SmiTokenDA::activate(), SmiTokenDA::getString(), SmiTokenDA::getType(), SmiTokenDA::isActive(), SmiTokenDA::setString(), SmiTokenDA::SmiTokenDA(), and SmiTokenDA::streamify().


The documentation for this class was generated from the following files:
Generated on Tue Jan 17 02:59:09 2006 for SMBIOS Library by  doxygen 1.4.6