1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/protocol/about/nsAboutCache.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsAboutCache_h__ 1.10 +#define nsAboutCache_h__ 1.11 + 1.12 +#include "nsIAboutModule.h" 1.13 + 1.14 +#include "nsString.h" 1.15 +#include "nsIOutputStream.h" 1.16 + 1.17 +#include "nsICacheVisitor.h" 1.18 +#include "nsCOMPtr.h" 1.19 + 1.20 +class nsAboutCache : public nsIAboutModule 1.21 + , public nsICacheVisitor 1.22 +{ 1.23 +public: 1.24 + NS_DECL_ISUPPORTS 1.25 + NS_DECL_NSIABOUTMODULE 1.26 + NS_DECL_NSICACHEVISITOR 1.27 + 1.28 + nsAboutCache() {} 1.29 + virtual ~nsAboutCache() {} 1.30 + 1.31 + static nsresult 1.32 + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); 1.33 + 1.34 +protected: 1.35 + nsresult ParseURI(nsIURI * uri, nsCString &deviceID); 1.36 + 1.37 + nsCOMPtr<nsIOutputStream> mStream; 1.38 + nsCString mDeviceID; 1.39 + nsCString mBuffer; 1.40 +}; 1.41 + 1.42 +#define NS_ABOUT_CACHE_MODULE_CID \ 1.43 +{ /* 9158c470-86e4-11d4-9be2-00e09872a416 */ \ 1.44 + 0x9158c470, \ 1.45 + 0x86e4, \ 1.46 + 0x11d4, \ 1.47 + {0x9b, 0xe2, 0x00, 0xe0, 0x98, 0x72, 0xa4, 0x16} \ 1.48 +} 1.49 + 1.50 +#endif // nsAboutCache_h__