sourcehook/test/sourcehook_test.h
author Scott Ehlert <ds@alliedmods.net>
Sun Aug 13 11:34:30 2006 +0000 (2006-08-13)
changeset 238 c27105949293
parent 162 a95db73792e5
child 380 f9e21a2ac558
permissions -rw-r--r--
Wow, lots of stuff here
1) Bumped version to 1.3
2) Fixed MSVC project files to compile and link against latest SDK
3) Fixed Linux compilation of stub_mm and sample_mm against new SDK (added -msse to makefiles)
4) Removed -fpermissive and -Wno-deprecated from Linux makefiles
5) Added -Wall -Wno-non-virtual-dtor -Werror to Linux makefiles
6) Stub_mm and sample_mm no longer dynamically link to libstdc++
7) SourceMM, stub_mm, and sample_mm compile cleanly (no warnings) with GCC 3.4.x and 4.x
     1 // This file is used for backwards compatibility testing
     2 // It allows us to test binary backwards compatibility by using an older include file HERE:
     3 #include "sourcehook.h"			// <-- here
     4 // There. main.cpp which implements all of the following function is always usign sourcehook.h
     5 // and the up-to-date sourcehook_impl.h/sourcehook.cpp. The tests use this file however.
     6 // If the test needs an up-to-date version (like the recall test), it can simply
     7 // #include "sourcehook.h" before including this, thus overriding our decision.
     8 
     9 
    10 SourceHook::ISourceHook *Test_Factory();
    11 void Test_Delete(SourceHook::ISourceHook *shptr);
    12 
    13 struct CSHPtrAutoDestruction
    14 {
    15 	SourceHook::ISourceHook *m_SHPtr;
    16 	CSHPtrAutoDestruction(SourceHook::ISourceHook *shptr) : m_SHPtr(shptr) {}
    17 	~CSHPtrAutoDestruction() { Test_Delete(m_SHPtr); }
    18 };
    19 
    20 #define GET_SHPTR(var) var = Test_Factory(); CSHPtrAutoDestruction ___autodestruction(var);
    21 
    22 // Access to CSourceHookImpl functions
    23 void Test_CompleteShutdown(SourceHook::ISourceHook *shptr);
    24 bool Test_IsPluginInUse(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
    25 void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
    26 void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
    27 void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);