netwerk/streamconv/src/nsStreamConverterService.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/streamconv/src/nsStreamConverterService.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 __nsstreamconverterservice__h___
    1.10 +#define __nsstreamconverterservice__h___
    1.11 +
    1.12 +#include "nsIStreamConverterService.h"
    1.13 +
    1.14 +#include "nsHashtable.h"
    1.15 +#include "nsTArrayForwardDeclare.h"
    1.16 +
    1.17 +class nsCString;
    1.18 +
    1.19 +class nsStreamConverterService : public nsIStreamConverterService {
    1.20 +public:
    1.21 +    /////////////////////////////////////////////////////
    1.22 +    // nsISupports methods
    1.23 +    NS_DECL_ISUPPORTS
    1.24 +
    1.25 +
    1.26 +    /////////////////////////////////////////////////////
    1.27 +    // nsIStreamConverterService methods
    1.28 +    NS_DECL_NSISTREAMCONVERTERSERVICE
    1.29 +
    1.30 +    /////////////////////////////////////////////////////
    1.31 +    // nsStreamConverterService methods
    1.32 +    nsStreamConverterService();
    1.33 +    virtual ~nsStreamConverterService();
    1.34 +
    1.35 +private:
    1.36 +    // Responsible for finding a converter for the given MIME-type.
    1.37 +    nsresult FindConverter(const char *aContractID, nsTArray<nsCString> **aEdgeList);
    1.38 +    nsresult BuildGraph(void);
    1.39 +    nsresult AddAdjacency(const char *aContractID);
    1.40 +    nsresult ParseFromTo(const char *aContractID, nsCString &aFromRes, nsCString &aToRes);
    1.41 +
    1.42 +    // member variables
    1.43 +    nsObjectHashtable mAdjacencyList;
    1.44 +};
    1.45 +
    1.46 +#endif // __nsstreamconverterservice__h___

mercurial