mirror of https://github.com/aria2/aria2
2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SegmentManFactory class. * src/AbstractSegmentManFactory.h * src/DefaultSegmentManFactory.cc * src/DefaultSegmentManFactory.h * src/Makefile.am * src/RequestGroup.cc * src/RequestGroup.h * src/SegmentManFactory.hpull/1/head
parent
4354c674ab
commit
1a04d2913e
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Removed SegmentManFactory class.
|
||||||
|
* src/AbstractSegmentManFactory.h
|
||||||
|
* src/DefaultSegmentManFactory.cc
|
||||||
|
* src/DefaultSegmentManFactory.h
|
||||||
|
* src/Makefile.am
|
||||||
|
* src/RequestGroup.cc
|
||||||
|
* src/RequestGroup.h
|
||||||
|
* src/SegmentManFactory.h
|
||||||
|
|
||||||
2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Destroyed digest context after getting calculated hash.
|
Destroyed digest context after getting calculated hash.
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
/* <!-- copyright */
|
|
||||||
/*
|
|
||||||
* aria2 - The high speed download utility
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the copyright holders give
|
|
||||||
* permission to link the code of portions of this program with the
|
|
||||||
* OpenSSL library under certain conditions as described in each
|
|
||||||
* individual source file, and distribute linked combinations
|
|
||||||
* including the two.
|
|
||||||
* You must obey the GNU General Public License in all respects
|
|
||||||
* for all of the code used other than OpenSSL. If you modify
|
|
||||||
* file(s) with this exception, you may extend this exception to your
|
|
||||||
* version of the file(s), but you are not obligated to do so. If you
|
|
||||||
* do not wish to do so, delete this exception statement from your
|
|
||||||
* version. If you delete this exception statement from all source
|
|
||||||
* files in the program, then also delete it here.
|
|
||||||
*/
|
|
||||||
/* copyright --> */
|
|
||||||
#ifndef _D_ABSTRACT_SEGMENT_MAN_FACTORY_H_
|
|
||||||
#define _D_ABSTRACT_SEGMENT_MAN_FACTORY_H_
|
|
||||||
|
|
||||||
#include "SegmentManFactory.h"
|
|
||||||
|
|
||||||
namespace aria2 {
|
|
||||||
|
|
||||||
class Option;
|
|
||||||
|
|
||||||
class AbstractSegmentManFactory : public SegmentManFactory {
|
|
||||||
protected:
|
|
||||||
const Option* _option;
|
|
||||||
public:
|
|
||||||
AbstractSegmentManFactory(const Option* option):_option(option) {}
|
|
||||||
|
|
||||||
virtual ~AbstractSegmentManFactory() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef SharedHandle<AbstractSegmentManFactory> AbstractSegmentManFactoryHandle;
|
|
||||||
|
|
||||||
} // namespace aria2
|
|
||||||
|
|
||||||
#endif // _D_ABSTRACT_SEGMENT_MAN_FACTORY_H_
|
|
|
@ -1,53 +0,0 @@
|
||||||
/* <!-- copyright */
|
|
||||||
/*
|
|
||||||
* aria2 - The high speed download utility
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the copyright holders give
|
|
||||||
* permission to link the code of portions of this program with the
|
|
||||||
* OpenSSL library under certain conditions as described in each
|
|
||||||
* individual source file, and distribute linked combinations
|
|
||||||
* including the two.
|
|
||||||
* You must obey the GNU General Public License in all respects
|
|
||||||
* for all of the code used other than OpenSSL. If you modify
|
|
||||||
* file(s) with this exception, you may extend this exception to your
|
|
||||||
* version of the file(s), but you are not obligated to do so. If you
|
|
||||||
* do not wish to do so, delete this exception statement from your
|
|
||||||
* version. If you delete this exception statement from all source
|
|
||||||
* files in the program, then also delete it here.
|
|
||||||
*/
|
|
||||||
/* copyright --> */
|
|
||||||
#include "DefaultSegmentManFactory.h"
|
|
||||||
#include "DownloadContext.h"
|
|
||||||
#include "PieceStorage.h"
|
|
||||||
#include "DefaultDiskWriter.h"
|
|
||||||
#include "SegmentMan.h"
|
|
||||||
#include "prefs.h"
|
|
||||||
|
|
||||||
namespace aria2 {
|
|
||||||
|
|
||||||
SegmentManHandle
|
|
||||||
DefaultSegmentManFactory::createNewInstance
|
|
||||||
(const SharedHandle<DownloadContext>& dctx,
|
|
||||||
const PieceStorageHandle& ps)
|
|
||||||
{
|
|
||||||
SegmentManHandle segmentMan(new SegmentMan(_option, dctx, ps));
|
|
||||||
return segmentMan;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace aria2
|
|
|
@ -1,57 +0,0 @@
|
||||||
/* <!-- copyright */
|
|
||||||
/*
|
|
||||||
* aria2 - The high speed download utility
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the copyright holders give
|
|
||||||
* permission to link the code of portions of this program with the
|
|
||||||
* OpenSSL library under certain conditions as described in each
|
|
||||||
* individual source file, and distribute linked combinations
|
|
||||||
* including the two.
|
|
||||||
* You must obey the GNU General Public License in all respects
|
|
||||||
* for all of the code used other than OpenSSL. If you modify
|
|
||||||
* file(s) with this exception, you may extend this exception to your
|
|
||||||
* version of the file(s), but you are not obligated to do so. If you
|
|
||||||
* do not wish to do so, delete this exception statement from your
|
|
||||||
* version. If you delete this exception statement from all source
|
|
||||||
* files in the program, then also delete it here.
|
|
||||||
*/
|
|
||||||
/* copyright --> */
|
|
||||||
#ifndef _D_DEFAULT_SEGMENT_MAN_FACTORY_H_
|
|
||||||
#define _D_DEFAULT_SEGMENT_MAN_FACTORY_H_
|
|
||||||
|
|
||||||
#include "AbstractSegmentManFactory.h"
|
|
||||||
|
|
||||||
namespace aria2 {
|
|
||||||
|
|
||||||
class DefaultSegmentManFactory : public AbstractSegmentManFactory {
|
|
||||||
public:
|
|
||||||
DefaultSegmentManFactory(const Option* option):AbstractSegmentManFactory(option) {}
|
|
||||||
|
|
||||||
virtual ~DefaultSegmentManFactory() {}
|
|
||||||
|
|
||||||
virtual SharedHandle<SegmentMan>
|
|
||||||
createNewInstance(const SharedHandle<DownloadContext>& dc,
|
|
||||||
const SharedHandle<PieceStorage>& ps);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef SharedHandle<DefaultSegmentManFactory> DefaultSegmentManFactoryHandle;
|
|
||||||
|
|
||||||
} // namespace aria2
|
|
||||||
|
|
||||||
#endif // _D_DEFAULT_SEGMENT_MAN_FACTORY_H_
|
|
|
@ -90,9 +90,6 @@ SRCS = Socket.h\
|
||||||
StreamFileAllocationEntry.cc StreamFileAllocationEntry.h\
|
StreamFileAllocationEntry.cc StreamFileAllocationEntry.h\
|
||||||
MultiUrlRequestInfo.cc MultiUrlRequestInfo.h\
|
MultiUrlRequestInfo.cc MultiUrlRequestInfo.h\
|
||||||
UriListParser.cc UriListParser.h\
|
UriListParser.cc UriListParser.h\
|
||||||
SegmentManFactory.h\
|
|
||||||
AbstractSegmentManFactory.h\
|
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h\
|
|
||||||
RealtimeCommand.cc RealtimeCommand.h\
|
RealtimeCommand.cc RealtimeCommand.h\
|
||||||
ProgressAwareEntry.h\
|
ProgressAwareEntry.h\
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h\
|
RequestGroupEntry.cc RequestGroupEntry.h\
|
||||||
|
|
|
@ -358,8 +358,6 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \
|
||||||
FileAllocationEntry.h StreamFileAllocationEntry.cc \
|
FileAllocationEntry.h StreamFileAllocationEntry.cc \
|
||||||
StreamFileAllocationEntry.h MultiUrlRequestInfo.cc \
|
StreamFileAllocationEntry.h MultiUrlRequestInfo.cc \
|
||||||
MultiUrlRequestInfo.h UriListParser.cc UriListParser.h \
|
MultiUrlRequestInfo.h UriListParser.cc UriListParser.h \
|
||||||
SegmentManFactory.h AbstractSegmentManFactory.h \
|
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
|
||||||
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
||||||
CookieParser.cc CookieParser.h HttpHeaderProcessor.cc \
|
CookieParser.cc CookieParser.h HttpHeaderProcessor.cc \
|
||||||
|
@ -795,11 +793,11 @@ am__objects_27 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
FileAllocationEntry.$(OBJEXT) \
|
FileAllocationEntry.$(OBJEXT) \
|
||||||
StreamFileAllocationEntry.$(OBJEXT) \
|
StreamFileAllocationEntry.$(OBJEXT) \
|
||||||
MultiUrlRequestInfo.$(OBJEXT) UriListParser.$(OBJEXT) \
|
MultiUrlRequestInfo.$(OBJEXT) UriListParser.$(OBJEXT) \
|
||||||
DefaultSegmentManFactory.$(OBJEXT) RealtimeCommand.$(OBJEXT) \
|
RealtimeCommand.$(OBJEXT) RequestGroupEntry.$(OBJEXT) \
|
||||||
RequestGroupEntry.$(OBJEXT) Cookie.$(OBJEXT) \
|
Cookie.$(OBJEXT) CookieParser.$(OBJEXT) \
|
||||||
CookieParser.$(OBJEXT) HttpHeaderProcessor.$(OBJEXT) \
|
HttpHeaderProcessor.$(OBJEXT) FileEntry.$(OBJEXT) \
|
||||||
FileEntry.$(OBJEXT) Platform.$(OBJEXT) \
|
Platform.$(OBJEXT) PStringSegment.$(OBJEXT) \
|
||||||
PStringSegment.$(OBJEXT) PStringBuildVisitor.$(OBJEXT) \
|
PStringBuildVisitor.$(OBJEXT) \
|
||||||
ParameterizedStringParser.$(OBJEXT) TimeBasedCommand.$(OBJEXT) \
|
ParameterizedStringParser.$(OBJEXT) TimeBasedCommand.$(OBJEXT) \
|
||||||
AutoSaveCommand.$(OBJEXT) DefaultPieceStorage.$(OBJEXT) \
|
AutoSaveCommand.$(OBJEXT) DefaultPieceStorage.$(OBJEXT) \
|
||||||
UnknownLengthPieceStorage.$(OBJEXT) PieceStatMan.$(OBJEXT) \
|
UnknownLengthPieceStorage.$(OBJEXT) PieceStatMan.$(OBJEXT) \
|
||||||
|
@ -1106,8 +1104,6 @@ SRCS = Socket.h SocketCore.cc SocketCore.h BinaryStream.h Command.cc \
|
||||||
FileAllocationEntry.h StreamFileAllocationEntry.cc \
|
FileAllocationEntry.h StreamFileAllocationEntry.cc \
|
||||||
StreamFileAllocationEntry.h MultiUrlRequestInfo.cc \
|
StreamFileAllocationEntry.h MultiUrlRequestInfo.cc \
|
||||||
MultiUrlRequestInfo.h UriListParser.cc UriListParser.h \
|
MultiUrlRequestInfo.h UriListParser.cc UriListParser.h \
|
||||||
SegmentManFactory.h AbstractSegmentManFactory.h \
|
|
||||||
DefaultSegmentManFactory.cc DefaultSegmentManFactory.h \
|
|
||||||
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
RealtimeCommand.cc RealtimeCommand.h ProgressAwareEntry.h \
|
||||||
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
RequestGroupEntry.cc RequestGroupEntry.h Cookie.cc Cookie.h \
|
||||||
CookieParser.cc CookieParser.h HttpHeaderProcessor.cc \
|
CookieParser.cc CookieParser.h HttpHeaderProcessor.cc \
|
||||||
|
@ -1406,7 +1402,6 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultExtensionMessageFactory.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultExtensionMessageFactory.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultPeerStorage.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultPeerStorage.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultPieceStorage.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultPieceStorage.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DefaultSegmentManFactory.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DirectDiskAdaptor.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DirectDiskAdaptor.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DiskAdaptor.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DiskAdaptor.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DownloadCommand.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DownloadCommand.Po@am__quote@
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
|
|
||||||
#include "PostDownloadHandler.h"
|
#include "PostDownloadHandler.h"
|
||||||
#include "DownloadEngine.h"
|
#include "DownloadEngine.h"
|
||||||
#include "DefaultSegmentManFactory.h"
|
|
||||||
#include "SegmentMan.h"
|
#include "SegmentMan.h"
|
||||||
#include "NullProgressInfoFile.h"
|
#include "NullProgressInfoFile.h"
|
||||||
#include "Dependency.h"
|
#include "Dependency.h"
|
||||||
|
@ -119,7 +118,6 @@ RequestGroup::RequestGroup(const SharedHandle<Option>& option):
|
||||||
_numConcurrentCommand(option->getAsInt(PREF_SPLIT)),
|
_numConcurrentCommand(option->getAsInt(PREF_SPLIT)),
|
||||||
_numStreamConnection(0),
|
_numStreamConnection(0),
|
||||||
_numCommand(0),
|
_numCommand(0),
|
||||||
_segmentManFactory(new DefaultSegmentManFactory(_option.get())),
|
|
||||||
_saveControlFile(true),
|
_saveControlFile(true),
|
||||||
_progressInfoFile(new NullProgressInfoFile()),
|
_progressInfoFile(new NullProgressInfoFile()),
|
||||||
_preLocalFileCheckEnabled(true),
|
_preLocalFileCheckEnabled(true),
|
||||||
|
@ -491,8 +489,8 @@ void RequestGroup::initPieceStorage()
|
||||||
tempPieceStorage = ps;
|
tempPieceStorage = ps;
|
||||||
}
|
}
|
||||||
tempPieceStorage->initStorage();
|
tempPieceStorage->initStorage();
|
||||||
SharedHandle<SegmentMan> tempSegmentMan =
|
SharedHandle<SegmentMan> tempSegmentMan
|
||||||
_segmentManFactory->createNewInstance(_downloadContext, tempPieceStorage);
|
(new SegmentMan(_option.get(), _downloadContext, tempPieceStorage));
|
||||||
|
|
||||||
_pieceStorage = tempPieceStorage;
|
_pieceStorage = tempPieceStorage;
|
||||||
_segmentMan = tempSegmentMan;
|
_segmentMan = tempSegmentMan;
|
||||||
|
@ -894,11 +892,6 @@ bool RequestGroup::isDependencyResolved()
|
||||||
return _dependency->resolve();
|
return _dependency->resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestGroup::setSegmentManFactory(const SegmentManFactoryHandle& segmentManFactory)
|
|
||||||
{
|
|
||||||
_segmentManFactory = segmentManFactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RequestGroup::dependsOn(const DependencyHandle& dep)
|
void RequestGroup::dependsOn(const DependencyHandle& dep)
|
||||||
{
|
{
|
||||||
_dependency = dep;
|
_dependency = dep;
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace aria2 {
|
||||||
|
|
||||||
class DownloadEngine;
|
class DownloadEngine;
|
||||||
class SegmentMan;
|
class SegmentMan;
|
||||||
class SegmentManFactory;
|
|
||||||
class Command;
|
class Command;
|
||||||
class DownloadCommand;
|
class DownloadCommand;
|
||||||
class DownloadContext;
|
class DownloadContext;
|
||||||
|
@ -97,7 +96,6 @@ private:
|
||||||
unsigned int _numCommand;
|
unsigned int _numCommand;
|
||||||
|
|
||||||
SharedHandle<SegmentMan> _segmentMan;
|
SharedHandle<SegmentMan> _segmentMan;
|
||||||
SharedHandle<SegmentManFactory> _segmentManFactory;
|
|
||||||
|
|
||||||
SharedHandle<DownloadContext> _downloadContext;
|
SharedHandle<DownloadContext> _downloadContext;
|
||||||
|
|
||||||
|
@ -228,8 +226,6 @@ public:
|
||||||
|
|
||||||
void validateTotalLength(uint64_t actualTotalLength) const;
|
void validateTotalLength(uint64_t actualTotalLength) const;
|
||||||
|
|
||||||
void setSegmentManFactory(const SharedHandle<SegmentManFactory>& segmentManFactory);
|
|
||||||
|
|
||||||
void setNumConcurrentCommand(unsigned int num)
|
void setNumConcurrentCommand(unsigned int num)
|
||||||
{
|
{
|
||||||
_numConcurrentCommand = num;
|
_numConcurrentCommand = num;
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
/* <!-- copyright */
|
|
||||||
/*
|
|
||||||
* aria2 - The high speed download utility
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program 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
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the copyright holders give
|
|
||||||
* permission to link the code of portions of this program with the
|
|
||||||
* OpenSSL library under certain conditions as described in each
|
|
||||||
* individual source file, and distribute linked combinations
|
|
||||||
* including the two.
|
|
||||||
* You must obey the GNU General Public License in all respects
|
|
||||||
* for all of the code used other than OpenSSL. If you modify
|
|
||||||
* file(s) with this exception, you may extend this exception to your
|
|
||||||
* version of the file(s), but you are not obligated to do so. If you
|
|
||||||
* do not wish to do so, delete this exception statement from your
|
|
||||||
* version. If you delete this exception statement from all source
|
|
||||||
* files in the program, then also delete it here.
|
|
||||||
*/
|
|
||||||
/* copyright --> */
|
|
||||||
#ifndef _D_SEGMENT_MAN_FACTORY_H_
|
|
||||||
#define _D_SEGMENT_MAN_FACTORY_H_
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "SharedHandle.h"
|
|
||||||
|
|
||||||
namespace aria2 {
|
|
||||||
|
|
||||||
class SegmentMan;
|
|
||||||
class DownloadContext;
|
|
||||||
class PieceStorage;
|
|
||||||
|
|
||||||
class SegmentManFactory {
|
|
||||||
public:
|
|
||||||
virtual ~SegmentManFactory() {}
|
|
||||||
|
|
||||||
virtual SharedHandle<SegmentMan>
|
|
||||||
createNewInstance(const SharedHandle<DownloadContext>& dc,
|
|
||||||
const SharedHandle<PieceStorage>& ps) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef SharedHandle<SegmentManFactory> SegmentManFactoryHandle;
|
|
||||||
|
|
||||||
} // namespace aria2
|
|
||||||
|
|
||||||
#endif // _D_SEGMENT_MAN_FACTORY_H_
|
|
Loading…
Reference in New Issue