netwerk/protocol/data/nsDataHandler.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/protocol/data/nsDataHandler.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     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 nsDataHandler_h___
    1.10 +#define nsDataHandler_h___
    1.11 +
    1.12 +#include "nsIProtocolHandler.h"
    1.13 +
    1.14 +class nsDataHandler : public nsIProtocolHandler
    1.15 +{
    1.16 +public:
    1.17 +    NS_DECL_ISUPPORTS
    1.18 +
    1.19 +    // nsIProtocolHandler methods:
    1.20 +    NS_DECL_NSIPROTOCOLHANDLER
    1.21 +
    1.22 +    // nsDataHandler methods:
    1.23 +    nsDataHandler();
    1.24 +    virtual ~nsDataHandler();
    1.25 +
    1.26 +    // Define a Create method to be used with a factory:
    1.27 +    static nsresult
    1.28 +    Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
    1.29 +
    1.30 +    // Parse a data: URI and return the individual parts
    1.31 +    // (the given spec will temporarily be modified but will be returned
    1.32 +    //  to the original before returning)
    1.33 +    static NS_HIDDEN_(nsresult) ParseURI(nsCString& spec,
    1.34 +                                         nsCString& contentType,
    1.35 +                                         nsCString& contentCharset,
    1.36 +                                         bool&    isBase64,
    1.37 +                                         nsCString& dataBuffer,
    1.38 +                                         nsCString& hashRef);
    1.39 +};
    1.40 +
    1.41 +#endif /* nsDataHandler_h___ */

mercurial