aboutsummaryrefslogtreecommitdiff
path: root/Src/xml/factory_xml.cpp
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/xml/factory_xml.cpp
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/xml/factory_xml.cpp')
-rw-r--r--Src/xml/factory_xml.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/Src/xml/factory_xml.cpp b/Src/xml/factory_xml.cpp
new file mode 100644
index 00000000..1e653320
--- /dev/null
+++ b/Src/xml/factory_xml.cpp
@@ -0,0 +1,68 @@
+#include "api__xml.h"
+#include "factory_xml.h"
+#include "XMLReader.h"
+
+static const char serviceName[] = "XML Parser";
+
+FOURCC XMLFactory::GetServiceType()
+{
+ return WaSvc::OBJECT;
+}
+
+const char *XMLFactory::GetServiceName()
+{
+ return serviceName;
+}
+
+GUID XMLFactory::GetGUID()
+{
+ return obj_xmlGUID;
+}
+
+void *XMLFactory::GetInterface(int global_lock)
+{
+ obj_xml *ifc=new XMLReader;
+// if (global_lock)
+// WASABI_API_SVC->service_lock(this, (void *)ifc);
+ return ifc;
+}
+
+int XMLFactory::SupportNonLockingInterface()
+{
+ return 1;
+}
+
+int XMLFactory::ReleaseInterface(void *ifc)
+{
+ //WASABI_API_SVC->service_unlock(ifc);
+ obj_xml *xml = static_cast<obj_xml *>(ifc);
+ XMLReader *xmlreader = static_cast<XMLReader *>(xml);
+ delete xmlreader;
+ return 1;
+}
+
+const char *XMLFactory::GetTestString()
+{
+ return 0;
+}
+
+int XMLFactory::ServiceNotify(int msg, int param1, int param2)
+{
+ return 1;
+}
+
+#ifdef CBCLASS
+#undef CBCLASS
+#endif
+
+#define CBCLASS XMLFactory
+START_DISPATCH;
+CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
+CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
+CB(WASERVICEFACTORY_GETGUID, GetGUID)
+CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
+CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
+CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
+CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
+CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
+END_DISPATCH;