-
Notifications
You must be signed in to change notification settings - Fork 12
/
ListItem.cpp
837 lines (627 loc) · 14.5 KB
/
ListItem.cpp
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
#include "stdafx.h"
#include "ListItem.h"
#include "JcdFile.h"
#include "ItemHeader.h"
#include "MyGet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CListItem::CListItem() : CItemHeader(ITEM_CLASS_LISTITEM)
{
prv_InitDefault();
}
int CListItem::GetFileTotalLengthByString(LPTSTR pBuf, int iMaxBufLength)
{
//注意iMaxBufLength没有进行检查。
if (m_iSizeOfFile != -1)
{
itoa(m_iSizeOfFile, pBuf, 10);
return strlen(pBuf);
}
else
{
pBuf[0] = '\0';
return 0;
}
}
LPCTSTR CListItem::GetComment()
{
return m_strComment;
}
int CListItem::GetItemStatusIconIndex()
{
return GetStatus();
}
LPCTSTR CListItem::GetURL()
{
return m_strURL;
}
LPCTSTR CListItem::GetREF()
{
return m_strREF;
}
int CListItem::IsSupportResumed()
{
if (m_iAttribute & ATTR_EXCUTED)
{
if (m_iAttribute & ATTR_SUPPORTRESUME)
{
return SUPPORTRESUME;
}
else
{
return UNSUPPORTRESUME;
}
}
else
{
//Unknow because the downloading is not excuted before.
return UNKNOWN;
}
return UNKNOWN;
}
LPCTSTR CListItem::GetDownloadedFolder()
{
return m_strDownloadFolder;
}
time_t CListItem::GetFileTime()
{
return (time_t)m_iFileCreateTime;
}
time_t CListItem::GetLocalFileCreatedTime()
{
return (time_t)m_iItemCreateTime;
}
time_t CListItem::GetLocalFileCompletedTime()
{
return (time_t)m_iItemCompleteTime;
}
int CListItem::GetFileDownloadedSize()
{
int iFileSize = 0;
for (int i = 0; i < this->GetCountOfBreaks(); i ++)
{
iFileSize += m_arBrkPosArray[i]->iEnd
- m_arBrkPosArray[i]->iStart;
}
return iFileSize;
}
int CListItem::GetDownloadingTimeCosted()
{
return m_iDownloadingTimeCosted;
}
int CListItem::GetFileSize()
{
return m_iSizeOfFile;
}
BOOL CListItem::IsCompleted()
{
return (m_iIsFileCompleted == COMPLETED);
}
LPCTSTR CListItem::GetPasswd()
{
return m_strPasswd;
}
LPCTSTR CListItem::GetRename()
{
if (!m_strRename.IsEmpty())
{
return m_strRename;
}
else
{
return GetRenameByURL(m_strURL);
}
}
LPCTSTR CListItem::GetUserName()
{
return m_strUserName;
}
int CListItem::GetCountOfSubstitutedURLs()
{
return m_arSubStitutedUrl.GetSize();
}
LPCTSTR CListItem::GetSubstitutedURLs(int iIndex)
{
if (iIndex < GetCountOfSubstitutedURLs())
{
return m_arSubStitutedUrl[iIndex]->m_strSubstitutedURL;
}
return NULL;
}
int CListItem::GetStatus()
{
switch (m_iIsFileCompleted)
{
case DOWNLOAD_ERR:
return ITEM_STATUS_DOWNLOAD_ERROR;
case COMPLETED:
return ITEM_STATUS_COMPLETED;
case DOWNLOADING:
return ITEM_STATUS_DOWNLOADING;
case UNCOMPLETED:
switch (m_wStartState)
{
case START_MANUAL:
return ITEM_STATUS_PAUSED;
case START_RIGHTNOW:
return ITEM_STATUS_READY;
case START_SCHEDULED:
return ITEM_STATUS_SCHEDULED;
}
}
return -1;
}
void CListItem::prv_FreeMEM()
{
//free substituted URLs
PSUBSTITUTEDURL pSubsUrl;
int i;
for (i =0; i < GetCountOfSubstitutedURLs(); i ++)
{
pSubsUrl = m_arSubStitutedUrl[i];
delete pSubsUrl;
}
m_arSubStitutedUrl.RemoveAll();
//free Breaks;
PBREAKPOSITION pBreakPos;
for (i = 0; i < GetCountOfBreaks(); i ++)
{
pBreakPos = m_arBrkPosArray[i];
delete pBreakPos;
}
m_arBrkPosArray.RemoveAll();
}
int CListItem::GetCountOfBreaks()
{
return m_arBrkPosArray.GetSize();
}
BOOL CListItem::LoadFromFile(CJCDFile *pJCDFile)
{
CItemHeader::LoadFromFile(pJCDFile);
//处理URL.
JCD_LOAD_STR(m_strURL);
//处理“属性”
JCD_LOAD_INT(m_iAttribute);
//处理登录到服务器。
JCD_LOAD_STR(m_strUserName);
//处理密码
JCD_LOAD_STR(m_strPasswd);
//处理下载完成后应归属的TreeItem的类别,即TreeItem的ID
JCD_LOAD_INT(m_iDownloadedToCategory);
//处理重命名。
JCD_LOAD_STR(m_strRename);
//处理文件同时多线程下载的线程数
JCD_LOAD_INT(m_iConcurrentThreadNumber);
//处理下载目录
JCD_LOAD_STR(m_strDownloadFolder);
//处理注释
JCD_LOAD_STR(m_strComment);
//处理Http Proxy索引
JCD_LOAD_WORD(m_wHttpProxyIndex);
//处理开始状态
JCD_LOAD_WORD(m_wStartState);
//处理4字节的文件是否下载结束部分
JCD_LOAD_INT(m_iIsFileCompleted);
//处理文件长度部分
JCD_LOAD_INT(m_iSizeOfFile);
//处理1字节的Unknown4部分
JCD_LOAD_BYTE(m_pbUnknown4);
//处理4字节的文件创建时间
JCD_LOAD_INT(m_iFileCreateTime);
//处理4字节的下载的Item的创建时间
JCD_LOAD_INT(m_iItemCreateTime);
//处理4字节的下载的Item的结束时间
JCD_LOAD_INT(m_iItemCompleteTime);
//处理引用
JCD_LOAD_STR(m_strREF);
//处理4字节的下载的时间消耗
JCD_LOAD_INT(m_iDownloadingTimeCosted);
//处理Ftp Proxy索引
JCD_LOAD_WORD(m_wFtpProxyIndex);
//处理可供替代的URL.
int iSumOfSubstitutedURLs;
JCD_LOAD_INT(iSumOfSubstitutedURLs);
PSUBSTITUTEDURL pSubsUrl;
int i;
for (i = 0; i < iSumOfSubstitutedURLs; i ++)
{
pSubsUrl = new SUBSTITUTEDURL;
JCD_LOAD_STR(pSubsUrl->m_strSubstitutedURL);
//处理4字节的空白区域
//为了简化操作,暂时把这个4字节的BYTE数组看作一个整数。
JCD_LOAD_INT(pSubsUrl->pbUnknown);
m_arSubStitutedUrl.Add(pSubsUrl);
}
//处理4字节的是否已经下载区域
int iBreaksCount;
JCD_LOAD_INT(iBreaksCount);
PBREAKPOSITION pBreak;
for (i = 0; i < iBreaksCount; i ++)
{
pBreak = new BREAKPOSITION;
JCD_LOAD_INT(pBreak->iStart);
JCD_LOAD_INT(pBreak->iEnd);
m_arBrkPosArray.Add(pBreak);
}
return TRUE;
}
PBREAKPOSITION CListItem::GetBreakPos(DWORD dwIndex)
{
return m_arBrkPosArray[dwIndex];
}
BOOL CListItem::SaveToFile(CJCDFile *pJCDFile)
{
CItemHeader::SaveToFile(pJCDFile);
//处理URL.
JCD_SAVE_STR(m_strURL);
//处理“属性”
JCD_SAVE_INT(m_iAttribute);
//处理登录到服务器。
JCD_SAVE_STR(m_strUserName);
//处理密码
JCD_SAVE_STR(m_strPasswd);
//处理下载完成后应归属的TreeItem的类别,即TreeItem的ID
JCD_SAVE_INT(m_iDownloadedToCategory);
//处理重命名。
JCD_SAVE_STR(m_strRename);
//处理文件同时多线程下载的线程数
JCD_SAVE_INT(m_iConcurrentThreadNumber);
//处理下载目录
JCD_SAVE_STR(m_strDownloadFolder);
//处理注释
JCD_SAVE_STR(m_strComment);
//处理Http Proxy索引
JCD_SAVE_WORD(m_wHttpProxyIndex);
//处理开始状态
JCD_SAVE_WORD(m_wStartState);
//处理4字节的文件是否下载结束部分
JCD_SAVE_INT(m_iIsFileCompleted);
//处理文件长度部分
JCD_SAVE_INT(m_iSizeOfFile);
//处理1字节的Unknown4部分
JCD_SAVE_BYTE(m_pbUnknown4);
//处理4字节的文件创建时间
JCD_SAVE_INT(m_iFileCreateTime);
//处理4字节的下载的Item的创建时间
JCD_SAVE_INT(m_iItemCreateTime);
//处理4字节的下载的Item的结束时间
JCD_SAVE_INT(m_iItemCompleteTime);
//处理引用
JCD_SAVE_STR(m_strREF);
//处理4字节的下载的时间消耗
JCD_SAVE_INT(m_iDownloadingTimeCosted);
//处理Ftp Proxy索引
JCD_SAVE_WORD(m_wFtpProxyIndex);
//处理可供替代的URL.
int iSumOfSubstitutedURLs = GetCountOfSubstitutedURLs();
JCD_SAVE_INT(iSumOfSubstitutedURLs);
PSUBSTITUTEDURL pSubsUrl;
int i;
for (i = 0; i < iSumOfSubstitutedURLs; i ++)
{
pSubsUrl = m_arSubStitutedUrl[i];
JCD_SAVE_STR(pSubsUrl->m_strSubstitutedURL);
//处理4字节的空白区域
//为了简化操作,暂时把这个4字节的BYTE数组看作一个整数。
JCD_SAVE_INT(pSubsUrl->pbUnknown);
}
//处理4字节的是否已经下载区域
int iBreaksCount = GetCountOfBreaks();
JCD_SAVE_INT(iBreaksCount);
PBREAKPOSITION pBreak;
for (i = 0; i < iBreaksCount; i ++)
{
pBreak = m_arBrkPosArray[i];
JCD_SAVE_INT(pBreak->iStart);
JCD_SAVE_INT(pBreak->iEnd);
}
return TRUE;
}
BOOL CListItem::IsAttrOn(int iAttrIndex)
{
//Now, we only ensure the low 4 bits.
BYTE bAttr = (BYTE)m_iAttribute;
bAttr &= 0x0F;
return (bAttr & iAttrIndex) ? TRUE : FALSE;
}
int CListItem::GetDownloadedToCategory()
{
return m_iDownloadedToCategory;
}
int CListItem::GetSplitsCount()
{
return m_iConcurrentThreadNumber;
}
WORD CListItem::GetStartState()
{
return m_wStartState;
}
WORD CListItem::GetFtpProxyIndex()
{
return m_wFtpProxyIndex;
}
WORD CListItem::GetHttpProxyIndex()
{
return m_wHttpProxyIndex;
}
BOOL CListItem::prv_InitDefault()
{
//CRegProcess RegProcess;
CAppRegs *pAppRegs = ((CMyGetApp *)AfxGetApp())->GetAppRegs();
m_iAttribute = 0;
m_bDirty = TRUE;
//Fill Refer
/*
LPSTR lpszRefer = RegProcess.GetStr(REG_DOWNLOAD_DEF_REFERER);
if (lpszRefer)
{
SetREF(lpszRefer);
delete lpszRefer;
lpszRefer = NULL;
}
*/
LPSTR lpszRefer;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_REFERER, &lpszRefer);
SetREF(lpszRefer);
//Fill DownloadToCategory
//SetDownloadedToCategory(RegProcess.GetDWORD(REG_DOWNLOAD_DEF_CATEGORY));
DWORD dwDownloadDefaultCategory;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_SERVER, &dwDownloadDefaultCategory);
SetDownloadedToCategory(dwDownloadDefaultCategory);
//Fill Downloaded Path
/*
LPSTR lpszPath = RegProcess.GetStr(REG_DOWNLOAD_DEF_PATH);
if (lpszPath)
{
SetDownloadedFolder(lpszPath);
delete lpszPath;
lpszPath = NULL;
}*/
LPSTR lpszPath;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_PATH, &lpszPath);
SetDownloadedFolder(lpszPath);
//Fill split;
//SetSplitsCount(RegProcess.GetDWORD(REG_DOWNLOAD_DEF_SPLIT));
DWORD dwDownloadDefaultSplit;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_SPLIT, &dwDownloadDefaultSplit);
SetSplitsCount(dwDownloadDefaultSplit);
//Fill "Mirror and Ftp seach"
SetAttr(ATTR_NOTUSEMIRROR, !pAppRegs->IsFlagOn(REG_FLAG_GENERAL_EXT_ENABLE_MIRROE_AND_FTP_SEARCH));
//Fill Login
// SetAttr(ATTR_NEEDLOGIN, (RegProcess.GetDWORD(REG_DOWNLOAD_DEF_LOGIN) == ATTR_NEEDLOGIN));
DWORD dwDownloadDefaultLogin;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_LOGIN, &dwDownloadDefaultLogin);
SetAttr(ATTR_NEEDLOGIN, dwDownloadDefaultSplit == ATTR_NEEDLOGIN);
//Fill UserName
/*
LPTSTR lpszUserName = RegProcess.GetStr(REG_DOWNLOAD_DEF_USERNAME);
if (lpszUserName)
{
SetUserName(lpszUserName);
delete lpszUserName;
lpszUserName = NULL;
}
*/
LPSTR lpszUserName;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_USERNAME, &lpszUserName);
SetUserName(lpszUserName);
//Fill Password
/* LPTSTR lpszPassword = RegProcess.GetStr(REG_DOWNLOAD_DEF_PASSWORD);
if (lpszPassword)
{
SetPassword(lpszPassword);
delete lpszPassword;
lpszPassword = NULL;
}
*/
LPSTR lpszPassword;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_PASSWORD, &lpszPassword);
SetPassword(lpszPassword);
//Fill Start
// SetStartState((WORD)RegProcess.GetDWORD(REG_DOWNLOAD_DEF_START));
DWORD dwDownloadDefaultStart;
pAppRegs->GetVal(REG_DOWNLOADDEFAULT_START, &dwDownloadDefaultStart);
SetStartState((WORD)dwDownloadDefaultStart);
//Fill Http and Ftp Proxy CBX
// SetFtpProxyIndex((WORD)RegProcess.GetDWORD(REG_PROXY_DEFAULT_FOR_FTP));
DWORD dwDownloadDefaultProxyForFtp;
pAppRegs->GetVal(REG_PROXY_DEFAULTFORFTP, &dwDownloadDefaultProxyForFtp);
SetFtpProxyIndex((WORD)dwDownloadDefaultProxyForFtp);
//SetHttpProxyIndex((WORD)RegProcess.GetDWORD(REG_PROXY_DEFAULT_FOR_HTTP));
DWORD dwDownloadDefaultProxyForHttp;
pAppRegs->GetVal(REG_PROXY_DEFAULTFORHTTP, &dwDownloadDefaultProxyForHttp);
SetHttpProxyIndex((WORD)dwDownloadDefaultProxyForHttp);
//Fill File complete state
m_iIsFileCompleted = UNCOMPLETED;
//Fill File size
m_iSizeOfFile = -1;
//Fill 1 byte unknown
m_pbUnknown4[0] = 0;
//Fill 3 file relevant time
m_iFileCreateTime = m_iItemCompleteTime = m_iItemCompleteTime = -1;
//Fill Donwload costing
m_iDownloadingTimeCosted = 0;
m_arSubStitutedUrl.RemoveAll();
m_arBrkPosArray.RemoveAll();
m_arJetsInfo.RemoveAll();
m_iRetries = 0;
return TRUE;
}
void CListItem::SetAttr(int iAttrIndex, BOOL bIsOn)
{
if (bIsOn)
{
m_iAttribute |= iAttrIndex;
}
else
{
DWORD dwMask = 0XFFFFFFFF - iAttrIndex;
m_iAttribute &= dwMask;
}
}
void CListItem::SetDownloadedToCategory(int iCategoryID)
{
m_iDownloadedToCategory = iCategoryID;
}
void CListItem::SetDownloadedFolder(LPCTSTR lpszFolder)
{
m_strDownloadFolder = lpszFolder;
}
void CListItem::SetSplitsCount(int iSplitsCount)
{
m_iConcurrentThreadNumber = iSplitsCount;
}
void CListItem::SetUserName(LPCTSTR lpszUserName)
{
m_strUserName = lpszUserName;
}
void CListItem::SetPassword(LPCTSTR lpszPassword)
{
m_strPasswd = lpszPassword;
}
void CListItem::SetStartState(WORD wStartState)
{
m_wStartState = wStartState;
}
void CListItem::SetFtpProxyIndex(WORD wIndex)
{
m_wFtpProxyIndex = wIndex;
}
void CListItem::SetHttpProxyIndex(WORD wIndex)
{
m_wHttpProxyIndex = wIndex;
}
void CListItem::SetUrl(LPCTSTR lpszUrl)
{
m_strURL = lpszUrl;
}
void CListItem::SetREF(LPCTSTR lpszRefer)
{
m_strREF = lpszRefer;
}
void CListItem::ClearSubstitutedURLs()
{
PSUBSTITUTEDURL pSubsUrl;
for (int i = 0; i < GetCountOfSubstitutedURLs(); i ++)
{
pSubsUrl = m_arSubStitutedUrl[i];
delete pSubsUrl;
}
m_arSubStitutedUrl.RemoveAll();
}
void CListItem::AddSubstitutedURL(LPCTSTR lpszSubUrl, int iUnknown)
{
if (m_arBrkPosArray.GetSize() < MAX_SIM_DOWNLOAD_JETS)
{
PSUBSTITUTEDURL pSubsUrl = new SUBSTITUTEDURL;
pSubsUrl->m_strSubstitutedURL = lpszSubUrl;
*(int *)pSubsUrl->pbUnknown = iUnknown;
m_arSubStitutedUrl.Add(pSubsUrl);
}
}
void CListItem::SetRename(LPCTSTR lpszRename)
{
m_strRename = lpszRename;
}
void CListItem::SetComment(LPCTSTR lpszComment)
{
m_strComment = lpszComment;
}
void CListItem::SetItemCreateTime(time_t tItemCreateTime)
{
m_iItemCreateTime = tItemCreateTime;
}
LPCTSTR CListItem::GetRenameByURL(LPCTSTR lpszUrl)
{
if (!lpszUrl
|| strlen(lpszUrl) == 0)
{
return "";
}
CString strUrl = lpszUrl;
int iPos = -1;
strUrl.MakeLower();
iPos = strUrl.Find("http://");
//first try to find "http://" or "ftp://"
if (iPos == -1)
{
iPos = strUrl.Find("ftp://");
if (iPos == -1)
{
return NULL;
}
else
{
iPos = strlen("ftp://");
}
}
else
{
iPos = strlen("http://");
}
//If no more text contained in the URL, or the next char is '\'(illegal), just retrun;
if (iPos == strUrl.GetLength()
|| strUrl.GetAt(iPos) == TCHAR('/'))
{
return NULL;
}
int iLastBSlashPos;
iLastBSlashPos = strUrl.ReverseFind('/');
//if the remain text does not contain '/' or the last char is '/'
//return "index.htm"
if (iLastBSlashPos == strUrl.GetLength() - 1
|| iLastBSlashPos < iPos)
{
return "index.htm";
}
else
{
//Now we can make the rename now.
return lpszUrl + iLastBSlashPos + 1;
}
};
void CListItem::ClearJetInfo()
{
m_arJetsInfo.RemoveAll();
}
void CListItem::AddJetInfo(int iIndex, LPCTSTR lpszJetInfo)
{
if (iIndex >= m_arJetsInfo.GetSize())
{
m_arJetsInfo.SetSize(iIndex + 1);
}
m_arJetsInfo[iIndex] += lpszJetInfo;
CString strTmp;
strTmp = m_arJetsInfo[iIndex];
}
CObject * CListItem::GetBrkPosArray()
{
return (CObject *)&m_arBrkPosArray;
}
void CListItem::SetFileSize(DWORD dwFileSize)
{
m_iSizeOfFile = dwFileSize;
}
void CListItem::SetFileStatus(int iStatus)
{
m_iIsFileCompleted = iStatus;
}
LPCTSTR CListItem::GetJetInfo(int iIndex)
{
return m_arJetsInfo[iIndex];
}
int CListItem::GetCountOfJets()
{
return m_arJetsInfo.GetSize();
}
void CListItem::SetDirty(BOOL bDirty)
{
m_bDirty = bDirty;
}
BOOL CListItem::IsDirty()
{
return m_bDirty;
}