|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "nsIMIMEHeaderParam.h" |
|
7 |
|
8 #ifndef __nsmimeheaderparamimpl_h___ |
|
9 #define __nsmimeheaderparamimpl_h___ |
|
10 class nsMIMEHeaderParamImpl : public nsIMIMEHeaderParam |
|
11 { |
|
12 public: |
|
13 NS_DECL_ISUPPORTS |
|
14 NS_DECL_NSIMIMEHEADERPARAM |
|
15 |
|
16 nsMIMEHeaderParamImpl() {} |
|
17 virtual ~nsMIMEHeaderParamImpl() {} |
|
18 private: |
|
19 enum ParamDecoding { |
|
20 MIME_FIELD_ENCODING = 1, |
|
21 HTTP_FIELD_ENCODING |
|
22 }; |
|
23 |
|
24 nsresult DoGetParameter(const nsACString& aHeaderVal, |
|
25 const char *aParamName, |
|
26 ParamDecoding aDecoding, |
|
27 const nsACString& aFallbackCharset, |
|
28 bool aTryLocaleCharset, |
|
29 char **aLang, |
|
30 nsAString& aResult); |
|
31 |
|
32 nsresult DoParameterInternal(const char *aHeaderValue, |
|
33 const char *aParamName, |
|
34 ParamDecoding aDecoding, |
|
35 char **aCharset, |
|
36 char **aLang, |
|
37 char **aResult); |
|
38 |
|
39 }; |
|
40 |
|
41 #endif |
|
42 |