reg: Support recursion in the 'copy' command.
[wine.git] / include / mscat.h
blob366dbbb0d1ee9f8f0bc13099e70ff7635bd26d17
1 /*
2 * Copyright (C) 2004 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_MSCAT_H
20 #define __WINE_MSCAT_H
22 #include <mssip.h>
24 typedef HANDLE HCATADMIN;
25 typedef HANDLE HCATINFO;
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 #define CRYPTCAT_ATTR_NAMEASCII 0x00000001
32 #define CRYPTCAT_ATTR_NAMEOBJID 0x00000002
33 #define CRYPTCAT_ATTR_DATAASCII 0x00010000
34 #define CRYPTCAT_ATTR_DATAOBJID 0x00020000
35 #define CRYPTCAT_ATTR_DATAREPLACE 0x00040000
36 #define CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY 0x01000000
37 #define CRYPTCAT_ATTR_AUTHENTICATED 0x10000000
38 #define CRYPTCAT_ATTR_UNAUTHENTICATED 0x20000000
40 #define CRYPTCAT_OPEN_CREATENEW 0x00000001
41 #define CRYPTCAT_OPEN_ALWAYS 0x00000002
42 #define CRYPTCAT_OPEN_EXISTING 0x00000004
43 #define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000
44 #define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000
45 #define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000
46 #define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000
47 #define CRYPTCAT_OPEN_SORTED 0x40000000
48 #define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000
50 #define CRYPTCAT_E_AREA_HEADER 0x00000000
51 #define CRYPTCAT_E_AREA_MEMBER 0x00010000
52 #define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000
54 #define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001
55 #define CRYPTCAT_E_CDF_DUPLICATE 0x00000002
56 #define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004
58 #define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001
59 #define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002
60 #define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004
62 #define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001
63 #define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002
64 #define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004
66 #define CRYPTCAT_VERSION_1 0x100
67 #define CRYPTCAT_VERSION_2 0x200
69 #include <pshpack8.h>
71 typedef struct CRYPTCATATTRIBUTE_
73 DWORD cbStruct;
74 LPWSTR pwszReferenceTag;
75 DWORD dwAttrTypeAndAction;
76 DWORD cbValue;
77 BYTE *pbValue;
78 DWORD dwReserved;
79 } CRYPTCATATTRIBUTE;
81 typedef struct CRYPTCATMEMBER_
83 DWORD cbStruct;
84 LPWSTR pwszReferenceTag;
85 LPWSTR pwszFileName;
86 GUID gSubjectType;
87 DWORD fdwMemberFlags;
88 struct SIP_INDIRECT_DATA_* pIndirectData;
89 DWORD dwCertVersion;
90 DWORD dwReserved;
91 HANDLE hReserved;
92 CRYPT_ATTR_BLOB sEncodedIndirectData;
93 CRYPT_ATTR_BLOB sEncodedMemberInfo;
94 } CRYPTCATMEMBER;
96 typedef struct CATALOG_INFO_
98 DWORD cbStruct;
99 WCHAR wszCatalogFile[MAX_PATH];
100 } CATALOG_INFO;
102 typedef struct CRYPTCATCDF_
104 DWORD cbStruct;
105 HANDLE hFile;
106 DWORD dwCurFilePos;
107 DWORD dwLastMemberOffset;
108 BOOL fEOF;
109 LPWSTR pwszResultDir;
110 HANDLE hCATStore;
111 } CRYPTCATCDF;
113 #include <poppack.h>
115 typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *);
117 BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD);
118 BOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN*,const GUID*,const WCHAR*,const CERT_STRONG_SIGN_PARA*,DWORD);
119 HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD);
120 BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD);
121 BOOL WINAPI CryptCATAdminCalcHashFromFileHandle2(HCATADMIN,HANDLE,DWORD*,BYTE*,DWORD);
122 HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*);
123 BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD);
124 BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
125 BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
126 BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD);
127 BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
128 BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *);
129 CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *,
130 PFN_CDF_PARSE_ERROR_CALLBACK);
131 LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR,
132 PFN_CDF_PARSE_ERROR_CALLBACK,
133 CRYPTCATMEMBER **, BOOL, LPVOID);
134 CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK);
135 BOOL WINAPI CryptCATClose(HANDLE);
136 CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *);
137 CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *);
138 CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);
139 CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
140 CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
141 CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
142 HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);
143 BOOL WINAPI CryptCATPersistStore(HANDLE catalog);
144 CRYPTCATATTRIBUTE * WINAPI CryptCATPutAttrInfo(HANDLE catalog, CRYPTCATMEMBER *member, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
145 CRYPTCATATTRIBUTE * WINAPI CryptCATPutCatAttrInfo(HANDLE catalog, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
146 CRYPTCATMEMBER * WINAPI CryptCATPutMemberInfo(HANDLE catalog, WCHAR *filename, WCHAR *member, GUID *subject, DWORD version, DWORD size, BYTE *data);
148 #ifdef __cplusplus
150 #endif
152 #endif