Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SplitHandlerOut.cpp « Split « Archive « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6edf86f4ad3c0e00388faa1fb44a13581dde8cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Split/OutHandler.cpp

#include "StdAfx.h"

#include "SplitHandler.h"
#include "../../../Windows/PropVariant.h"
#include "../../../Common/ComTry.h"
#include "../../../Common/StringToInt.h"

using namespace NWindows;

namespace NArchive {
namespace NSplit {

/*
STDMETHODIMP CHandler::GetFileTimeType(UInt32 *type)
{
  *type = NFileTimeType::kWindows;
  return S_OK;
}

STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems,
    IArchiveUpdateCallback *updateCallback)
{
  COM_TRY_BEGIN

  if (numItems != 1)
    return E_INVALIDARG;

  UInt64 volumeSize = 0;

  CMyComPtr<IArchiveUpdateCallback2> callback2;
  updateCallback->QueryInterface(IID_IArchiveUpdateCallback2,
      (void **)&callback2);

  RINOK(callback2->GetVolumeSize(0, &volumeSize));

  Int32 newData;
  Int32 newProperties;
  UInt32 indexInArchive;
  if (!updateCallback)
    return E_FAIL;

  UInt32 fileIndex = 0;
  RINOK(updateCallback->GetUpdateItemInfo(fileIndex,
    &newData, &newProperties, &indexInArchive));

  if (newProperties != 0)
  {
    {
      NCOM::CPropVariant prop;
      RINOK(updateCallback->GetProperty(fileIndex, kpidIsFolder, &prop));
      if (prop.vt == VT_EMPTY)
      {
      }
      else if (prop.vt != VT_BOOL)
        return E_INVALIDARG;
      else
      {
        if (prop.boolVal != VARIANT_FALSE)
          return E_INVALIDARG;
      }
    }
    {
      NCOM::CPropVariant prop;
      RINOK(updateCallback->GetProperty(fileIndex, kpidIsAnti, &prop));
      if (prop.vt == VT_EMPTY)
      {
      }
      else if (prop.vt != VT_BOOL)
        return E_INVALIDARG;
      else
      {
        if (prop.boolVal != VARIANT_FALSE)
          return E_INVALIDARG;
      }
    }
  }
  UInt64 newSize;
  bool thereIsCopyData = false;
  if (newData != 0)
  {
    NCOM::CPropVariant prop;
    RINOK(updateCallback->GetProperty(fileIndex, kpidSize, &prop));
    if (prop.vt != VT_UI8)
      return E_INVALIDARG;
    newSize = prop.uhVal.QuadPart;
  }
  else
    thereIsCopyData = true;

  UInt64 pos = 0;
  while(pos < newSize)
  {

  }
  return S_OK;
  COM_TRY_END
}
*/

}}