bits: Added class factory interface (7/27)
Roy Shea
roy at cs.hmc.edu
Fri Nov 16 18:16:39 CST 2007
---
dlls/qmgr/Makefile.in | 1 +
dlls/qmgr/factory.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/qmgr/qmgr_private.h | 10 +++++-
3 files changed, 95 insertions(+), 1 deletions(-)
create mode 100644 dlls/qmgr/factory.c
diff --git a/dlls/qmgr/Makefile.in b/dlls/qmgr/Makefile.in
index 6975e0f..aa3440d 100644
--- a/dlls/qmgr/Makefile.in
+++ b/dlls/qmgr/Makefile.in
@@ -7,6 +7,7 @@ IMPORTS = kernel32
EXTRALIBS =
C_SRCS = \
+ factory.c \
qmgr_main.c \
qmgr.c
diff --git a/dlls/qmgr/factory.c b/dlls/qmgr/factory.c
new file mode 100644
index 0000000..daaedce
--- /dev/null
+++ b/dlls/qmgr/factory.c
@@ -0,0 +1,85 @@
+/*
+ * Class factory interface for Queue Manager (BITS)
+ *
+ * Copyright (C) 2007 Google (Roy Shea)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+
+#include "qmgr_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(qmgr_svchost);
+
+static ULONG WINAPI BITS_IClassFactory_AddRef(LPCLASSFACTORY iface)
+{
+ FIXME("Not implemented\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI BITS_IClassFactory_QueryInterface(
+ LPCLASSFACTORY iface,
+ REFIID riid,
+ LPVOID *ppvObj)
+{
+ FIXME("Not implemented\n");
+ return E_NOTIMPL;
+}
+
+static ULONG WINAPI BITS_IClassFactory_Release(LPCLASSFACTORY iface)
+{
+ FIXME("Not implemented\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI BITS_IClassFactory_CreateInstance(
+ LPCLASSFACTORY iface,
+ LPUNKNOWN pUnkOuter,
+ REFIID riid,
+ LPVOID *ppvObj)
+{
+ FIXME("Not implemented\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI BITS_IClassFactory_LockServer(
+ LPCLASSFACTORY iface,
+ BOOL fLock)
+{
+ FIXME("Not implemented\n");
+ return E_NOTIMPL;
+}
+
+static const IClassFactoryVtbl BITS_IClassFactory_Vtbl =
+{
+ BITS_IClassFactory_QueryInterface,
+ BITS_IClassFactory_AddRef,
+ BITS_IClassFactory_Release,
+ BITS_IClassFactory_CreateInstance,
+ BITS_IClassFactory_LockServer
+};
+
+ClassFactoryImpl BITS_ClassFactory =
+{
+ &BITS_IClassFactory_Vtbl,
+ 0
+};
+
diff --git a/dlls/qmgr/qmgr_private.h b/dlls/qmgr/qmgr_private.h
index d4ccce3..e354ffd 100644
--- a/dlls/qmgr/qmgr_private.h
+++ b/dlls/qmgr/qmgr_private.h
@@ -35,14 +35,22 @@
/* Count number of references to this DLL */
extern LONG dll_ref;
+/* Factory vtbl and related data */
+typedef struct
+{
+ const IClassFactoryVtbl *lpVtbl;
+ LONG ref;
+} ClassFactoryImpl;
+
/* Background copy manager vtbl and related data */
typedef struct
{
- const IBackgroundCopyManager *bitsVtbl;
+ const IBackgroundCopyManagerVtbl *bitsVtbl;
LONG ref;
} BackgroundCopyManagerImpl;
/* Single instance of the background copy manager used to create new instances */
+extern ClassFactoryImpl BITS_ClassFactory;
extern BackgroundCopyManagerImpl BITS_BackgroundCopyManager;
#endif /* __QMGR_PRIVATE_H__ */
--
1.5.3.1
More information about the wine-patches
mailing list