michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 __nsstreamconverterservice__h___ michael@0: #define __nsstreamconverterservice__h___ michael@0: michael@0: #include "nsIStreamConverterService.h" michael@0: michael@0: #include "nsHashtable.h" michael@0: #include "nsTArrayForwardDeclare.h" michael@0: michael@0: class nsCString; michael@0: michael@0: class nsStreamConverterService : public nsIStreamConverterService { michael@0: public: michael@0: ///////////////////////////////////////////////////// michael@0: // nsISupports methods michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: michael@0: ///////////////////////////////////////////////////// michael@0: // nsIStreamConverterService methods michael@0: NS_DECL_NSISTREAMCONVERTERSERVICE michael@0: michael@0: ///////////////////////////////////////////////////// michael@0: // nsStreamConverterService methods michael@0: nsStreamConverterService(); michael@0: virtual ~nsStreamConverterService(); michael@0: michael@0: private: michael@0: // Responsible for finding a converter for the given MIME-type. michael@0: nsresult FindConverter(const char *aContractID, nsTArray **aEdgeList); michael@0: nsresult BuildGraph(void); michael@0: nsresult AddAdjacency(const char *aContractID); michael@0: nsresult ParseFromTo(const char *aContractID, nsCString &aFromRes, nsCString &aToRes); michael@0: michael@0: // member variables michael@0: nsObjectHashtable mAdjacencyList; michael@0: }; michael@0: michael@0: #endif // __nsstreamconverterservice__h___