OLD | NEW |
| (Empty) |
1 // Split/OutHandler.cpp | |
2 | |
3 #include "StdAfx.h" | |
4 | |
5 #include "SplitHandler.h" | |
6 #include "../../../Windows/PropVariant.h" | |
7 #include "../../../Common/ComTry.h" | |
8 #include "../../../Common/StringToInt.h" | |
9 | |
10 using namespace NWindows; | |
11 | |
12 namespace NArchive { | |
13 namespace NSplit { | |
14 | |
15 /* | |
16 STDMETHODIMP CHandler::GetFileTimeType(UInt32 *type) | |
17 { | |
18 *type = NFileTimeType::kWindows; | |
19 return S_OK; | |
20 } | |
21 | |
22 STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
ems, | |
23 IArchiveUpdateCallback *updateCallback) | |
24 { | |
25 COM_TRY_BEGIN | |
26 | |
27 if (numItems != 1) | |
28 return E_INVALIDARG; | |
29 | |
30 UInt64 volumeSize = 0; | |
31 | |
32 CMyComPtr<IArchiveUpdateCallback2> callback2; | |
33 updateCallback->QueryInterface(IID_IArchiveUpdateCallback2, | |
34 (void **)&callback2); | |
35 | |
36 RINOK(callback2->GetVolumeSize(0, &volumeSize)); | |
37 | |
38 Int32 newData; | |
39 Int32 newProperties; | |
40 UInt32 indexInArchive; | |
41 if (!updateCallback) | |
42 return E_FAIL; | |
43 | |
44 UInt32 fileIndex = 0; | |
45 RINOK(updateCallback->GetUpdateItemInfo(fileIndex, | |
46 &newData, &newProperties, &indexInArchive)); | |
47 | |
48 if (newProperties != 0) | |
49 { | |
50 { | |
51 NCOM::CPropVariant prop; | |
52 RINOK(updateCallback->GetProperty(fileIndex, kpidIsFolder, &prop)); | |
53 if (prop.vt == VT_EMPTY) | |
54 { | |
55 } | |
56 else if (prop.vt != VT_BOOL) | |
57 return E_INVALIDARG; | |
58 else | |
59 { | |
60 if (prop.boolVal != VARIANT_FALSE) | |
61 return E_INVALIDARG; | |
62 } | |
63 } | |
64 { | |
65 NCOM::CPropVariant prop; | |
66 RINOK(updateCallback->GetProperty(fileIndex, kpidIsAnti, &prop)); | |
67 if (prop.vt == VT_EMPTY) | |
68 { | |
69 } | |
70 else if (prop.vt != VT_BOOL) | |
71 return E_INVALIDARG; | |
72 else | |
73 { | |
74 if (prop.boolVal != VARIANT_FALSE) | |
75 return E_INVALIDARG; | |
76 } | |
77 } | |
78 } | |
79 UInt64 newSize; | |
80 bool thereIsCopyData = false; | |
81 if (newData != 0) | |
82 { | |
83 NCOM::CPropVariant prop; | |
84 RINOK(updateCallback->GetProperty(fileIndex, kpidSize, &prop)); | |
85 if (prop.vt != VT_UI8) | |
86 return E_INVALIDARG; | |
87 newSize = prop.uhVal.QuadPart; | |
88 } | |
89 else | |
90 thereIsCopyData = true; | |
91 | |
92 UInt64 pos = 0; | |
93 while(pos < newSize) | |
94 { | |
95 | |
96 } | |
97 return S_OK; | |
98 COM_TRY_END | |
99 } | |
100 */ | |
101 | |
102 }} | |
OLD | NEW |