ddnet/src/engine/config.h
Alexander Akulich c2f276cee1 Port CConfig API from the upstream (0.7.5)
The old (g_Config) API is kept to not break the stuff.

See commits:
    de5859b371
    78076761eb
2021-01-10 17:10:19 +03:00

27 lines
725 B
C++

/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef ENGINE_CONFIG_H
#define ENGINE_CONFIG_H
#include "kernel.h"
class IConfigManager : public IInterface
{
MACRO_INTERFACE("config", 0)
public:
typedef void (*SAVECALLBACKFUNC)(IConfigManager *pConfig, void *pUserData);
virtual void Init() = 0;
virtual void Reset() = 0;
virtual bool Save() = 0;
virtual class CConfig *Values() = 0;
virtual void RegisterCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData) = 0;
virtual void WriteLine(const char *pLine) = 0;
};
extern IConfigManager *CreateConfigManager();
#endif