mirror of
https://github.com/WinampDesktop/winamp.git
synced 2024-12-12 10:11:00 -05:00
150 lines
5.1 KiB
C
150 lines
5.1 KiB
C
|
// ----------------------------------------------------------------------------
|
||
|
// Generated by InterfaceFactory [Thu May 15 21:06:24 2003]
|
||
|
//
|
||
|
// File : api_config.h
|
||
|
// Class : api_config
|
||
|
// class layer : Dispatchable Interface
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
#ifndef __API_CONFIG_H
|
||
|
#define __API_CONFIG_H
|
||
|
|
||
|
#include <bfc/dispatch.h>
|
||
|
#include <bfc/platform/types.h>
|
||
|
|
||
|
class CfgItem;
|
||
|
class ConfigFile;
|
||
|
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
class NOVTABLE api_config: public Dispatchable
|
||
|
{
|
||
|
protected:
|
||
|
api_config() {}
|
||
|
~api_config() {}
|
||
|
public:
|
||
|
void config_registerCfgItem(CfgItem *cfgitem);
|
||
|
void config_deregisterCfgItem(CfgItem *cfgitem);
|
||
|
int config_getNumCfgItems();
|
||
|
CfgItem *config_enumCfgItem(int n);
|
||
|
CfgItem *config_getCfgItemByGuid(GUID g);
|
||
|
void setIntPrivate(const wchar_t *name, int val);
|
||
|
int getIntPrivate(const wchar_t *name, int def_val);
|
||
|
void setIntArrayPrivate(const wchar_t *name, const int *val, int nval);
|
||
|
int getIntArrayPrivate(const wchar_t *name, int *val, int nval);
|
||
|
void setStringPrivate(const wchar_t *name, const wchar_t *str);
|
||
|
int getStringPrivate(const wchar_t *name, wchar_t *buf, int buf_len, const wchar_t *default_str);
|
||
|
int getStringPrivateLen(const wchar_t *name);
|
||
|
void setIntPublic(const wchar_t *name, int val);
|
||
|
int getIntPublic(const wchar_t *name, int def_val);
|
||
|
void setStringPublic(const wchar_t *name, const wchar_t *str);
|
||
|
int getStringPublic(const wchar_t *name, wchar_t *buf, int buf_len, const wchar_t *default_str);
|
||
|
|
||
|
protected:
|
||
|
enum {
|
||
|
API_CONFIG_CONFIG_REGISTERCFGITEM = 10,
|
||
|
API_CONFIG_CONFIG_DEREGISTERCFGITEM = 20,
|
||
|
API_CONFIG_CONFIG_GETNUMCFGITEMS = 30,
|
||
|
API_CONFIG_CONFIG_ENUMCFGITEM = 40,
|
||
|
API_CONFIG_CONFIG_GETCFGITEMBYGUID = 50,
|
||
|
API_CONFIG_SETINTPRIVATE = 60,
|
||
|
API_CONFIG_GETINTPRIVATE = 70,
|
||
|
API_CONFIG_SETINTARRAYPRIVATE = 80,
|
||
|
API_CONFIG_GETINTARRAYPRIVATE = 90,
|
||
|
API_CONFIG_SETSTRINGPRIVATE = 100,
|
||
|
API_CONFIG_GETSTRINGPRIVATE = 110,
|
||
|
API_CONFIG_GETSTRINGPRIVATELEN = 120,
|
||
|
API_CONFIG_SETINTPUBLIC = 130,
|
||
|
API_CONFIG_GETINTPUBLIC = 140,
|
||
|
API_CONFIG_SETSTRINGPUBLIC = 150,
|
||
|
API_CONFIG_GETSTRINGPUBLIC = 160,
|
||
|
};
|
||
|
};
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
inline void api_config::config_registerCfgItem(CfgItem *cfgitem) {
|
||
|
_voidcall(API_CONFIG_CONFIG_REGISTERCFGITEM, cfgitem);
|
||
|
}
|
||
|
|
||
|
inline void api_config::config_deregisterCfgItem(CfgItem *cfgitem) {
|
||
|
_voidcall(API_CONFIG_CONFIG_DEREGISTERCFGITEM, cfgitem);
|
||
|
}
|
||
|
|
||
|
inline int api_config::config_getNumCfgItems() {
|
||
|
int __retval = _call(API_CONFIG_CONFIG_GETNUMCFGITEMS, (int)0);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline CfgItem *api_config::config_enumCfgItem(int n) {
|
||
|
CfgItem *__retval = _call(API_CONFIG_CONFIG_ENUMCFGITEM, (CfgItem *)NULL, n);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline CfgItem *api_config::config_getCfgItemByGuid(GUID g) {
|
||
|
CfgItem *__retval = _call(API_CONFIG_CONFIG_GETCFGITEMBYGUID, (CfgItem *)NULL, g);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline void api_config::setIntPrivate(const wchar_t *name, int val) {
|
||
|
_voidcall(API_CONFIG_SETINTPRIVATE, name, val);
|
||
|
}
|
||
|
|
||
|
inline int api_config::getIntPrivate(const wchar_t *name, int def_val) {
|
||
|
int __retval = _call(API_CONFIG_GETINTPRIVATE, (int)0, name, def_val);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline void api_config::setIntArrayPrivate(const wchar_t *name, const int *val, int nval) {
|
||
|
_voidcall(API_CONFIG_SETINTARRAYPRIVATE, name, val, nval);
|
||
|
}
|
||
|
|
||
|
inline int api_config::getIntArrayPrivate(const wchar_t *name, int *val, int nval) {
|
||
|
int __retval = _call(API_CONFIG_GETINTARRAYPRIVATE, (int)0, name, val, nval);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline void api_config::setStringPrivate(const wchar_t *name, const wchar_t *str) {
|
||
|
_voidcall(API_CONFIG_SETSTRINGPRIVATE, name, str);
|
||
|
}
|
||
|
|
||
|
inline int api_config::getStringPrivate(const wchar_t *name, wchar_t *buf, int buf_len, const wchar_t *default_str) {
|
||
|
int __retval = _call(API_CONFIG_GETSTRINGPRIVATE, (int)0, name, buf, buf_len, default_str);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline int api_config::getStringPrivateLen(const wchar_t *name) {
|
||
|
int __retval = _call(API_CONFIG_GETSTRINGPRIVATELEN, (int)0, name);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline void api_config::setIntPublic(const wchar_t *name, int val) {
|
||
|
_voidcall(API_CONFIG_SETINTPUBLIC, name, val);
|
||
|
}
|
||
|
|
||
|
inline int api_config::getIntPublic(const wchar_t *name, int def_val) {
|
||
|
int __retval = _call(API_CONFIG_GETINTPUBLIC, (int)0, name, def_val);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
inline void api_config::setStringPublic(const wchar_t *name, const wchar_t *str) {
|
||
|
_voidcall(API_CONFIG_SETSTRINGPUBLIC, name, str);
|
||
|
}
|
||
|
|
||
|
inline int api_config::getStringPublic(const wchar_t *name, wchar_t *buf, int buf_len, const wchar_t *default_str) {
|
||
|
int __retval = _call(API_CONFIG_GETSTRINGPUBLIC, (int)0, name, buf, buf_len, default_str);
|
||
|
return __retval;
|
||
|
}
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
|
||
|
// {470B890C-4747-4113-ABA5-A8F8F4F8AB7E}
|
||
|
static const GUID configApiServiceGuid =
|
||
|
{ 0x470b890c, 0x4747, 0x4113, { 0xab, 0xa5, 0xa8, 0xf8, 0xf4, 0xf8, 0xab, 0x7e } };
|
||
|
|
||
|
extern api_config *configApi;
|
||
|
|
||
|
#endif // __API_CONFIG_H
|