#pragma region CPL License
/*
Nuclex Native Framework
Copyright (C) 2002-2013 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#pragma endregion // CPL License
#ifndef NUCLEX_STORAGE_FILESYSTEM_SEVENZIP_SEVENZIPCONTAINERFILECODEC_H
#define NUCLEX_STORAGE_FILESYSTEM_SEVENZIP_SEVENZIPCONTAINERFILECODEC_H
#include "Nuclex/Storage/Config.h"
#include "Nuclex/Storage/FileSystem/ContainerFileCodec.h"
namespace Nuclex { namespace Storage { namespace FileSystem { namespace SevenZip {
// ------------------------------------------------------------------------------------------- //
/// Allows 7-Zip files to be opened as containers
class SevenZipContainerFileCodec : public ContainerFileCodec {
/// Tries to open the specified file as a container
///
/// Codecs that have been registered to the file manager, enabling codec
/// implementations to access nested container files if so desired
///
/// File the codec should attempt to open as a container
///
/// Output parameter that should receive the opened container if successful
///
///
/// True if the file was successfully opened as a container, false otherwise
///
public: bool TryOpenAsContainer(
const std::shared_ptr ®isteredCodecs,
const std::shared_ptr &file,
std::shared_ptr &openedContainer
);
///
/// Determines whether the codec is able to open the specified file as a container
///
/// File the codec should check
/// True if the file can be opened as a container, false otherwise
public: bool CanOpenAsContainer(const std::shared_ptr &file);
};
// ------------------------------------------------------------------------------------------- //
}}}} // namespace Nuclex::Storage::FileSystem::SevenZip
#endif // NUCLEX_STORAGE_FILESYSTEM_SEVENZIP_SEVENZIPCONTAINERFILECODEC_H