aboutsummaryrefslogtreecommitdiff
path: root/Src/Winamp/InternetConfigGroup.cpp
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/InternetConfigGroup.cpp
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Winamp/InternetConfigGroup.cpp')
-rw-r--r--Src/Winamp/InternetConfigGroup.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/Src/Winamp/InternetConfigGroup.cpp b/Src/Winamp/InternetConfigGroup.cpp
new file mode 100644
index 00000000..0a625525
--- /dev/null
+++ b/Src/Winamp/InternetConfigGroup.cpp
@@ -0,0 +1,56 @@
+/** (c) Nullsoft, Inc. C O N F I D E N T I A L
+ ** Filename:
+ ** Project:
+ ** Description:
+ ** Author: Ben Allison benski@nullsoft.com
+ ** Created:
+ **/
+#include "main.h"
+#include "InternetConfigGroup.h"
+
+#include "../Agave/Config/ifc_configitem.h"
+#include "WinampAttributes.h"
+#include "../nu/ns_wc.h"
+
+class ProxyConfigItem : public ifc_configitem
+{
+public:
+ const wchar_t *GetString()
+ {
+ static wchar_t blah[256];
+ if (config_proxy[0])
+ MultiByteToWideCharSZ(CP_ACP, 0, config_proxy, -1, blah, 256);
+ else
+ return 0;
+ return blah;
+ }
+protected:
+ RECVS_DISPATCH;
+};
+
+#define CBCLASS ProxyConfigItem
+START_DISPATCH;
+CB(IFC_CONFIGITEM_GETSTRING, GetString)
+END_DISPATCH;
+#undef CBCLASS
+
+static ProxyConfigItem proxyConfigItem;
+
+ifc_configitem *InternetConfigGroup::GetItem(const wchar_t *name)
+{
+ if (!wcscmp(name, L"proxy"))
+ return &proxyConfigItem;
+ else if (!wcscmp(name, L"proxy80"))
+ return &config_proxy80;
+
+ return 0;
+}
+
+
+
+#define CBCLASS InternetConfigGroup
+START_DISPATCH;
+CB(IFC_CONFIGGROUP_GETITEM, GetItem)
+CB(IFC_CONFIGGROUP_GETGUID, GetGUID)
+END_DISPATCH;
+#undef CBCLASS \ No newline at end of file