From b23ea7975d1d7efdd1f021f03eb0607427ae461c Mon Sep 17 00:00:00 2001 From: gagan Date: Tue, 5 May 1998 00:37:53 +0000 Subject: [PATCH] Added the test example. NSPR changes. git-svn-id: svn://10.0.0.236/trunk@1114 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/network/cache/nu/include/Makefile | 2 +- .../network/cache/nu/public/nsCacheManager.h | 12 +- .../network/cache/nu/public/nsCacheModule.h | 54 +- .../network/cache/nu/public/nsCacheObject.h | 86 +-- .../network/cache/nu/public/nsDiskModule.h | 4 +- mozilla/network/cache/nu/public/nsMemModule.h | 10 +- .../network/cache/nu/src/nsCacheManager.cpp | 26 +- .../network/cache/nu/src/nsCacheModule.cpp | 4 +- .../network/cache/nu/src/nsCacheObject.cpp | 16 +- mozilla/network/cache/nu/src/nsDiskModule.cpp | 7 +- .../network/cache/nu/src/nsMemCacheObject.cpp | 2 +- mozilla/network/cache/nu/src/nsMemModule.cpp | 30 +- .../cache/nu/tests/cb/CacheTreeView.cpp | 104 ++++ .../network/cache/nu/tests/cb/CacheTreeView.h | 54 ++ mozilla/network/cache/nu/tests/cb/MainFrm.cpp | 128 +++++ mozilla/network/cache/nu/tests/cb/MainFrm.h | 48 ++ mozilla/network/cache/nu/tests/cb/StdAfx.cpp | 6 + mozilla/network/cache/nu/tests/cb/StdAfx.h | 16 + mozilla/network/cache/nu/tests/cb/cb.cpp | 140 +++++ mozilla/network/cache/nu/tests/cb/cb.h | 36 ++ mozilla/network/cache/nu/tests/cb/cb.mak | 492 ++++++++++++++++++ mozilla/network/cache/nu/tests/cb/cb.mdp | Bin 0 -> 18434 bytes mozilla/network/cache/nu/tests/cb/cbDoc.cpp | 75 +++ mozilla/network/cache/nu/tests/cb/cbDoc.h | 43 ++ mozilla/network/cache/nu/tests/cb/cbView.cpp | 157 ++++++ mozilla/network/cache/nu/tests/cb/cbView.h | 54 ++ .../network/cache/nu/tests/cb/res/Toolbar.bmp | Bin 0 -> 1078 bytes .../cache/nu/tests/cb/res/cacheico.bmp | Bin 0 -> 502 bytes mozilla/network/cache/nu/tests/cb/res/cb.ico | Bin 0 -> 1078 bytes mozilla/network/cache/nu/tests/cb/res/cb.rc2 | 13 + .../network/cache/nu/tests/cb/res/cbDoc.ico | Bin 0 -> 1078 bytes mozilla/network/cache/nu/tests/cb/resource.h | 20 + 32 files changed, 1511 insertions(+), 128 deletions(-) create mode 100644 mozilla/network/cache/nu/tests/cb/CacheTreeView.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/CacheTreeView.h create mode 100644 mozilla/network/cache/nu/tests/cb/MainFrm.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/MainFrm.h create mode 100644 mozilla/network/cache/nu/tests/cb/StdAfx.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/StdAfx.h create mode 100644 mozilla/network/cache/nu/tests/cb/cb.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/cb.h create mode 100644 mozilla/network/cache/nu/tests/cb/cb.mak create mode 100644 mozilla/network/cache/nu/tests/cb/cb.mdp create mode 100644 mozilla/network/cache/nu/tests/cb/cbDoc.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/cbDoc.h create mode 100644 mozilla/network/cache/nu/tests/cb/cbView.cpp create mode 100644 mozilla/network/cache/nu/tests/cb/cbView.h create mode 100644 mozilla/network/cache/nu/tests/cb/res/Toolbar.bmp create mode 100644 mozilla/network/cache/nu/tests/cb/res/cacheico.bmp create mode 100644 mozilla/network/cache/nu/tests/cb/res/cb.ico create mode 100644 mozilla/network/cache/nu/tests/cb/res/cb.rc2 create mode 100644 mozilla/network/cache/nu/tests/cb/res/cbDoc.ico create mode 100644 mozilla/network/cache/nu/tests/cb/resource.h diff --git a/mozilla/network/cache/nu/include/Makefile b/mozilla/network/cache/nu/include/Makefile index a9c6b6eed17..32a3a645054 100644 --- a/mozilla/network/cache/nu/include/Makefile +++ b/mozilla/network/cache/nu/include/Makefile @@ -17,7 +17,7 @@ -DEPTH = ../../.. +DEPTH = ../../../.. MODULE = cache diff --git a/mozilla/network/cache/nu/public/nsCacheManager.h b/mozilla/network/cache/nu/public/nsCacheManager.h index 858fac89a9c..c1fced131ea 100644 --- a/mozilla/network/cache/nu/public/nsCacheManager.h +++ b/mozilla/network/cache/nu/public/nsCacheManager.h @@ -39,17 +39,17 @@ public: nsCacheManager(); ~nsCacheManager(); - int AddModule(nsCacheModule* i_cacheModule); - int Contains(const char* i_url) const; - int Entries() const; + PRInt32 AddModule(nsCacheModule* i_cacheModule); + PRBool Contains(const char* i_url) const; + PRInt32 Entries() const; /* Singleton */ static nsCacheManager* GetInstance(); nsCacheObject* GetObject(const char* i_url) const; - nsCacheModule* GetModule(int i_index) const; + nsCacheModule* GetModule(PRInt32 i_index) const; const char* Trace() const; - /* Performance measure- TODO change to microsec PR_ */ - int WorstCaseTime() const; + /* Performance measure- microseconds */ + PRUint32 WorstCaseTime() const; protected: nsCacheModule* LastModule() const; diff --git a/mozilla/network/cache/nu/public/nsCacheModule.h b/mozilla/network/cache/nu/public/nsCacheModule.h index c502e15cbf3..722cd9c1bdf 100644 --- a/mozilla/network/cache/nu/public/nsCacheModule.h +++ b/mozilla/network/cache/nu/public/nsCacheModule.h @@ -35,40 +35,43 @@ class nsCacheModule public: nsCacheModule(); - nsCacheModule(const long i_size); + nsCacheModule(const PRUint32 i_size); virtual ~nsCacheModule(); virtual - int AddObject(nsCacheObject* i_pObject)=0; + PRBool AddObject(nsCacheObject* i_pObject)=0; virtual - int Contains(const char* i_url) const=0; + PRBool Contains(const char* i_url) const=0; virtual - int Contains(nsCacheObject* i_pObject) const=0; - void Enable(int i_Enable); - const int Entries() const; - nsCacheObject* GetFirstObject() const ; + PRBool Contains(nsCacheObject* i_pObject) const=0; + void Enable(PRBool i_Enable); + const PRUint32 Entries() const; + + nsCacheObject* GetFirstObject() const ;//TODO-?/ virtual nsCacheObject* GetObject(const char* i_url) const=0; virtual - nsCacheObject* GetObject(long i_index) const =0; + nsCacheObject* GetObject(PRUint32 i_index) const =0; + + PRBool IsEnabled() const; - int IsEnabled() const; nsCacheModule* Next() const; void Next(nsCacheModule*); - const long Size() const; + + const PRUint32 Size() const; + void Size(const PRUint32 i_size); + const char* Trace() const; protected: - void Size(const long i_size); - - int m_Entries; - long m_Size; - int m_Enabled; + PRUint32 m_Entries; + PRUint32 m_Size; + PRBool m_Enabled; nsCacheModule* m_pNext; @@ -78,31 +81,24 @@ private: }; -#if 0 // XXX remove -inline int nsCacheModule::Contains(nsCacheObject* i_pObject) const +inline void nsCacheModule::Enable(PRBool i_Enable) { - return 0; -} -#endif - -inline void nsCacheModule::Enable(int i_Enable) -{ - m_Enabled = (i_Enable > 0) ? 1 : 0; + m_Enabled = i_Enable; } -inline int nsCacheModule::IsEnabled() const +inline PRBool nsCacheModule::IsEnabled() const { return m_Enabled; } -inline const int nsCacheModule::Entries() const +inline const PRUint32 nsCacheModule::Entries() const { return m_Entries; } inline nsCacheObject* nsCacheModule::GetFirstObject() const { - return this->GetObject((long)0); + return this->GetObject((PRUint32)0); } inline nsCacheModule* nsCacheModule::Next() const @@ -115,12 +111,12 @@ inline void nsCacheModule::Next(nsCacheModule* pNext) m_pNext = pNext; } -inline const long nsCacheModule::Size() const +inline const PRUint32 nsCacheModule::Size() const { return m_Size; } -inline void nsCacheModule::Size(const long size) +inline void nsCacheModule::Size(const PRUint32 size) { m_Size = size; } diff --git a/mozilla/network/cache/nu/public/nsCacheObject.h b/mozilla/network/cache/nu/public/nsCacheObject.h index df4c2c252b6..15ef6085f1e 100644 --- a/mozilla/network/cache/nu/public/nsCacheObject.h +++ b/mozilla/network/cache/nu/public/nsCacheObject.h @@ -23,6 +23,9 @@ #include "nsISupports.h" #endif +#include +#include + class nsCacheObject //: public nsISupports { @@ -47,43 +50,48 @@ public: */ - void Address(const char* i_url); + void Address(const char* i_url); const char* Address(void) const; - void Etag(const char* i_etag); + void Etag(const char* i_etag); const char* Etag(void) const; - long Expires(void) const; - void Expires(long i_Expires); + PRIntervalTime + Expires(void) const; + void Expires(PRIntervalTime i_Expires); - int Hits(void) const; - int IsExpired(void) const; - int IsPartial(void) const; - long LastAccessed(void) const; + PRUint16 Hits(void) const; + PRBool IsExpired(void) const; + PRBool IsPartial(void) const; + PRIntervalTime + LastAccessed(void) const; - long LastModified(void) const; - void LastModified(long i_lastModified); + PRIntervalTime + LastModified(void) const; + void LastModified(PRIntervalTime i_lastModified); - long Size(void) const; - void Size(long s); + PRUint32 Size(void) const; + void Size(PRUint32 s); - const char* Trace() const; + const char* + Trace() const; // virtual void getReadStream(); // virtual void getWriteStream(); protected: - void Init(); + void Init(); - char* m_Etag; - long m_Expires; - int m_Flags; - int m_Hits; - long m_LastAccessed; - long m_LastModified; - long m_Size; - char* m_Url; + char* m_Etag; + PRIntervalTime + m_Expires; + int m_Flags; + PRUint16 m_Hits; + PRIntervalTime + m_LastAccessed, m_LastModified; + PRUint32 m_Size; + char* m_Url; private: nsCacheObject& operator=(const nsCacheObject& x); @@ -99,55 +107,53 @@ inline const char* nsCacheObject::Etag(void) const return m_Etag; } -inline long nsCacheObject::Expires(void) const +inline PRIntervalTime nsCacheObject::Expires(void) const { return m_Expires; }; -inline void nsCacheObject::Expires(long i_Expires) +inline void nsCacheObject::Expires(PRIntervalTime i_Expires) { m_Expires = i_Expires; } -inline int nsCacheObject::Hits(void) const +inline PRUint16 nsCacheObject::Hits(void) const { return m_Hits; } -#ifndef _DEBUG -inline int nsCacheObject::IsExpired(void) const +inline PRBool nsCacheObject::IsExpired(void) const { - time_t now = time(); - return (m_Expires <= now) ? 1 : 0; -} -#endif - -inline int nsCacheObject::IsPartial(void) const -{ - return (m_Flags & nsCacheObject::PARTIAL) ? 1 : 0; + PRIntervalTime now = PR_IntervalNow(); + return (m_Expires <= now); } -inline long nsCacheObject::LastAccessed(void) const +inline PRBool nsCacheObject::IsPartial(void) const +{ + return (m_Flags & nsCacheObject::PARTIAL); +} + +inline PRIntervalTime nsCacheObject::LastAccessed(void) const { return m_LastAccessed; } -inline long nsCacheObject::LastModified(void) const +inline PRIntervalTime nsCacheObject::LastModified(void) const { return m_LastModified; } -inline void nsCacheObject::LastModified(long i_LastModified) +inline void nsCacheObject::LastModified(PRIntervalTime i_LastModified) { m_LastModified = i_LastModified; } -inline long nsCacheObject::Size(void) const +inline PRUint32 nsCacheObject::Size(void) const { return m_Size; } -inline void nsCacheObject::Size(long i_Size) +inline void nsCacheObject::Size(PRUint32 i_Size) { m_Size = i_Size; } diff --git a/mozilla/network/cache/nu/public/nsDiskModule.h b/mozilla/network/cache/nu/public/nsDiskModule.h index 0420db31e8e..5eada988b8f 100644 --- a/mozilla/network/cache/nu/public/nsDiskModule.h +++ b/mozilla/network/cache/nu/public/nsDiskModule.h @@ -32,8 +32,8 @@ class nsDiskModule : public nsCacheModule public: nsDiskModule(); ~nsDiskModule(); - int AddObject(nsCacheObject* i_pObject); - nsCacheObject* GetObject(long i_index) const; + PRBool AddObject(nsCacheObject* i_pObject); + nsCacheObject* GetObject(PRUint32 i_index) const; private: nsDiskModule(const nsDiskModule& dm); diff --git a/mozilla/network/cache/nu/public/nsMemModule.h b/mozilla/network/cache/nu/public/nsMemModule.h index 3b5ec0c6471..d6eb2318c23 100644 --- a/mozilla/network/cache/nu/public/nsMemModule.h +++ b/mozilla/network/cache/nu/public/nsMemModule.h @@ -33,13 +33,13 @@ class nsMemModule : public nsCacheModule public: nsMemModule(); - nsMemModule(const long size); + nsMemModule(const PRUint32 size); ~nsMemModule(); - int AddObject(nsCacheObject* i_pObject); - int Contains(nsCacheObject* i_pObject) const; - int Contains(const char* i_url) const; - nsCacheObject* GetObject(long i_index) const; + PRBool AddObject(nsCacheObject* i_pObject); + PRBool Contains(nsCacheObject* i_pObject) const; + PRBool Contains(const char* i_url) const; + nsCacheObject* GetObject(PRUint32 i_index) const; nsCacheObject* GetObject(const char* i_url) const; // Start of nsMemModule specific stuff... diff --git a/mozilla/network/cache/nu/src/nsCacheManager.cpp b/mozilla/network/cache/nu/src/nsCacheManager.cpp index 970b6681dcb..50edac9e295 100644 --- a/mozilla/network/cache/nu/src/nsCacheManager.cpp +++ b/mozilla/network/cache/nu/src/nsCacheManager.cpp @@ -21,6 +21,8 @@ * */ +#include +#include #include "nsCacheManager.h" #include "nsCacheTrace.h" #include "nsCacheModule.h" @@ -60,7 +62,7 @@ const char* nsCacheManager::Trace() const return total; } -int nsCacheManager::AddModule(nsCacheModule* pModule) +PRInt32 nsCacheManager::AddModule(nsCacheModule* pModule) { if (pModule) { @@ -75,7 +77,7 @@ int nsCacheManager::AddModule(nsCacheModule* pModule) return -1; } -int nsCacheManager::Contains(const char* i_url) const +PRBool nsCacheManager::Contains(const char* i_url) const { if (m_pFirstModule) { @@ -84,12 +86,12 @@ int nsCacheManager::Contains(const char* i_url) const { if (pModule->Contains(i_url)) { - return 1; + return PR_TRUE; } pModule = pModule->Next(); } } - return 0; + return PR_FALSE; } nsCacheObject* nsCacheManager::GetObject(const char* i_url) const @@ -109,11 +111,11 @@ nsCacheObject* nsCacheManager::GetObject(const char* i_url) const return 0; } -int nsCacheManager::Entries() const +PRInt32 nsCacheManager::Entries() const { if (m_pFirstModule) { - int count=1; + PRInt32 count=1; nsCacheModule* pModule = m_pFirstModule; while (pModule = pModule->Next()) { @@ -124,12 +126,12 @@ int nsCacheManager::Entries() const return 0; } -nsCacheModule* nsCacheManager::GetModule(int i_index) const +nsCacheModule* nsCacheManager::GetModule(PRInt32 i_index) const { if ((i_index < 0) || (i_index >= Entries())) return 0; nsCacheModule* pModule = m_pFirstModule; - for (int i=0; i<=i_index; pModule = pModule->Next()) + for (PRInt32 i=0; i<=i_index; pModule = pModule->Next()) i++; #ifdef DEBUG assert(pModule); @@ -150,11 +152,9 @@ nsCacheModule* nsCacheManager::LastModule() const return 0; } -int nsCacheManager::WorstCaseTime() const +PRUint32 nsCacheManager::WorstCaseTime() const { - long delta = time(0); + PRIntervalTime start = PR_IntervalNow(); while (this->Contains("a vague string that should not be in any of the modules")); - delta -= time(0); - return delta*(-1); - + return PR_IntervalToMicroseconds(PR_IntervalNow() - start); } \ No newline at end of file diff --git a/mozilla/network/cache/nu/src/nsCacheModule.cpp b/mozilla/network/cache/nu/src/nsCacheModule.cpp index 55e85dda4f6..067b38dd123 100644 --- a/mozilla/network/cache/nu/src/nsCacheModule.cpp +++ b/mozilla/network/cache/nu/src/nsCacheModule.cpp @@ -36,7 +36,7 @@ nsCacheModule::nsCacheModule(): { } -nsCacheModule::nsCacheModule(const long i_size): +nsCacheModule::nsCacheModule(const PRUint32 i_size): m_Size(i_size), m_pNext(0), m_Entries(0) @@ -57,7 +57,7 @@ const char* nsCacheModule::Trace() const char linebuffer[128]; char* total = 0; - sprintf(linebuffer, "CacheModule: Objects = %d\n", Entries()); + sprintf(linebuffer, "nsCacheModule: Objects = %d\n", Entries()); APPEND(linebuffer); return total; diff --git a/mozilla/network/cache/nu/src/nsCacheObject.cpp b/mozilla/network/cache/nu/src/nsCacheObject.cpp index 8f2bd8103ff..2facb96da35 100644 --- a/mozilla/network/cache/nu/src/nsCacheObject.cpp +++ b/mozilla/network/cache/nu/src/nsCacheObject.cpp @@ -16,7 +16,6 @@ * Reserved. */ #include -#include #include #include "nsCacheObject.h" @@ -29,7 +28,7 @@ * */ -const int DEFAULT_EXPIRES = 86400; +static const PRIntervalTime DEFAULT_EXPIRES = PR_SecondsToInterval(86400); nsCacheObject::nsCacheObject(): m_Flags(INIT), @@ -70,6 +69,7 @@ nsCacheObject::nsCacheObject(const char* i_url): Init(); assert(i_url); strcpy(m_Url, i_url); + *m_Etag = '\0'; } void nsCacheObject::Address(const char* i_url) @@ -81,14 +81,6 @@ void nsCacheObject::Address(const char* i_url) strcpy(m_Url, i_url); } -#ifdef _DEBUG -int nsCacheObject::IsExpired(void) const -{ - time_t now = time(0); - return (m_Expires > now) ? 0 : 1; -} -#endif - void nsCacheObject::Etag(const char* i_etag) { assert(i_etag && *i_etag); @@ -100,8 +92,8 @@ void nsCacheObject::Etag(const char* i_etag) void nsCacheObject::Init() { - time_t now = time(0); - m_Expires = now + DEFAULT_EXPIRES; + m_Expires = PR_IntervalNow() + DEFAULT_EXPIRES; + m_Hits = 0; } const char* nsCacheObject::Trace() const diff --git a/mozilla/network/cache/nu/src/nsDiskModule.cpp b/mozilla/network/cache/nu/src/nsDiskModule.cpp index 90e3be88208..85a832f4824 100644 --- a/mozilla/network/cache/nu/src/nsDiskModule.cpp +++ b/mozilla/network/cache/nu/src/nsDiskModule.cpp @@ -23,6 +23,7 @@ * */ +#include #include "nsDiskModule.h" #include "nsCacheObject.h" // @@ -38,12 +39,12 @@ nsDiskModule::~nsDiskModule() } -nsCacheObject* nsDiskModule::GetObject(long i_index) const +nsCacheObject* nsDiskModule::GetObject(PRUint32 i_index) const { return 0; } -int nsDiskModule::AddObject(nsCacheObject* i_pObject) +PRBool nsDiskModule::AddObject(nsCacheObject* i_pObject) { - return 0; + return PR_FALSE; } diff --git a/mozilla/network/cache/nu/src/nsMemCacheObject.cpp b/mozilla/network/cache/nu/src/nsMemCacheObject.cpp index d9716125f38..e45be7828cf 100644 --- a/mozilla/network/cache/nu/src/nsMemCacheObject.cpp +++ b/mozilla/network/cache/nu/src/nsMemCacheObject.cpp @@ -22,7 +22,7 @@ * Gagan Saksena 04/22/98 * */ - +#include #include "nsMemCacheObject.h" nsMemCacheObject::~nsMemCacheObject() diff --git a/mozilla/network/cache/nu/src/nsMemModule.cpp b/mozilla/network/cache/nu/src/nsMemModule.cpp index d420915a4c7..943625a5f84 100644 --- a/mozilla/network/cache/nu/src/nsMemModule.cpp +++ b/mozilla/network/cache/nu/src/nsMemModule.cpp @@ -16,9 +16,11 @@ * Reserved. */ +#include +#include + #include "nsMemModule.h" #include "nsMemCacheObject.h" -#include /* * nsMemModule @@ -28,16 +30,16 @@ */ -const long DEFAULT_SIZE = 5*1024*1024; +static const PRUint32 DEFAULT_SIZE = 5*1024*1024; nsMemModule::nsMemModule():m_pFirstObject(0) { - //Size(DEFAULT_SIZE); + Size(DEFAULT_SIZE); } -nsMemModule::nsMemModule(const long size):m_pFirstObject(0) +nsMemModule::nsMemModule(const PRUint32 size): m_pFirstObject(0) { - Size(size); + Size(size); } nsMemModule::~nsMemModule() @@ -48,7 +50,7 @@ nsMemModule::~nsMemModule() } } -int nsMemModule::AddObject(nsCacheObject* i_pObject) +PRBool nsMemModule::AddObject(nsCacheObject* i_pObject) { if (i_pObject) { @@ -61,12 +63,12 @@ int nsMemModule::AddObject(nsCacheObject* i_pObject) m_pFirstObject = new nsMemCacheObject(*i_pObject); } m_Entries++; - return 1; + return PR_TRUE; } - return 0; + return PR_FALSE; } -int nsMemModule::Contains(const char* i_url) const +PRBool nsMemModule::Contains(const char* i_url) const { if (m_pFirstObject && i_url && *i_url) { @@ -75,15 +77,15 @@ int nsMemModule::Contains(const char* i_url) const do { if (0 == _strnicmp(pObj->Address(), i_url, inlen)) - return 1; + return PR_TRUE; pObj = pObj->Next(); } while (pObj); } - return 0; + return PR_FALSE; } -int nsMemModule::Contains(nsCacheObject* i_pObject) const +PRBool nsMemModule::Contains(nsCacheObject* i_pObject) const { if (i_pObject && i_pObject->Address()) { @@ -106,12 +108,12 @@ int nsMemModule::Contains(nsCacheObject* i_pObject) const */ } -nsCacheObject* nsMemModule::GetObject(long i_index) const +nsCacheObject* nsMemModule::GetObject(PRUint32 i_index) const { nsMemCacheObject* pNth = 0; if (m_pFirstObject) { - int index = 0; + PRUint32 index = 0; pNth = m_pFirstObject; while (pNth->Next() && (index++ != i_index )) { diff --git a/mozilla/network/cache/nu/tests/cb/CacheTreeView.cpp b/mozilla/network/cache/nu/tests/cb/CacheTreeView.cpp new file mode 100644 index 00000000000..052f8bad5b4 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/CacheTreeView.cpp @@ -0,0 +1,104 @@ +// CacheTreeView.cpp : implementation file +// + +#include "stdafx.h" +#include "cb.h" +#include "CacheTreeView.h" +#include "cbdoc.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCacheTreeView + +IMPLEMENT_DYNCREATE(CCacheTreeView, CTreeView) + +CCacheTreeView::CCacheTreeView() +{ + m_pImgList = new CImageList(); +} + +CCacheTreeView::~CCacheTreeView() +{ + delete m_pImgList; +} + + +BEGIN_MESSAGE_MAP(CCacheTreeView, CTreeView) + //{{AFX_MSG_MAP(CCacheTreeView) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +int CCacheTreeView::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + + lpCreateStruct->style = TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT; + if (CView::OnCreate(lpCreateStruct) == -1) + return -1; + + GetDocument()->m_pTreeView = this; + + // Create the Image List + m_pImgList->Create(IDB_CACHEICONS,16,0,RGB(255,0,255)); + m_pImgList->SetBkColor(GetSysColor(COLOR_WINDOW)); + + // Attach image list to Tree + GetTreeCtrl().SetImageList(m_pImgList, TVSIL_NORMAL); + GetTreeCtrl().SetIndent(10); + return 0; +} + +void CCacheTreeView::OnDraw(CDC* pDC) +{ + CDocument* pDoc = GetDocument(); + // TODO: add draw code here +} + + +#ifdef _DEBUG +void CCacheTreeView::AssertValid() const +{ + CTreeView::AssertValid(); +} + +void CCacheTreeView::Dump(CDumpContext& dc) const +{ + CTreeView::Dump(dc); +} + +CCbDoc* CCacheTreeView::GetDocument() +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCbDoc))); + return (CCbDoc*)m_pDocument; +} + +#endif //_DEBUG + +void CCacheTreeView::Populate() { + AssertValid(); + GetTreeCtrl().DeleteAllItems(); + + TV_INSERTSTRUCT insertStruct; + TV_ITEM itemStruct; + + insertStruct.hParent = TVI_ROOT; + insertStruct.hInsertAfter = TVI_FIRST; + insertStruct.item = itemStruct; + + HTREEITEM hti = GetTreeCtrl().InsertItem(&insertStruct); + GetTreeCtrl().SetItemText(hti, "Your Cache"); + + insertStruct.hParent = hti; + insertStruct.hInsertAfter = hti; + insertStruct.item = itemStruct; + + HTREEITEM htiDisk = GetTreeCtrl().InsertItem(&insertStruct); + GetTreeCtrl().SetItemText(htiDisk, "Disk"); + HTREEITEM htiMem = GetTreeCtrl().InsertItem(&insertStruct); + GetTreeCtrl().SetItemText(htiMem, "Memory"); +} \ No newline at end of file diff --git a/mozilla/network/cache/nu/tests/cb/CacheTreeView.h b/mozilla/network/cache/nu/tests/cb/CacheTreeView.h new file mode 100644 index 00000000000..d1bcc0d147d --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/CacheTreeView.h @@ -0,0 +1,54 @@ +// CacheTreeView.h : header file +// +#ifndef _CacheTreeView_h_ +#define _CacheTreeView_h_ + +#include +class CImageList; +class CCbDoc; +class CCacheTreeView : public CTreeView +{ +protected: + CCacheTreeView(); // protected constructor used by dynamic creation + DECLARE_DYNCREATE(CCacheTreeView) + +// Attributes +public: + CCbDoc* GetDocument(); + void Populate(); +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCacheTreeView) + protected: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + //}}AFX_VIRTUAL + +protected: + virtual ~CCacheTreeView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + + // Generated message map functions +protected: + //{{AFX_MSG(CCacheTreeView) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() + + CImageList* m_pImgList; +}; + +#ifndef _DEBUG // debug version in AnimalView.cpp +inline CCbDoc* CCacheTreeView::GetDocument() + { return (CCbDoc*)m_pDocument; } +#endif + +#endif + + diff --git a/mozilla/network/cache/nu/tests/cb/MainFrm.cpp b/mozilla/network/cache/nu/tests/cb/MainFrm.cpp new file mode 100644 index 00000000000..8ebf1b12f5a --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/MainFrm.cpp @@ -0,0 +1,128 @@ +// MainFrm.cpp : implementation of the CMainFrame class +// + +#include "stdafx.h" +#include "cb.h" + +#include "MainFrm.h" +#include "CacheTreeView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame + +IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) + +BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) + //{{AFX_MSG_MAP(CMainFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +static UINT indicators[] = +{ + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, +}; + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame construction/destruction + +CMainFrame::CMainFrame() +{ +} + +CMainFrame::~CMainFrame() +{ +} + +int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + return 0; +} + +BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/, + CCreateContext* pContext) +{ + // create a splitter with 1 row, 2 columns + if (!m_wndSplitter.CreateStatic(this, 1, 2)) + { + TRACE0("Failed to CreateStaticSplitter\n"); + return FALSE; + } + + // add the first splitter pane - the default view in column 0 + if (!m_wndSplitter.CreateView(0, 0, + RUNTIME_CLASS(CCacheTreeView), CSize(250, 50), pContext)) + { + TRACE0("Failed to create first pane\n"); + return FALSE; + } + + // add the second splitter pane - an input view in column 1 + if (!m_wndSplitter.CreateView(0, 1, pContext->m_pNewViewClass, CSize(0, 0), pContext)) + { + TRACE0("Failed to create second pane\n"); + return FALSE; + } + + // activate the tree view + SetActiveView((CView*)m_wndSplitter.GetPane(0,1)); + return TRUE; + +} + +BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) +{ + return CFrameWnd::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame diagnostics + +#ifdef _DEBUG +void CMainFrame::AssertValid() const +{ + CFrameWnd::AssertValid(); +} + +void CMainFrame::Dump(CDumpContext& dc) const +{ + CFrameWnd::Dump(dc); +} + +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CMainFrame message handlers diff --git a/mozilla/network/cache/nu/tests/cb/MainFrm.h b/mozilla/network/cache/nu/tests/cb/MainFrm.h new file mode 100644 index 00000000000..73759dfd181 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/MainFrm.h @@ -0,0 +1,48 @@ +// MainFrm.h : interface of the CMainFrame class +// +///////////////////////////////////////////////////////////////////////////// + +class CMainFrame : public CFrameWnd +{ +protected: // create from serialization only + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) + +// Attributes +protected: + CSplitterWnd m_wndSplitter; +public: + + void Status(const char* mesg); +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + public: + virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CMainFrame(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: // control bar embedded members + CStatusBar m_wndStatusBar; + CToolBar m_wndToolBar; + +// Generated message map functions +protected: + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +inline void CMainFrame::Status(const char* mesg) { + m_wndStatusBar.SetPaneText(0, mesg); +} +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/network/cache/nu/tests/cb/StdAfx.cpp b/mozilla/network/cache/nu/tests/cb/StdAfx.cpp new file mode 100644 index 00000000000..764d580cddf --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/StdAfx.cpp @@ -0,0 +1,6 @@ +// stdafx.cpp : source file that includes just the standard includes +// cb.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + diff --git a/mozilla/network/cache/nu/tests/cb/StdAfx.h b/mozilla/network/cache/nu/tests/cb/StdAfx.h new file mode 100644 index 00000000000..12f69127c68 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/StdAfx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + + + diff --git a/mozilla/network/cache/nu/tests/cb/cb.cpp b/mozilla/network/cache/nu/tests/cb/cb.cpp new file mode 100644 index 00000000000..13d0eeefd63 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cb.cpp @@ -0,0 +1,140 @@ +// cb.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "cb.h" + +#include "MainFrm.h" +#include "cbDoc.h" +#include "cbView.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCbApp + +BEGIN_MESSAGE_MAP(CCbApp, CWinApp) + //{{AFX_MSG_MAP(CCbApp) + ON_COMMAND(ID_APP_ABOUT, OnAppAbout) + //}}AFX_MSG_MAP + // Standard file based document commands + ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) + ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) + // Standard print setup command + ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCbApp construction + +CCbApp::CCbApp() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CCbApp object + +CCbApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CCbApp initialization + +BOOL CCbApp::InitInstance() +{ + // Standard initialization + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + LoadStdProfileSettings(0); // Load standard INI file options (including MRU) + + // Register document templates + + CSingleDocTemplate* pDocTemplate; + pDocTemplate = new CSingleDocTemplate( + IDR_MAINFRAME, + RUNTIME_CLASS(CCbDoc), + RUNTIME_CLASS(CMainFrame), // main SDI frame window + RUNTIME_CLASS(CCbView)); + AddDocTemplate(pDocTemplate); + + // Enable DDE Execute open + EnableShellOpen(); + RegisterShellFileTypes(TRUE); + + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; + + // Enable drag/drop open + m_pMainWnd->DragAcceptFiles(); + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + +// Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +// App command to run the dialog +void CCbApp::OnAppAbout() +{ + CAboutDlg aboutDlg; + aboutDlg.DoModal(); +} + +///////////////////////////////////////////////////////////////////////////// +// CCbApp commands diff --git a/mozilla/network/cache/nu/tests/cb/cb.h b/mozilla/network/cache/nu/tests/cb/cb.h new file mode 100644 index 00000000000..27b8f228a60 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cb.h @@ -0,0 +1,36 @@ +// cb.h : main header file for the CB application +// + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CCbApp: +// See cb.cpp for the implementation of this class +// + +class CCbApp : public CWinApp +{ +public: + CCbApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCbApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CCbApp) + afx_msg void OnAppAbout(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/network/cache/nu/tests/cb/cb.mak b/mozilla/network/cache/nu/tests/cb/cb.mak new file mode 100644 index 00000000000..21a1774de1a --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cb.mak @@ -0,0 +1,492 @@ +# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +!IF "$(CFG)" == "" +CFG=cb - Win32 Debug +!MESSAGE No configuration specified. Defaulting to cb - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "cb - Win32 Release" && "$(CFG)" != "cb - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE on this makefile +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cb.mak" CFG="cb - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cb - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "cb - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF +################################################################################ +# Begin Project +# PROP Target_Last_Scanned "cb - Win32 Debug" +CPP=cl.exe +RSC=rc.exe +MTL=mktyplib.exe + +!IF "$(CFG)" == "cb - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +OUTDIR=.\Release +INTDIR=.\Release + +ALL : "$(OUTDIR)\cb.exe" + +CLEAN : + -@erase "$(INTDIR)\CacheTreeView.obj" + -@erase "$(INTDIR)\cb.obj" + -@erase "$(INTDIR)\cb.pch" + -@erase "$(INTDIR)\cb.res" + -@erase "$(INTDIR)\cbDoc.obj" + -@erase "$(INTDIR)\cbView.obj" + -@erase "$(INTDIR)\MainFrm.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(OUTDIR)\cb.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\dist\public\cache" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\..\dist\public\cache" /D "WIN32"\ + /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/cb.pch"\ + /Yu"stdafx.h" /Fo"$(INTDIR)/" /c +CPP_OBJS=.\Release/ +CPP_SBRS=.\. +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +MTL_PROJ=/nologo /D "NDEBUG" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +RSC_PROJ=/l 0x409 /fo"$(INTDIR)/cb.res" /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/cb.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 +LINK32_FLAGS=/nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)/cb.pdb"\ + /machine:I386 /out:"$(OUTDIR)/cb.exe" +LINK32_OBJS= \ + "$(INTDIR)\CacheTreeView.obj" \ + "$(INTDIR)\cb.obj" \ + "$(INTDIR)\cb.res" \ + "$(INTDIR)\cbDoc.obj" \ + "$(INTDIR)\cbView.obj" \ + "$(INTDIR)\MainFrm.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "..\..\..\..\dist\WIN32_D.OBJ\lib\cachelib.lib" + +"$(OUTDIR)\cb.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +OUTDIR=.\Debug +INTDIR=.\Debug + +ALL : "$(OUTDIR)\cb.exe" "$(OUTDIR)\cb.bsc" + +CLEAN : + -@erase "$(INTDIR)\CacheTreeView.obj" + -@erase "$(INTDIR)\CacheTreeView.sbr" + -@erase "$(INTDIR)\cb.obj" + -@erase "$(INTDIR)\cb.pch" + -@erase "$(INTDIR)\cb.res" + -@erase "$(INTDIR)\cb.sbr" + -@erase "$(INTDIR)\cbDoc.obj" + -@erase "$(INTDIR)\cbDoc.sbr" + -@erase "$(INTDIR)\cbView.obj" + -@erase "$(INTDIR)\cbView.sbr" + -@erase "$(INTDIR)\MainFrm.obj" + -@erase "$(INTDIR)\MainFrm.sbr" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\StdAfx.sbr" + -@erase "$(INTDIR)\vc40.idb" + -@erase "$(INTDIR)\vc40.pdb" + -@erase "$(OUTDIR)\cb.bsc" + -@erase "$(OUTDIR)\cb.exe" + -@erase "$(OUTDIR)\cb.ilk" + -@erase "$(OUTDIR)\cb.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\dist\public\cache" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /V"ERBOSE:lib" /c +CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\dist\public\cache" /D\ + "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/"\ + /Fp"$(INTDIR)/cb.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/"\ + /V"ERBOSE:lib" /c +CPP_OBJS=.\Debug/ +CPP_SBRS=.\Debug/ +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +MTL_PROJ=/nologo /D "_DEBUG" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +RSC_PROJ=/l 0x409 /fo"$(INTDIR)/cb.res" /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/cb.bsc" +BSC32_SBRS= \ + "$(INTDIR)\CacheTreeView.sbr" \ + "$(INTDIR)\cb.sbr" \ + "$(INTDIR)\cbDoc.sbr" \ + "$(INTDIR)\cbView.sbr" \ + "$(INTDIR)\MainFrm.sbr" \ + "$(INTDIR)\StdAfx.sbr" + +"$(OUTDIR)\cb.bsc" : "$(OUTDIR)" $(BSC32_SBRS) + $(BSC32) @<< + $(BSC32_FLAGS) $(BSC32_SBRS) +<< + +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 +# ADD LINK32 ..\..\..\..\dist\win32_d.obj\lib\cachelib.lib /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT LINK32 /nodefaultlib +LINK32_FLAGS=..\..\..\..\dist\win32_d.obj\lib\cachelib.lib /nologo\ + /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)/cb.pdb" /debug\ + /machine:I386 /out:"$(OUTDIR)/cb.exe" +LINK32_OBJS= \ + "$(INTDIR)\CacheTreeView.obj" \ + "$(INTDIR)\cb.obj" \ + "$(INTDIR)\cb.res" \ + "$(INTDIR)\cbDoc.obj" \ + "$(INTDIR)\cbView.obj" \ + "$(INTDIR)\MainFrm.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "..\..\..\..\dist\WIN32_D.OBJ\lib\cachelib.lib" + +"$(OUTDIR)\cb.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.c{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +################################################################################ +# Begin Target + +# Name "cb - Win32 Release" +# Name "cb - Win32 Debug" + +!IF "$(CFG)" == "cb - Win32 Release" + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE=.\cb.cpp +DEP_CPP_CB_CP=\ + ".\cb.h"\ + ".\cbDoc.h"\ + ".\cbView.h"\ + ".\MainFrm.h"\ + ".\StdAfx.h"\ + + +!IF "$(CFG)" == "cb - Win32 Release" + + +"$(INTDIR)\cb.obj" : $(SOURCE) $(DEP_CPP_CB_CP) "$(INTDIR)" "$(INTDIR)\cb.pch" + + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + + +"$(INTDIR)\cb.obj" : $(SOURCE) $(DEP_CPP_CB_CP) "$(INTDIR)" "$(INTDIR)\cb.pch" + +"$(INTDIR)\cb.sbr" : $(SOURCE) $(DEP_CPP_CB_CP) "$(INTDIR)" "$(INTDIR)\cb.pch" + + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\StdAfx.cpp +DEP_CPP_STDAF=\ + ".\StdAfx.h"\ + + +!IF "$(CFG)" == "cb - Win32 Release" + +# ADD CPP /Yc"stdafx.h" + +BuildCmds= \ + $(CPP) /nologo /MD /W3 /GX /O2 /I "..\..\..\..\dist\public\cache" /D "WIN32"\ + /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/cb.pch"\ + /Yc"stdafx.h" /Fo"$(INTDIR)/" /c $(SOURCE) \ + + +"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" + $(BuildCmds) + +"$(INTDIR)\cb.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" + $(BuildCmds) + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + +# ADD CPP /Yc"stdafx.h" + +BuildCmds= \ + $(CPP) /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\dist\public\cache" /D\ + "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/"\ + /Fp"$(INTDIR)/cb.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/"\ + /V"ERBOSE:lib" /c $(SOURCE) \ + + +"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" + $(BuildCmds) + +"$(INTDIR)\StdAfx.sbr" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" + $(BuildCmds) + +"$(INTDIR)\cb.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" + $(BuildCmds) + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\MainFrm.cpp +DEP_CPP_MAINF=\ + ".\CacheTreeView.h"\ + ".\cb.h"\ + ".\MainFrm.h"\ + ".\StdAfx.h"\ + + +!IF "$(CFG)" == "cb - Win32 Release" + + +"$(INTDIR)\MainFrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + + +"$(INTDIR)\MainFrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + +"$(INTDIR)\MainFrm.sbr" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\cbDoc.cpp +DEP_CPP_CBDOC=\ + ".\CacheTreeView.h"\ + ".\cb.h"\ + ".\cbDoc.h"\ + ".\StdAfx.h"\ + + +!IF "$(CFG)" == "cb - Win32 Release" + + +"$(INTDIR)\cbDoc.obj" : $(SOURCE) $(DEP_CPP_CBDOC) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + + +"$(INTDIR)\cbDoc.obj" : $(SOURCE) $(DEP_CPP_CBDOC) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + +"$(INTDIR)\cbDoc.sbr" : $(SOURCE) $(DEP_CPP_CBDOC) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\cbView.cpp + +!IF "$(CFG)" == "cb - Win32 Release" + +DEP_CPP_CBVIE=\ + "..\..\..\..\dist\public\cache\nsCacheManager.h"\ + "..\..\..\..\dist\public\cache\nsCacheModule.h"\ + "..\..\..\..\dist\public\cache\nsCacheObject.h"\ + "..\..\..\..\dist\public\cache\nsDiskModule.h"\ + "..\..\..\..\dist\public\cache\nsMemCacheObject.h"\ + "..\..\..\..\dist\public\cache\nsMemModule.h"\ + ".\cb.h"\ + ".\cbDoc.h"\ + ".\cbView.h"\ + ".\MainFrm.h"\ + ".\StdAfx.h"\ + +NODEP_CPP_CBVIE=\ + "..\..\..\..\dist\public\cache\nsISupports.h"\ + + +"$(INTDIR)\cbView.obj" : $(SOURCE) $(DEP_CPP_CBVIE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + +DEP_CPP_CBVIE=\ + "..\..\..\..\dist\public\cache\nsCacheManager.h"\ + "..\..\..\..\dist\public\cache\nsCacheModule.h"\ + "..\..\..\..\dist\public\cache\nsCacheObject.h"\ + "..\..\..\..\dist\public\cache\nsDiskModule.h"\ + "..\..\..\..\dist\public\cache\nsMemCacheObject.h"\ + "..\..\..\..\dist\public\cache\nsMemModule.h"\ + ".\cb.h"\ + ".\cbDoc.h"\ + ".\cbView.h"\ + ".\MainFrm.h"\ + ".\StdAfx.h"\ + +NODEP_CPP_CBVIE=\ + "..\..\..\..\dist\public\cache\nsISupports.h"\ + + +"$(INTDIR)\cbView.obj" : $(SOURCE) $(DEP_CPP_CBVIE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + +"$(INTDIR)\cbView.sbr" : $(SOURCE) $(DEP_CPP_CBVIE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\cb.rc +DEP_RSC_CB_RC=\ + ".\res\cacheico.bmp"\ + ".\res\cb.ico"\ + ".\res\cb.rc2"\ + ".\res\cbDoc.ico"\ + ".\res\Toolbar.bmp"\ + + +"$(INTDIR)\cb.res" : $(SOURCE) $(DEP_RSC_CB_RC) "$(INTDIR)" + $(RSC) $(RSC_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\CacheTreeView.cpp +DEP_CPP_CACHE=\ + ".\CacheTreeView.h"\ + ".\cb.h"\ + ".\cbDoc.h"\ + ".\StdAfx.h"\ + + +!IF "$(CFG)" == "cb - Win32 Release" + + +"$(INTDIR)\CacheTreeView.obj" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + + +"$(INTDIR)\CacheTreeView.obj" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + +"$(INTDIR)\CacheTreeView.sbr" : $(SOURCE) $(DEP_CPP_CACHE) "$(INTDIR)"\ + "$(INTDIR)\cb.pch" + + +!ENDIF + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=\work\mozilla\dist\WIN32_D.OBJ\lib\cachelib.lib + +!IF "$(CFG)" == "cb - Win32 Release" + +!ELSEIF "$(CFG)" == "cb - Win32 Debug" + +!ENDIF + +# End Source File +# End Target +# End Project +################################################################################ diff --git a/mozilla/network/cache/nu/tests/cb/cb.mdp b/mozilla/network/cache/nu/tests/cb/cb.mdp new file mode 100644 index 0000000000000000000000000000000000000000..c1cb2002a2f403ac8076edb71122cc786ab5f0d8 GIT binary patch literal 18434 zcmeI3TWb?R6vt0&S{t=B+M7j$0WWxKsJ0I(2)3!!NK?h4f<$C8J585tW|rAWY8BBB zVAXp2EI#(#Z{U+(!bh!VHr+I81%0eJL$Vp>ob#V^elyF$kiD^RZM+N8PypBk)H;s9 z2DOeR@TH@xr{XU|4z9y7I0TMGe|#k>okO7Y!28}gHB+Tq1k$h@_BKSh8cmMpYK`*e zwZlCd&sw{JIz)g75CI}U1c(3;AOb{y2oM1xKm>>Y5g-CPoIp49;0aJKWMB{Mg?-Ss z!|S2+|AjyXx*(MVxDK8FB{b-l2oM1xKm>>Y5g-CYfCvx)B0vO)01+Sp{|SNpkc9(q z5C&inhF};*{*$_>jK3j}!L#44%@;qCb3pgs!1mZsT4tXdBhZ3r;aB%503?^VP(8HY3aR ziks@w19#nQ@x1ZND_w5H?ci=mUCHFNvPK7Ec{l2udU3Qb8J#wgR}%|HKOdUmmfMw3 zvZ5dHz^|y9RMy40Z#Tetc1j2tMeMGx18#k-5@Qb<`wEKP;uXoR8lz2O!DQAm^O_Z9 zO`DZu^azd)6oNojc)$uOvZgND^^T+c(7aXxEAUmFmjjf2BxKm`bRrf}4NTQzGkz56 z$Zxm5K>N^?F?@wh>$>uySVDTzOVU_HkKx%sbBkn^HZ{!VW+)9;Eti+*GPvpDH+)aB z@(Q~zjZQRPZ8;Q_e8h!iw`EihTHs!z!$?!1u$gQ;M|-Mk=+ocyx!I6rG0@A2{u?wM zXqpx*7gd&DlA@Ye-=cMY(|SjFKS#bp+i*cyS&;_$Y?u6dbjc@3lg>oanFPRfhSRCy+>N;uq}|S?Y)M7&-H11$lD1Tnr$z*b01+SpM1Tko0U|&IhyW2F h0z03;YIPopulate(); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +// CCbDoc serialization + +void CCbDoc::Serialize(CArchive& ar) +{ + if (ar.IsStoring()) + { + } + else + { + } +} + +///////////////////////////////////////////////////////////////////////////// +// CCbDoc diagnostics + +#ifdef _DEBUG +void CCbDoc::AssertValid() const +{ + CDocument::AssertValid(); +} + +void CCbDoc::Dump(CDumpContext& dc) const +{ + CDocument::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCbDoc commands diff --git a/mozilla/network/cache/nu/tests/cb/cbDoc.h b/mozilla/network/cache/nu/tests/cb/cbDoc.h new file mode 100644 index 00000000000..c995570a62b --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cbDoc.h @@ -0,0 +1,43 @@ +// cbDoc.h : interface of the CCbDoc class +// +///////////////////////////////////////////////////////////////////////////// +class CCacheTreeView; +class CCbDoc : public CDocument +{ +protected: // create from serialization only + CCbDoc(); + DECLARE_DYNCREATE(CCbDoc) + +// Attributes +public: + CCacheTreeView* m_pTreeView; +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCbDoc) + public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCbDoc(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCbDoc) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/network/cache/nu/tests/cb/cbView.cpp b/mozilla/network/cache/nu/tests/cb/cbView.cpp new file mode 100644 index 00000000000..e4eb4548bf2 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cbView.cpp @@ -0,0 +1,157 @@ +// cbView.cpp : implementation of the CCbView class +// + +#include "stdafx.h" +#include "cb.h" + +#include "cbDoc.h" +#include "cbView.h" +#include +#include "MainFrm.h" + +#include "nsCacheManager.h" +#include "nsMemModule.h" +#include "nsDiskModule.h" +#include "nsCacheObject.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define ID_TREECTRL (WM_USER +1) + +#define STATUS(s) ((CMainFrame*)GetParentFrame())->Status(s) + +IMPLEMENT_DYNCREATE(CCbView, CView) + +BEGIN_MESSAGE_MAP(CCbView, CView) + //{{AFX_MSG_MAP(CCbView) + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCbView construction/destruction + +CCbView::CCbView() +{ +} + +CCbView::~CCbView() +{ +} + +BOOL CCbView::PreCreateWindow(CREATESTRUCT& cs) +{ + return CView::PreCreateWindow(cs); +} + +///////////////////////////////////////////////////////////////////////////// +// CCbView drawing + +void CCbView::OnDraw(CDC* pDC) +{ + CRect rect; + GetClientRect(&rect); + pDC->FillSolidRect(rect, RGB(192,192,192)); + rect.DeflateRect(10,10); + + pDC->DrawText(m_Mesg.GetBuffer(m_Mesg.GetLength()), -1, rect, DT_WORDBREAK | DT_EXPANDTABS); +} + +///////////////////////////////////////////////////////////////////////////// +// CCbView printing + +BOOL CCbView::OnPreparePrinting(CPrintInfo* pInfo) +{ + // default preparation + return DoPreparePrinting(pInfo); +} + +void CCbView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ +} + +void CCbView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CCbView diagnostics + +#ifdef _DEBUG +void CCbView::AssertValid() const +{ + CView::AssertValid(); +} + +void CCbView::Dump(CDumpContext& dc) const +{ + CView::Dump(dc); +} + +CCbDoc* CCbView::GetDocument() // non-debug version is inline +{ + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCbDoc))); + return (CCbDoc*)m_pDocument; +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CCbView message handlers + +void CCbView::OnInitialUpdate() +{ + STATUS("Loading lib..."); + + nsCacheManager* pCM = nsCacheManager::GetInstance(); + nsMemModule* pMM = new nsMemModule(); + pCM->AddModule(pMM); + + nsCacheObject* pCO = new nsCacheObject("http://www.netscape.com/"); + pCO->Etag("Etag-testing"); + pCO->Size(2250); + pCO->LastModified(time(0)); + pMM->AddObject(pCO); + + pCO->Address("http://www.microsnot.com/"); + pCO->Size(1230); + pCO->Etag("Another"); + + if (pMM->AddObject(pCO)) + { + char buffer[10]; + m_Mesg += itoa(pMM->Entries(), buffer, 10); + m_Mesg += " nsCacheObject(s) added successfully.\n"; + } + else + m_Mesg += "Failed to add a cache object!\n"; + + m_Mesg += "-----------------\n"; + m_Mesg += pCM->Trace(); + m_Mesg += pMM->Trace(); + + m_Mesg += "-----------------\n"; + for (int i = pMM->Entries(); i>0 ; i--) + { + m_Mesg += pMM->GetObject(i-1)->Trace(); + } + + m_Mesg += "-----------------\n"; + char buffer[10]; + m_Mesg += "Worst case time= "; + m_Mesg += itoa(pCM->WorstCaseTime(), buffer, 10); + m_Mesg += " microsec.\n"; + + delete pMM; + pMM = 0; + delete pCO; + CView::OnInitialUpdate(); +} + + diff --git a/mozilla/network/cache/nu/tests/cb/cbView.h b/mozilla/network/cache/nu/tests/cb/cbView.h new file mode 100644 index 00000000000..7de4738ce4e --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/cbView.h @@ -0,0 +1,54 @@ +// cbView.h : interface of the CCbView class +// +///////////////////////////////////////////////////////////////////////////// +class CCbView : public CView +{ +protected: // create from serialization only + CCbView(); + DECLARE_DYNCREATE(CCbView) + +// Attributes +public: + CCbDoc* GetDocument(); + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCbView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void OnInitialUpdate(); + protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CCbView(); +#ifdef _DEBUG + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; +#endif + +protected: + +// Generated message map functions +protected: + //{{AFX_MSG(CCbView) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + CString m_Mesg; +}; + +#ifndef _DEBUG // debug version in cbView.cpp +inline CCbDoc* CCbView::GetDocument() + { return (CCbDoc*)m_pDocument; } +#endif + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/network/cache/nu/tests/cb/res/Toolbar.bmp b/mozilla/network/cache/nu/tests/cb/res/Toolbar.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d501723c1ceb781cccf04bc42408a2bee6b0eab4 GIT binary patch literal 1078 zcmb_byK2Kg5WFD46)N-_DGd%mbvRHJ@+(`2Y#@z5De^h$T}Yp#;yM?~%&rw%!DZII z_s!1Ct^M-)Tn3AG^p9vgT8;J){9rDyxEsA+?t8wt)o$n@0`>@NK8bGHkdKdb4m#tglAgQo-)Js1!#;+~GSl z37z4Z<|(I?jV44Q_xOeQ!(IFmLY86pVjciLPfC9(?0)$t7hw7W^>>N<@a4LVKPMb~ ze5>=j|BL>!3lPen5hUo~ANKN`l7C&3 z%0PPq3XFRT-e1OO0*EKjOA>DIfd!JKE>l7s8ZOWoALnDl7bEaBMvn{Ll0`lMj_p*2 zeyj@cEB=w(f%+@Ig9SfK=ePQ9c)El>T>d0F2ei{lnHqPg}It<8 literal 0 HcmV?d00001 diff --git a/mozilla/network/cache/nu/tests/cb/res/cacheico.bmp b/mozilla/network/cache/nu/tests/cb/res/cacheico.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bdb64e5c0cb67f880e81613f8bd4a80f737a5a07 GIT binary patch literal 502 zcmZ{gF^o&XX* znX&!nW$bvnyHu35M_wZ~h%ZD%AIL=fU(buD#3;gGo(E)1X>4sUZ0!ku*c#Nmg1H zol!`&SJe&Fw!Zi?Mq-!@QB(X|m&H;yw*EBA-|jz2ET*-Fn}xp)Nty2-`gesVvKD)3 z|H8ZJNPP(E7v2N!V^m*x_-^v*D?eEuRwwo6|6_5{y7=JZ@ZVi`5Fe%x&aUwCI}C^P Tjf>E79>GQAR`2d}-beEvG&df! literal 0 HcmV?d00001 diff --git a/mozilla/network/cache/nu/tests/cb/res/cb.ico b/mozilla/network/cache/nu/tests/cb/res/cb.ico new file mode 100644 index 0000000000000000000000000000000000000000..7eef0bcbe6580a6f464d688906172c2d9de44262 GIT binary patch literal 1078 zcmc&zF>b>!3}jLb9s)T}@Kod(893@u8ajANzT`op9^o+)S?=nU(FD@%0s)Sg^oyC8{H z9myetc;MEP)59v(LMa~xK8Yu^jIR*H22uCFiq5%C{s7(PJi>o15i^bmX4(vPxWAio z9ryY#AU_jfnd047-@`)XzL?%iS$gQyFP{44kS9X)fN{{QoL~hO-&=q&20Zr*cxFAt PkaNE{wR~2C$NfnjhSXWT literal 0 HcmV?d00001 diff --git a/mozilla/network/cache/nu/tests/cb/res/cb.rc2 b/mozilla/network/cache/nu/tests/cb/res/cb.rc2 new file mode 100644 index 00000000000..74ccd4cfeff --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/res/cb.rc2 @@ -0,0 +1,13 @@ +// +// CB.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/network/cache/nu/tests/cb/res/cbDoc.ico b/mozilla/network/cache/nu/tests/cb/res/cbDoc.ico new file mode 100644 index 0000000000000000000000000000000000000000..2a1f1ae6ef15e51df8c39bc028bbfb2171822ba5 GIT binary patch literal 1078 zcmcJNF;c@Y5JlGsgIpoERJdY%i*S@2!JS&si6f-)RXoFGDAfg5;z_dQBoi_)1DpI^ z{oS?KlD%25H@>BZ{KJV|_dD9_G1MV<{5a&-}7^W%4AM)k- zx&P*V(j}a@*Y~UhksXTAK!NRyiYN-8NMyKz<)2v9@tUao7A!g+SzkAcsHvdq6!0vQ z#-rA6>0BAr)4*u6Y57EdkamnXf Uh-a7VEuQ2KJb_2>o71HC3-%7w@Bjb+ literal 0 HcmV?d00001 diff --git a/mozilla/network/cache/nu/tests/cb/resource.h b/mozilla/network/cache/nu/tests/cb/resource.h new file mode 100644 index 00000000000..eeb206e7ff8 --- /dev/null +++ b/mozilla/network/cache/nu/tests/cb/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by cb.rc +// +#define IDD_ABOUTBOX 100 +#define IDR_MAINFRAME 128 +#define IDR_DBTYPE 129 +#define IDB_CACHEICONS 130 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif