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

PhysDriveFolder.h « FileManager « UI « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64a36b915dd26857e419f282649b0f17050cb4e1 (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
// PhysDriveFolder.h

#ifndef __PHYSDRIVEFOLDER_H
#define __PHYSDRIVEFOLDER_H

#include "Common/MyString.h"
#include "Common/MyCom.h"
#include "../../Archive/IArchive.h"

#include "IFolder.h"

class CPhysDriveFolder:
  public IFolderFolder,
  public IFolderWasChanged,
  public IFolderOperations,
  public IFolderGetItemFullSize,
  public IFolderClone,
  // public IFolderGetSystemIconIndex,
  public CMyUnknownImp
{
  UInt64 GetSizeOfItem(int anIndex) const;
public:
  MY_QUERYINTERFACE_BEGIN
    MY_QUERYINTERFACE_ENTRY(IFolderWasChanged)
    MY_QUERYINTERFACE_ENTRY(IFolderOperations)
    MY_QUERYINTERFACE_ENTRY(IFolderGetItemFullSize)
    MY_QUERYINTERFACE_ENTRY(IFolderClone)
    // MY_QUERYINTERFACE_ENTRY(IFolderGetSystemIconIndex)
  MY_QUERYINTERFACE_END
  MY_ADDREF_RELEASE


  INTERFACE_FolderFolder(;)
  INTERFACE_FolderOperations(;)

  STDMETHOD(WasChanged)(Int32 *wasChanged);
  STDMETHOD(GetItemFullSize)(UInt32 index, PROPVARIANT *value, IProgress *progress);
  STDMETHOD(Clone)(IFolderFolder **resultFolder);

  // STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex);

private:
  UString _name;
  UString _prefix;
  UString _path;
  UString GetFullPath() const { return _prefix + _path; }
  UString GetFullPathWithName() const { return GetFullPath() + L'\\' + _name; }
  CMyComPtr<IFolderFolder> _parentFolder;

  UINT _driveType;
  DISK_GEOMETRY geom;
  UInt64 _length;

public:
  HRESULT Init(const UString &path);
  HRESULT GetLength(UInt64 &size) const;
};

#endif