2 * Queue Manager (BITS) Job Enumerator
4 * Copyright 2007 Google (Roy Shea)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/debug.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(qmgr
);
26 static void EnumBackgroundCopyJobsDestructor(EnumBackgroundCopyJobsImpl
*This
)
28 HeapFree(GetProcessHeap(), 0, This
);
31 static ULONG WINAPI
BITS_IEnumBackgroundCopyJobs_AddRef(
32 IEnumBackgroundCopyJobs
* iface
)
34 EnumBackgroundCopyJobsImpl
*This
= (EnumBackgroundCopyJobsImpl
*) iface
;
35 return InterlockedIncrement(&This
->ref
);
38 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_QueryInterface(
39 IEnumBackgroundCopyJobs
* iface
,
43 EnumBackgroundCopyJobsImpl
*This
= (EnumBackgroundCopyJobsImpl
*) iface
;
44 TRACE("IID: %s\n", debugstr_guid(riid
));
46 if (IsEqualGUID(riid
, &IID_IUnknown
)
47 || IsEqualGUID(riid
, &IID_IEnumBackgroundCopyJobs
))
49 *ppvObject
= &This
->lpVtbl
;
50 BITS_IEnumBackgroundCopyJobs_AddRef(iface
);
58 static ULONG WINAPI
BITS_IEnumBackgroundCopyJobs_Release(
59 IEnumBackgroundCopyJobs
* iface
)
61 EnumBackgroundCopyJobsImpl
*This
= (EnumBackgroundCopyJobsImpl
*) iface
;
62 ULONG ref
= InterlockedDecrement(&This
->ref
);
65 EnumBackgroundCopyJobsDestructor(This
);
70 /*** IEnumBackgroundCopyJobs methods ***/
71 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_Next(
72 IEnumBackgroundCopyJobs
* iface
,
74 IBackgroundCopyJob
**rgelt
,
77 FIXME("Not implemented\n");
81 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_Skip(
82 IEnumBackgroundCopyJobs
* iface
,
85 FIXME("Not implemented\n");
89 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_Reset(
90 IEnumBackgroundCopyJobs
* iface
)
92 FIXME("Not implemented\n");
96 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_Clone(
97 IEnumBackgroundCopyJobs
* iface
,
98 IEnumBackgroundCopyJobs
**ppenum
)
100 FIXME("Not implemented\n");
104 static HRESULT WINAPI
BITS_IEnumBackgroundCopyJobs_GetCount(
105 IEnumBackgroundCopyJobs
* iface
,
108 FIXME("Not implemented\n");
112 static const IEnumBackgroundCopyJobsVtbl BITS_IEnumBackgroundCopyJobs_Vtbl
=
114 BITS_IEnumBackgroundCopyJobs_QueryInterface
,
115 BITS_IEnumBackgroundCopyJobs_AddRef
,
116 BITS_IEnumBackgroundCopyJobs_Release
,
117 BITS_IEnumBackgroundCopyJobs_Next
,
118 BITS_IEnumBackgroundCopyJobs_Skip
,
119 BITS_IEnumBackgroundCopyJobs_Reset
,
120 BITS_IEnumBackgroundCopyJobs_Clone
,
121 BITS_IEnumBackgroundCopyJobs_GetCount
124 HRESULT
EnumBackgroundCopyJobsConstructor(LPVOID
*ppObj
,
125 IBackgroundCopyManager
* copyManager
)
127 EnumBackgroundCopyJobsImpl
*This
;
129 TRACE("%p, %p)\n", ppObj
, copyManager
);
131 This
= HeapAlloc(GetProcessHeap(), 0, sizeof *This
);
133 return E_OUTOFMEMORY
;
134 This
->lpVtbl
= &BITS_IEnumBackgroundCopyJobs_Vtbl
;
137 *ppObj
= &This
->lpVtbl
;