libsmbios v2 beta -- api changes list
Michael E Brown
Michael_E_Brown at dell.com
Thu Nov 15 23:15:05 CST 2007
All,
I will shortly be pushing libsmbios v2 beta1 into the Dell software
repository. I expect to leave it as beta for a short period, one to two
weeks, before releasing it as stable v2.
Version 2 has not undergone huge changes. There were a couple small
ABI changes that make this version binary-incompatible with the older
version, and I used this opportunity to remove a couple of interfaces
that were little-used.
Version 2 is the 'master' branch in git. The older version is
available as the 'libsmbios-0.13.x-branch' git branch in the repository.
I expect to leave libsmbios 0.13.x in the Dell repository for a while.
It will be parallel-installable with the newer version in case you have
software that needs the older version.
The reason for the version bump is:
-- Libsmbios 0.13.x had a library soname of libsmbios.so.1.x. This
release syncs up the major number (2) with the soname version. I had to
skip version 1 because soname version 1 was already used.
-- API Changes: There were a small number of backwards-incompatible API
changes. Most of these changes should have very low impact on projects
using libsmbios and should be fairly straightforward to deal with. Most
projects should not need to make any changes.
-- ABI Changes: projects linked against older versions of the library
will segfault if they attempt to use the new library. A simple recompile
against the new version will fix this.
===========
API Changes
===========
Here is a list of the API changes in the newer version, from most-impact
to least-impact:
-- removal of libsmbiosxml: This API had only one user that I am aware
of. The new pysmbios project (release email should be sent shortly)
will have a more-easily-maintained replacement for this. Any code
including "ISmbiosXml.h" or referencing SmbiosXmlFactory will need
to be changed. I know of no such users.
-- removal of ISmi class: All of the real work was done in the
IDellCallingInterfaceSmi class. The ISmi class was creating
difficulties in implementing the pysmbios interface. Thus, the
IDellCallingInterfaceSmi class has been placed at the top of the
heirarchy.
-- const-correctness fixes for ISmbiosTable iterators:
In the old code, you could do this:
const smbios::ISmbiosTable *table =
smbios::SmbiosFactory::getFactory()->getSingleton();
smbios::ISmbiosTable::iterator item1;
item1 = (*table)[smbios::BIOS_Information];
This was due to an error in the header definition for the iterator.
The iterator *should* be a const_iterator when the table is 'const'.
Change the code above to:
smbios::ISmbiosTable *table =
smbios::SmbiosFactory::getFactory()->getSingleton();
smbios::ISmbiosTable::iterator item1;
item1 = (*table)[smbios::BIOS_Information];
or
const smbios::ISmbiosTable *table =
smbios::SmbiosFactory::getFactory()->getSingleton();
smbios::ISmbiosTable::const_iterator item1;
item1 = (*table)[smbios::BIOS_Information];
-- The ->streamify() member function has been made protected, since the
intended user of this function is operator<<. This is true for
ISmbiosTable and ISmbiosItem.
More information about the libsmbios-devel
mailing list