예제 #1
0
mtpFileLoader::mtpFileLoader(const StorageImageLocation *location, int32 size, LoadFromCloudSetting fromCloud, bool autoLoading)
: FileLoader(QString(), size, UnknownFileLocation, LoadToCacheAsWell, fromCloud, autoLoading)
, _dc(location->dc())
, _location(location) {
	LoaderQueues::iterator i = queues.find(MTP::dldDcId(_dc, 0));
	if (i == queues.cend()) {
		i = queues.insert(MTP::dldDcId(_dc, 0), FileLoaderQueue(MaxFileQueries));
	}
	_queue = &i.value();
}
예제 #2
0
mtpFileLoader::mtpFileLoader(int32 dc, const uint64 &id, const uint64 &access, mtpTypeId locType, const QString &to, int32 size) : prev(0), next(0),
    priority(0), inQueue(false), complete(false), requestId(0),
	dc(dc), locationType(locType),
    id(id), access(access), file(to), initialSize(size), type(MTP_storage_fileUnknown()) {
	LoaderQueues::iterator i = queues.find(MTP::dld + dc);
	if (i == queues.cend()) {
		i = queues.insert(MTP::dld + dc, mtpFileLoaderQueue());
	}
	queue = &i.value();
}
예제 #3
0
mtpFileLoader::mtpFileLoader(int32 dc, const int64 &volume, int32 local, const int64 &secret) : prev(0), next(0),
    priority(0), inQueue(false), complete(false), requestId(0),
    dc(dc), locationType(0), volume(volume), local(local), secret(secret),
    id(0), access(0), initialSize(0), size(0), type(MTP_storage_fileUnknown()) {
	LoaderQueues::iterator i = queues.find(dc);
	if (i == queues.cend()) {
		i = queues.insert(dc, mtpFileLoaderQueue());
	}
	queue = &i.value();
}
예제 #4
0
mtpFileLoader::mtpFileLoader(int32 dc, const uint64 &id, const uint64 &access, LocationType type, const QString &to, int32 size, bool todata) : prev(0), next(0),
priority(0), inQueue(false), complete(false),
_localStatus(LocalNotTried), skippedBytes(0), nextRequestOffset(0), lastComplete(false),
dc(dc), _locationType(type), volume(0), local(0), secret(0),
id(id), access(access), file(to), fname(to), fileIsOpen(false), duplicateInData(todata), size(size), type(mtpc_storage_fileUnknown), _localTaskId(0) {
	LoaderQueues::iterator i = queues.find(MTP::dld[0] + dc);
	if (i == queues.cend()) {
		i = queues.insert(MTP::dld[0] + dc, mtpFileLoaderQueue());
	}
	queue = &i.value();
}
예제 #5
0
mtpFileLoader::mtpFileLoader(int32 dc, const uint64 &volume, int32 local, const uint64 &secret, int32 size) : prev(0), next(0),
priority(0), inQueue(false), complete(false),
_localStatus(LocalNotTried), skippedBytes(0), nextRequestOffset(0), lastComplete(false),
dc(dc), _locationType(UnknownFileLocation), volume(volume), local(local), secret(secret),
id(0), access(0), fileIsOpen(false), size(size), type(mtpc_storage_fileUnknown), _localTaskId(0) {
	LoaderQueues::iterator i = queues.find(dc);
	if (i == queues.cend()) {
		i = queues.insert(dc, mtpFileLoaderQueue());
	}
	queue = &i.value();
}
예제 #6
0
mtpFileLoader::mtpFileLoader(int32 dc, const uint64 &id, const uint64 &access, int32 version, LocationType type, const QString &to, int32 size, LoadToCacheSetting toCache, LoadFromCloudSetting fromCloud, bool autoLoading)
: FileLoader(to, size, type, toCache, fromCloud, autoLoading)
, _dc(dc)
, _id(id)
, _access(access)
, _version(version) {
	LoaderQueues::iterator i = queues.find(MTP::dldDcId(_dc, 0));
	if (i == queues.cend()) {
		i = queues.insert(MTP::dldDcId(_dc, 0), FileLoaderQueue(MaxFileQueries));
	}
	_queue = &i.value();
}