Changeset 570
- Timestamp:
- 06/22/06 19:53:31 (3 years ago)
- Files:
-
- nepenthes/trunk/nepenthes-core/include/Module.hpp (modified) (3 diffs)
- nepenthes/trunk/nepenthes-core/src/Nepenthes.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/nepenthes-core/include/Module.hpp
r332 r570 29 29 30 30 #ifndef HAVE_MODULE_HPP 31 #define HAVE_MODULE_HPP31 #define HAVE_MODULE_HPP 32 32 33 #include <string>33 #include <string> 34 34 35 #ifdef WIN3236 #include <windows.h>37 #endif35 #ifdef WIN32 36 #include <windows.h> 37 #endif 38 38 39 39 using namespace std; … … 51 51 * quite everything in nepenthes is a module, are you? 52 52 */ 53 class Module 54 { 55 public: 56 virtual ~Module(){}; 57 virtual bool Init()=0; 58 virtual bool Exit()=0; 53 class Module 54 { 55 public: 56 virtual ~Module() 57 { 58 }; 59 virtual bool Init()=0; 60 virtual bool Exit()=0; 59 61 60 virtual void setConfig(Config *config)61 {62 m_Config = config;63 }62 virtual void setConfig(Config *config) 63 { 64 m_Config = config; 65 } 64 66 65 67 66 68 #ifdef WIN32 67 virtual void setDlHandle(HMODULE handle)68 {69 m_DlHandle = handle;70 }69 virtual void setDlHandle(HMODULE handle) 70 { 71 m_DlHandle = handle; 72 } 71 73 #else 72 virtual void setDlHandle(void *handle)73 {74 m_DlHandle = handle;75 }74 virtual void setDlHandle(void *handle) 75 { 76 m_DlHandle = handle; 77 } 76 78 #endif 77 79 78 80 79 81 #ifdef WIN32 80 virtual HMODULE getDlHandle()81 {82 return m_DlHandle;83 }82 virtual HMODULE getDlHandle() 83 { 84 return m_DlHandle; 85 } 84 86 #else 85 virtual void *getDlHandle()86 {87 return m_DlHandle;88 }87 virtual void *getDlHandle() 88 { 89 return m_DlHandle; 90 } 89 91 #endif 90 92 91 93 92 virtual Config *getConfig()93 {94 return m_Config;95 }94 virtual Config *getConfig() 95 { 96 return m_Config; 97 } 96 98 97 virtual string getModuleDescription()98 {99 return m_ModuleDescription;100 }99 virtual string getModuleDescription() 100 { 101 return m_ModuleDescription; 102 } 101 103 102 virtual string getModuleName()103 {104 return m_ModuleName;105 }106 protected:104 virtual string getModuleName() 105 { 106 return m_ModuleName; 107 } 108 protected: 107 109 108 110 ModuleManager *m_ModuleManager; 109 Nepenthes *m_Nepenthes;111 Nepenthes *m_Nepenthes; 110 112 111 string m_ModuleName;112 string m_ModuleDescription;113 string m_ModuleRevision;113 string m_ModuleName; 114 string m_ModuleDescription; 115 string m_ModuleRevision; 114 116 115 117 #ifdef WIN32 … … 120 122 * and we need to dlcose() the module 121 123 */ 122 void *m_DlHandle;124 void *m_DlHandle; 123 125 #endif 124 126 125 Config *m_Config;126 };127 Config *m_Config; 128 }; 127 129 128 130 nepenthes/trunk/nepenthes-core/src/Nepenthes.cpp
r560 r570 1692 1692 #if defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) 1693 1693 # define MY_ARCH "Alpha" 1694 #elif defined(__arm__) 1695 # if defined(__ARMEB__) 1696 # define MY_ARCH "ARMeb" 1697 # else 1698 # define MY_ARCH "ARM" 1699 # endif 1694 1700 #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL) 1695 1701 # define MY_ARCH "x86" … … 1699 1705 # define MY_ARCH "Intel Architecture-64" 1700 1706 #elif defined(__mips__) || defined(__mips) || defined(__MIPS__) 1701 # define MY_ARCH "MIPS" 1707 # if defined(__mips32__) || defined(__mips32) 1708 # define MY_ARCH "MIPS32" 1709 # else 1710 # define MY_ARCH "MIPS" 1711 # endif 1702 1712 #elif defined(__hppa__) || defined(__hppa) 1703 1713 # define MY_ARCH "PA RISC"
