mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 22:07:07 -06:00
3.13
This commit is contained in:
58
7zip/UI/Common/ArchiverInfo.h
Executable file
58
7zip/UI/Common/ArchiverInfo.h
Executable file
@@ -0,0 +1,58 @@
|
||||
// ArchiverInfo.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVERINFO_H
|
||||
#define __ARCHIVERINFO_H
|
||||
|
||||
#include "Common/String.h"
|
||||
#include "Common/Types.h"
|
||||
|
||||
struct CArchiverExtInfo
|
||||
{
|
||||
UString Extension;
|
||||
UString AddExtension;
|
||||
CArchiverExtInfo() {}
|
||||
CArchiverExtInfo(const UString &extension):
|
||||
Extension(extension) {}
|
||||
CArchiverExtInfo(const UString &extension, const UString &addExtension):
|
||||
Extension(extension), AddExtension(addExtension) {}
|
||||
};
|
||||
|
||||
struct CArchiverInfo
|
||||
{
|
||||
#ifndef EXCLUDE_COM
|
||||
UString FilePath;
|
||||
CLSID ClassID;
|
||||
#endif
|
||||
UString Name;
|
||||
CObjectVector<CArchiverExtInfo> Extensions;
|
||||
int FindExtension(const UString &ext) const
|
||||
{
|
||||
for (int i = 0; i < Extensions.Size(); i++)
|
||||
if (ext.CollateNoCase(Extensions[i].Extension) == 0)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
UString GetAllExtensions() const
|
||||
{
|
||||
UString s;
|
||||
for (int i = 0; i < Extensions.Size(); i++)
|
||||
{
|
||||
if (i > 0)
|
||||
s += ' ';
|
||||
s += Extensions[i].Extension;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
const UString &GetMainExtension() const
|
||||
{
|
||||
return Extensions[0].Extension;
|
||||
}
|
||||
bool UpdateEnabled;
|
||||
bool KeepName;
|
||||
};
|
||||
|
||||
void ReadArchiverInfoList(CObjectVector<CArchiverInfo> &archivers);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user