DellRbu.h

Go to the documentation of this file.
00001 // vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
00002 /*
00003  * Copyright (C) 2005 Dell Inc.
00004  *  by Michael Brown <Michael_E_Brown@dell.com>
00005  * Licensed under the Open Software License version 2.1 
00006  * 
00007  * Alternatively, you can redistribute it and/or modify 
00008  * it under the terms of the GNU General Public License as published 
00009  * by the Free Software Foundation; either version 2 of the License, 
00010  * or (at your option) any later version.
00011 
00012  * This program is distributed in the hope that it will be useful, but 
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of 
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
00015  * See the GNU General Public License for more details.
00016  */
00017 
00018 
00019 #ifndef RBU_H
00020 #define RBU_H
00021 
00022 // compat header should always be first header, if system headers included
00023 #include "smbios/compat.h"
00024 
00025 #include <string>
00026 
00027 // types.h should be first user-defined header.
00028 #include "smbios/types.h"
00029 #include "smbios/IException.h"
00030 
00031 // abi_prefix should be last header included before declarations
00032 #include "smbios/config/abi_prefix.hpp"
00033 
00034 
00035 namespace rbu
00036 {
00037     DECLARE_EXCEPTION( RbuException );
00038     DECLARE_EXCEPTION_EX( RbuNotSupported, rbu, RbuException );
00039     DECLARE_EXCEPTION_EX( InvalidHdrFile, rbu, RbuException );
00040     DECLARE_EXCEPTION_EX( UnsupportedSystemForHdrFile, rbu, RbuException );
00041     DECLARE_EXCEPTION_EX( HdrFileIOError, rbu, RbuException );
00042     DECLARE_EXCEPTION_EX( RbuDriverIOError, rbu, RbuException );
00043 
00044     typedef enum { pt_any, pt_mono, pt_packet, pt_init } packet_type;
00045     typedef enum { rbu_unsupported, rbu_linux_v1, rbu_linux_v2 } driver_type;
00046 
00047     const int SYSID_OVERRIDE = 1;
00048     const int BIOSVER_OVERRIDE = 2;
00049 
00051 
00053     void dellBiosUpdate( std::string fileName, packet_type force_type);
00054 
00056 
00058     void cancelDellBiosUpdate();
00059     
00061 
00063     void dumpHdrInfo(std::string fileName);
00064 
00066 
00068     bool checkSystemId(std::string fileName, u16 sysId );
00069 
00071 
00073     std::string getHdrBiosVer(std::string fileName);
00074 }
00075 
00076 // always should be last thing in header file
00077 #include "smbios/config/abi_suffix.hpp"
00078 
00079 #endif  /* RBU_H */

Generated on Tue Jul 11 20:46:46 2006 for SMBIOS Library by  doxygen 1.4.7