This file is indexed.

/usr/include/dclib-0.3/dclib/cdownloadqueue.h is in libdc-dev 0.3.24~svn3121-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
/***************************************************************************
                          cdownloadqueue.h  -  description
                             -------------------
    begin                : Don Mai 16 2002
    copyright            : (C) 2002-2003 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CDOWNLOADQUEUE_H
#define CDOWNLOADQUEUE_H

/**
  *@author Mathias Küster
  *
  * There is both a queue of file sources (nicks and hubs for files) and
  * a queue of the files and their segments.
  *
  * This class does not do much, and quite often CDownloadManager will
  * iterate over the CStringLists in this class, they are public.
  */

#include <time.h>

#include <dclib/dcos.h>
#include <dclib/dcobject.h>
#include <dclib/core/cstring.h>
#include <dclib/core/cstringlist.h>
#include <dclib/ctransfer.h>
#include <dclib/core/cbytearray.h>

#include <list>

class DCTransferQueueObject;
class DCTransferFileObject;
class DCFileChunkObject;
class CMutex;

class CDownloadQueue {
public:
	/** */
	CDownloadQueue();
	/** */
	virtual ~CDownloadQueue();

	/** */
	CStringList<DCTransferQueueObject> * GetUserHubList( CString nick );
	/** */
	DCTransferQueueObject * GetUserTransferObject( CString nick, CString hubname, CString hubhost );
	/** */
	DCTransferFileObject * GetUserFileObject( CString nick, CString hubname, CString hubhost, CString remotename );
	/** */
	bool DelUserFileObject( CString nick, CString hubname, CString hubhost, CString remotefile );
	/** */
	bool RemoveChunk( CString localfile );
	/** */
	bool RenameNick( CString srcnick, CString dstnick, CString srchubname, CString dsthubname );

	/** */
	DCFileChunkObject * GetFileChunkObject( CString file );

	/** mutex for queue */
	CMutex * pQueueMutex;
	
	/** file queue
	 -> [CStringList] nick
	  -> [CStringList] hubname
	   -> [CTransferObject] (nick,hubname,hubhost,[CStringList(CFileObject)]
	    -> [CStringList] remotefile (for double transfers check this name and filelength)
	     -> [CFileObject] (all the file stuff)
	*/
	CStringList<CStringList<DCTransferQueueObject> > * pQueue;

	/** mutex for chunks list */
	CMutex * pChunksMutex;

	/** file chunk list
	 -> [CStringList] sLocalFile
          -> DCFileChunkObject
	*/
	CStringList<DCFileChunkObject> * pChunkList;
};


class DCTransferFileObject {
public:
	/** */
	DCTransferFileObject();
	/** Does a deep copy of a non-null list */
	DCTransferFileObject( const DCTransferFileObject & other );
	/** */
	~DCTransferFileObject();

	/** */
	DCTransferFileObject & operator = ( DCTransferFileObject * TransferFileObject ) { copy(TransferFileObject); return *this; };

	/** */
	CString m_stHash;
	/** */
	CString m_sHash;
	/** file or buffer or client version */
	eltMedium m_eMedium;
	/** remote file with path */
	CString m_sRemoteFile;
	/** local file with path */
	CString m_sLocalFile;
	/** local path without root path */
	CString m_sLocalPath;
	/** local filename */
	CString m_sLocalFileName;
	/** */
	eTransferFileState m_eState;
	/** file size */
	ulonglong m_nSize;
	/** */
	bool m_bMulti;
	/** */
	int m_nPriority;
	/**
	 * For setting the filelist browser to a file/folder
	 * when downloaded from search.
	 */
	CString m_sJumpTo;
	/**
	 * For downloading folders from search.
	 */
	std::list<CString> * m_pDirList;

private:
	/** */
	void copy( DCTransferFileObject * TransferFileObject );
};

class DCChunkObject;
class DCChunkObject {
public:
	/** */
	DCChunkObject() {
		m_nStart      = 0;
		m_nEnd        = 0;
		m_eChunkState = ecsFREE;
	};
	/** */
	DCChunkObject( DCChunkObject * ChunkObject ) {
		m_nStart      = ChunkObject->m_nStart;
		m_nEnd        = ChunkObject->m_nEnd;
		m_eChunkState = ChunkObject->m_eChunkState;
	};
	/** */
	~DCChunkObject() {};

	/** */
	ulonglong m_nStart;
	/** */
	ulonglong m_nEnd;
	/** */ 
	eChunkState m_eChunkState;
};

class DCFileChunkObject;

class DCFileChunkObject {
public:
	/** */
	DCFileChunkObject();
	/** The normal C++ copy constructor */
	DCFileChunkObject( const DCFileChunkObject & other );
	/** What dclib is using */
	DCFileChunkObject( const DCFileChunkObject * other );
	/** */
	~DCFileChunkObject();

	/** */
	CString m_sLocalFile;
	/** */
	int m_nReferenceCount;
	/** */
	bool m_bMulti;
	/** */
	CString m_stHash;
	/** */
	CString m_sHash;
	/** file size */
	ulonglong m_nSize;
	/** file size done */
	ulonglong m_nSizeDone;

	/** list of unfinished chunks */
	CList<DCChunkObject> m_Chunks;
};

class DCTransferQueueObject {
public:
	/** */
	DCTransferQueueObject() {
		tTimeout = 0;
		iConnections = 0;
		bReconnect = false;
	};

	/** */
	~DCTransferQueueObject() {};

	/** */
	CString sNick;
	/** */
	CString sHubName;
	/** */
	CString sHubHost;
	/** */
	time_t tTimeout;
	/** */
	eTransferWaitState eState;
	/** */
	CString sUserFileList;
	/** */
	CStringList<DCTransferFileObject> pTransferFileList;
	/** */
	CList<DCHubObject> pHubList;
	/** */
	int iConnections;
	/** */
	bool bReconnect;
};

class DCTransferWait {
public:
	/** */
	DCTransferWait() {
		tTimeout = 0;
		m_nCount = 0;
	};

	/** */
	~DCTransferWait() {};

	/**
	 * Returns true if the nick and userhost of this object match
	 * the parameters.
	 * 
	 * If one of this object's nick and userhost is empty, then
	 * true is returned if the non-empty one matches the parameter
	 * and the empty one is set to the other parameter.
	 */
	bool Match( const CString & nick, const CString & userhost );

	/** */
	CString sNick;
	/** */
	CString sHubName;
	/** */
	CString sHubHost;
	/** */
	CString sUserHost;
	/** */
	ulonglong m_nCount;
	/** */
	time_t tTimeout;
};

#endif