michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsDataHandler_h___ michael@0: #define nsDataHandler_h___ michael@0: michael@0: #include "nsIProtocolHandler.h" michael@0: michael@0: class nsDataHandler : public nsIProtocolHandler michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: // nsIProtocolHandler methods: michael@0: NS_DECL_NSIPROTOCOLHANDLER michael@0: michael@0: // nsDataHandler methods: michael@0: nsDataHandler(); michael@0: virtual ~nsDataHandler(); michael@0: michael@0: // Define a Create method to be used with a factory: michael@0: static nsresult michael@0: Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult); michael@0: michael@0: // Parse a data: URI and return the individual parts michael@0: // (the given spec will temporarily be modified but will be returned michael@0: // to the original before returning) michael@0: static NS_HIDDEN_(nsresult) ParseURI(nsCString& spec, michael@0: nsCString& contentType, michael@0: nsCString& contentCharset, michael@0: bool& isBase64, michael@0: nsCString& dataBuffer, michael@0: nsCString& hashRef); michael@0: }; michael@0: michael@0: #endif /* nsDataHandler_h___ */