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 00020 #ifndef IFACTORY_H_INCLUDED 00021 #define IFACTORY_H_INCLUDED 00022 00023 // compat header should always be first header 00024 #include "smbios/compat.h" 00025 00026 #include <string> 00027 00028 // types.h should be first user-defined header. 00029 #include "smbios/types.h" 00030 00031 // abi_prefix should be last header included before declarations 00032 #include "smbios/config/abi_prefix.hpp" 00033 00034 namespace factory 00035 { 00037 00039 class IFactory 00040 { 00041 public: 00042 virtual ~IFactory(); 00043 00044 // Set Methods 00045 virtual void setParameter( const std::string name, const std::string value) = 0; 00046 virtual void setParameter( const std::string name, const u32 value) = 0; 00047 virtual void setMode( const int mode ) = 0; 00048 virtual void reset() = 0; 00049 00050 // CONST Methods 00051 virtual std::string getParameterString( const std::string name ) const = 0; 00052 virtual u32 getParameterNum( const std::string name ) const = 0; 00053 virtual int getMode( ) const = 0; 00054 00055 // DATA Definitions 00056 // standard modes. 00057 enum { AutoDetectMode, UnitTestMode }; 00058 enum { defaultMode = AutoDetectMode }; 00059 protected: 00060 IFactory(); 00061 }; 00062 00063 } 00064 00065 // always should be last thing in header file 00066 #include "smbios/config/abi_suffix.hpp" 00067 00068 #endif /* IFACTORY_H_INCLUDED */