00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_DOWNLOADWITHEXTRAS_H__EDD3177D_5313_4C8C_900A_4D5B3DE93BB9__INCLUDED_)
00023 #define AFX_DOWNLOADWITHEXTRAS_H__EDD3177D_5313_4C8C_900A_4D5B3DE93BB9__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "DownloadWithSearch.h"
00028
00029 class CDownloadMonitorDlg;
00030 class CFilePreviewDlg;
00031
00032
00033
00034 class CDownloadReview
00035 {
00036
00037 public:
00038 CDownloadReview();
00039 CDownloadReview(in_addr *pIP, int nUserPicture, int nRating, LPCTSTR pszUserName, LPCTSTR pszComment);
00040 ~CDownloadReview();
00041
00042
00043 public:
00044 in_addr m_pUserIP;
00045 int m_nUserPicture;
00046 CString m_sUserName;
00047 int m_nFileRating;
00048 CString m_sFileComments;
00049
00050 CDownloadReview* m_pNext;
00051 CDownloadReview* m_pPrev;
00052
00053
00054 void Serialize(CArchive& ar, int nVersion);
00055
00056 friend class CDownloadWithExtras;
00057 };
00058
00059 class CDownloadWithExtras : public CDownloadWithSearch
00060 {
00061
00062 public:
00063 CDownloadWithExtras();
00064 virtual ~CDownloadWithExtras();
00065
00066
00067 protected:
00068 CStringList m_pPreviews;
00069 CDownloadMonitorDlg* m_pMonitorWnd;
00070 CFilePreviewDlg* m_pPreviewWnd;
00071
00072 protected:
00073 CDownloadReview* m_pReviewFirst;
00074 CDownloadReview* m_pReviewLast;
00075 int m_nReviewCount;
00076
00077
00078 public:
00079 BOOL Preview(CSingleLock* pLock = NULL);
00080 BOOL IsPreviewVisible() const;
00081 BOOL CanPreview();
00082 void AddPreviewName(LPCTSTR pszFile);
00083 void DeletePreviews();
00084 BOOL AddReview(IN_ADDR* pIP, int nUserPicture, int nRating, LPCTSTR pszUserName, LPCTSTR pszComment);
00085 BOOL AddReview(CDownloadReview* pReview);
00086 void DeleteReviews();
00087 void DeleteReview(CDownloadReview* pReview);
00088 inline int GetReviewCount() const { return m_nReviewCount; }
00089 inline CDownloadReview* GetFirstReview() const { return m_pReviewFirst; }
00090 CDownloadReview* FindReview(IN_ADDR* pIP) const;
00091 CDownloadReview* FindReview(LPCTSTR pszUserName) const;
00092 CDownloadReview* FindReview(int nRating, LPCTSTR pszName, LPCTSTR pszComment) const;
00093 int GetReviewAverage() const;
00094
00095 public:
00096 void ShowMonitor(CSingleLock* pLock = NULL);
00097 BOOL IsMonitorVisible() const;
00098
00099 public:
00100 virtual void Serialize(CArchive& ar, int nVersion);
00101
00102 friend class CDownloadMonitorDlg;
00103 friend class CFilePreviewDlg;
00104
00105 };
00106
00107 #endif // !defined(AFX_DOWNLOADWITHEXTRAS_H__EDD3177D_5313_4C8C_900A_4D5B3DE93BB9__INCLUDED_)