Files
csgo2_tiny_server_plugin_sy…/csgo2/sdk/public/IAppSystem.h
2023-10-01 02:28:13 +08:00

63 lines
1.3 KiB
C++

#pragma once
#include "../sdk.h"
struct AppSystemInfo_t
{
const char* m_pModuleName;
const char* m_pInterfaceName;
};
enum InitReturnVal_t
{
INIT_FAILED = 0,
INIT_OK,
INIT_LAST_VAL,
};
enum AppSystemTier_t
{
APP_SYSTEM_TIER0 = 0,
APP_SYSTEM_TIER1,
APP_SYSTEM_TIER2,
APP_SYSTEM_TIER3,
APP_SYSTEM_TIER4,
APP_SYSTEM_TIER_OTHER,
};
enum BuildType_t
{
kBuildTypeRelease = 2
};
class IAppSystem
{
public:
// Here's where the app systems get to learn about each other
virtual bool Connect(void* factory) = 0;
virtual void Disconnect() = 0;
// Here's where systems can access other interfaces implemented by this object
// Returns NULL if it doesn't implement the requested interface
virtual void* QueryInterface(const char* pInterfaceName) = 0;
// Init, shutdown
virtual InitReturnVal_t Init() = 0;
virtual void Shutdown() = 0;
virtual void PreShutdown() = 0;
// Returns all dependent libraries
virtual const AppSystemInfo_t* GetDependencies() = 0;
// Returns the tier
virtual AppSystemTier_t GetTier() = 0;
// Reconnect to a particular interface
virtual void Reconnect(void* factory, const char* pInterfaceName) = 0;
// Returns whether or not the app system is a singleton
virtual bool IsSingleton() = 0;
virtual BuildType_t GetBuildType() = 0;
};