2007-12-20 05:02:23 +01:00
|
|
|
/*
|
|
|
|
* Queue Manager definitions
|
|
|
|
*
|
|
|
|
* Copyright 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QMGR_H__
|
|
|
|
#define __QMGR_H__
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "objbase.h"
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
#include "bits.h"
|
|
|
|
|
2008-02-11 20:09:02 +01:00
|
|
|
#include <string.h>
|
2008-02-27 02:51:20 +01:00
|
|
|
#include "wine/list.h"
|
2008-02-11 20:09:02 +01:00
|
|
|
|
2008-02-23 00:05:26 +01:00
|
|
|
/* Background copy job vtbl and related data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IBackgroundCopyJobVtbl *lpVtbl;
|
|
|
|
LONG ref;
|
2008-02-23 00:06:17 +01:00
|
|
|
LPWSTR displayName;
|
|
|
|
BG_JOB_TYPE type;
|
|
|
|
GUID jobId;
|
2008-02-27 02:51:20 +01:00
|
|
|
struct list files;
|
|
|
|
BG_JOB_PROGRESS jobProgress;
|
2008-02-29 04:01:29 +01:00
|
|
|
struct list entryFromQmgr;
|
2008-02-23 00:05:26 +01:00
|
|
|
} BackgroundCopyJobImpl;
|
|
|
|
|
2008-02-26 02:42:46 +01:00
|
|
|
/* Enum background copy jobs vtbl and related data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IEnumBackgroundCopyJobsVtbl *lpVtbl;
|
|
|
|
LONG ref;
|
|
|
|
} EnumBackgroundCopyJobsImpl;
|
|
|
|
|
2008-02-27 02:52:04 +01:00
|
|
|
/* Enum background copy files vtbl and related data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IEnumBackgroundCopyFilesVtbl *lpVtbl;
|
|
|
|
LONG ref;
|
|
|
|
IBackgroundCopyFile **files;
|
|
|
|
ULONG numFiles;
|
|
|
|
ULONG indexFiles;
|
|
|
|
} EnumBackgroundCopyFilesImpl;
|
|
|
|
|
2008-02-27 02:50:43 +01:00
|
|
|
/* Background copy file vtbl and related data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IBackgroundCopyFileVtbl *lpVtbl;
|
|
|
|
LONG ref;
|
|
|
|
BG_FILE_INFO info;
|
2008-02-29 04:00:12 +01:00
|
|
|
BG_FILE_PROGRESS fileProgress;
|
2008-02-27 02:51:20 +01:00
|
|
|
struct list entryFromJob;
|
2008-02-27 02:50:43 +01:00
|
|
|
} BackgroundCopyFileImpl;
|
|
|
|
|
2007-12-20 05:02:23 +01:00
|
|
|
/* Background copy manager vtbl and related data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IBackgroundCopyManagerVtbl *lpVtbl;
|
|
|
|
LONG ref;
|
2008-02-29 04:01:29 +01:00
|
|
|
struct list jobs;
|
2007-12-20 05:02:23 +01:00
|
|
|
} BackgroundCopyManagerImpl;
|
|
|
|
|
2008-01-22 20:55:16 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const IClassFactoryVtbl *lpVtbl;
|
|
|
|
} ClassFactoryImpl;
|
|
|
|
|
|
|
|
extern ClassFactoryImpl BITS_ClassFactory;
|
|
|
|
|
2007-12-20 05:02:23 +01:00
|
|
|
HRESULT BackgroundCopyManagerConstructor(IUnknown *pUnkOuter, LPVOID *ppObj);
|
2008-02-23 00:06:17 +01:00
|
|
|
HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
|
|
|
|
GUID *pJobId, LPVOID *ppObj);
|
2008-02-26 02:42:46 +01:00
|
|
|
HRESULT EnumBackgroundCopyJobsConstructor(LPVOID *ppObj,
|
|
|
|
IBackgroundCopyManager* copyManager);
|
2008-02-27 02:51:20 +01:00
|
|
|
HRESULT BackgroundCopyFileConstructor(LPCWSTR remoteName,
|
|
|
|
LPCWSTR localName, LPVOID *ppObj);
|
2008-02-27 02:52:04 +01:00
|
|
|
HRESULT EnumBackgroundCopyFilesConstructor(LPVOID *ppObj,
|
|
|
|
IBackgroundCopyJob* copyJob);
|
2007-12-20 05:02:23 +01:00
|
|
|
|
2008-02-11 20:09:02 +01:00
|
|
|
/* Little helper functions */
|
|
|
|
static inline char *
|
|
|
|
qmgr_strdup(const char *s)
|
|
|
|
{
|
|
|
|
size_t n = strlen(s) + 1;
|
|
|
|
char *d = HeapAlloc(GetProcessHeap(), 0, n);
|
|
|
|
return d ? memcpy(d, s, n) : NULL;
|
|
|
|
}
|
|
|
|
|
2007-12-20 05:02:23 +01:00
|
|
|
#endif /* __QMGR_H__ */
|