dvander@541: // This file is used for backwards compatibility testing dvander@541: // It allows us to test binary backwards compatibility by using an older include file HERE: dvander@541: #include "sourcehook.h" // <-- here dvander@541: // There. main.cpp which implements all of the following function is always usign sourcehook.h dvander@541: // and the up-to-date sourcehook_impl.h/sourcehook.cpp. The tests use this file however. dvander@541: // If the test needs an up-to-date version (like the recall test), it can simply dvander@541: // #include "sourcehook.h" before including this, thus overriding our decision. dvander@541: dvander@541: dvander@541: SourceHook::ISourceHook *Test_Factory(); dvander@541: void Test_Delete(SourceHook::ISourceHook *shptr); dvander@541: dvander@541: struct CSHPtrAutoDestruction dvander@541: { dvander@541: SourceHook::ISourceHook *m_SHPtr; dvander@541: CSHPtrAutoDestruction(SourceHook::ISourceHook *shptr) : m_SHPtr(shptr) {} dvander@541: ~CSHPtrAutoDestruction() { Test_Delete(m_SHPtr); } dvander@541: }; dvander@541: dvander@541: #define GET_SHPTR(var) var = Test_Factory(); CSHPtrAutoDestruction ___autodestruction(var); dvander@541: dvander@541: // Access to CSourceHookImpl functions dvander@541: void Test_CompleteShutdown(SourceHook::ISourceHook *shptr); dvander@541: bool Test_IsPluginInUse(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); dvander@541: void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); dvander@541: void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); dvander@541: void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);