diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-01-20 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:49 +0300 |
commit | d9666cf046a8453b33b3e2fbf4d82295a9f87df3 (patch) | |
tree | c722ed19b844b53042aec0c1d7d2f8381140a5ed /CPP/7zip/UI/Far/Plugin.h | |
parent | 804edc5756fede54dbb1aefda6d39d306111938d (diff) |
4.44 beta
Diffstat (limited to 'CPP/7zip/UI/Far/Plugin.h')
-rwxr-xr-x | CPP/7zip/UI/Far/Plugin.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Far/Plugin.h b/CPP/7zip/UI/Far/Plugin.h new file mode 100755 index 00000000..0b617cfb --- /dev/null +++ b/CPP/7zip/UI/Far/Plugin.h @@ -0,0 +1,99 @@ +// 7zip/Far/Plugin.h + +#ifndef __7ZIP_FAR_PLUGIN_H +#define __7ZIP_FAR_PLUGIN_H + +#include "Common/MyCom.h" + +#include "Windows/COM.h" +#include "Windows/FileFind.h" +#include "Windows/PropVariant.h" + +#include "../Common/ArchiverInfo.h" +#include "../Agent/IFolderArchive.h" + +#include "FarUtils.h" + +class CPlugin +{ + NWindows::NCOM::CComInitializer m_ComInitializer; + UString m_CurrentDir; + + UString m_PannelTitle; + + InfoPanelLine m_InfoLines[30]; // Change it; + + char m_FileNameBuffer[1024]; + char m_CurrentDirBuffer[1024]; + char m_PannelTitleBuffer[1024]; + + AString PanelModeColumnTypes; + AString PanelModeColumnWidths; + PanelMode PanelMode; + void AddColumn(PROPID aPropID); + + + void EnterToDirectory(const UString &aDirName); + + void GetPathParts(UStringVector &aPathParts); + void GetCurrentDir(); +public: + UString m_FileName; + // UString m_DefaultName; + NWindows::NFile::NFind::CFileInfoW m_FileInfo; + + CMyComPtr<IInFolderArchive> m_ArchiveHandler; + CMyComPtr<IFolderFolder> _folder; + + // CArchiverInfo m_ArchiverInfo; + UString _archiveTypeName; + + bool PasswordIsDefined; + UString Password; + + + CPlugin(const UString &fileName, + // const UString &aDefaultName, + IInFolderArchive *archiveHandler, + UString archiveTypeName + ); + ~CPlugin(); + + void ReadValueSafe(PROPID aPropID, NWindows::NCOM::CPropVariant aPropVariant); + void ReadPluginPanelItem(PluginPanelItem &aPanelItem, UINT32 anItemIndex); + + int GetFindData(PluginPanelItem **pPanelItem,int *pItemsNumber,int OpMode); + void FreeFindData(PluginPanelItem *PanelItem,int ItemsNumber); + int SetDirectory(const char *aDir, int opMode); + void GetOpenPluginInfo(struct OpenPluginInfo *anInfo); + + int DeleteFiles(PluginPanelItem *aPanelItems, int itemsNumber, int opMode); + + + HRESULT ExtractFiles( + bool decompressAllItems, + const UINT32 *indices, + UINT32 numIndices, + bool silent, + NExtract::NPathMode::EEnum pathMode, + NExtract::NOverwriteMode::EEnum overwriteMode, + const UString &destPath, + bool passwordIsDefined, const UString &password); + + NFar::NFileOperationReturnCode::EEnum GetFiles(struct PluginPanelItem *aPanelItem, int itemsNumber, + int move, char *destPath, int opMode); + + NFar::NFileOperationReturnCode::EEnum GetFilesReal(struct PluginPanelItem *aPanelItems, + int itemsNumber, int move, const char *_aDestPath, int opMode, bool aShowBox); + + NFar::NFileOperationReturnCode::EEnum PutFiles(struct PluginPanelItem *aPanelItems, int itemsNumber, + int move, int opMode); + + HRESULT ShowAttributesWindow(); + + int ProcessKey(int aKey, unsigned int aControlState); +}; + +HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &aPluginPanelItems); + +#endif |