1999-07-22 23:11:33 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-07-22 23:11:33 +04:00
|
|
|
|
|
|
|
#ifndef __nsstreamconverterservice__h___
|
|
|
|
#define __nsstreamconverterservice__h___
|
|
|
|
|
|
|
|
#include "nsIStreamConverterService.h"
|
2013-09-23 07:34:09 +04:00
|
|
|
|
2014-04-30 20:39:34 +04:00
|
|
|
#include "nsClassHashtable.h"
|
|
|
|
#include "nsCOMArray.h"
|
2017-08-17 02:48:52 +03:00
|
|
|
#include "nsStringFwd.h"
|
2014-03-15 23:00:17 +04:00
|
|
|
#include "nsTArrayForwardDeclare.h"
|
|
|
|
|
2017-10-03 01:05:19 +03:00
|
|
|
class nsAtom;
|
1999-07-22 23:11:33 +04:00
|
|
|
|
|
|
|
class nsStreamConverterService : public nsIStreamConverterService {
|
2014-03-21 20:43:39 +04:00
|
|
|
public:
|
1999-07-22 23:11:33 +04:00
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
// nsISupports methods
|
|
|
|
NS_DECL_ISUPPORTS
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1999-07-22 23:11:33 +04:00
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
// nsIStreamConverterService methods
|
1999-08-23 03:52:07 +04:00
|
|
|
NS_DECL_NSISTREAMCONVERTERSERVICE
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1999-07-22 23:11:33 +04:00
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
// nsStreamConverterService methods
|
2018-04-30 19:46:04 +03:00
|
|
|
nsStreamConverterService() = default;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1999-07-22 23:11:33 +04:00
|
|
|
private:
|
2018-04-30 19:46:04 +03:00
|
|
|
virtual ~nsStreamConverterService() = default;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1999-07-22 23:11:33 +04:00
|
|
|
// Responsible for finding a converter for the given MIME-type.
|
2009-01-22 07:15:34 +03:00
|
|
|
nsresult FindConverter(const char *aContractID,
|
|
|
|
nsTArray<nsCString> **aEdgeList);
|
1999-07-23 01:24:58 +04:00
|
|
|
nsresult BuildGraph(void);
|
2000-09-14 03:57:52 +04:00
|
|
|
nsresult AddAdjacency(const char *aContractID);
|
|
|
|
nsresult ParseFromTo(const char *aContractID, nsCString &aFromRes,
|
|
|
|
nsCString &aToRes);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1999-07-22 23:11:33 +04:00
|
|
|
// member variables
|
2017-10-03 01:05:19 +03:00
|
|
|
nsClassHashtable<nsCStringHashKey, nsTArray<RefPtr<nsAtom>>> mAdjacencyList;
|
1999-07-22 23:11:33 +04:00
|
|
|
};
|
|
|
|
|
1999-08-04 06:02:15 +04:00
|
|
|
#endif // __nsstreamconverterservice__h___
|