1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/mime/nsMIMEHeaderParamImpl.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; 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 +#include "nsIMIMEHeaderParam.h" 1.10 + 1.11 +#ifndef __nsmimeheaderparamimpl_h___ 1.12 +#define __nsmimeheaderparamimpl_h___ 1.13 +class nsMIMEHeaderParamImpl : public nsIMIMEHeaderParam 1.14 +{ 1.15 +public: 1.16 + NS_DECL_ISUPPORTS 1.17 + NS_DECL_NSIMIMEHEADERPARAM 1.18 + 1.19 + nsMIMEHeaderParamImpl() {} 1.20 + virtual ~nsMIMEHeaderParamImpl() {} 1.21 +private: 1.22 + enum ParamDecoding { 1.23 + MIME_FIELD_ENCODING = 1, 1.24 + HTTP_FIELD_ENCODING 1.25 + }; 1.26 + 1.27 + nsresult DoGetParameter(const nsACString& aHeaderVal, 1.28 + const char *aParamName, 1.29 + ParamDecoding aDecoding, 1.30 + const nsACString& aFallbackCharset, 1.31 + bool aTryLocaleCharset, 1.32 + char **aLang, 1.33 + nsAString& aResult); 1.34 + 1.35 + nsresult DoParameterInternal(const char *aHeaderValue, 1.36 + const char *aParamName, 1.37 + ParamDecoding aDecoding, 1.38 + char **aCharset, 1.39 + char **aLang, 1.40 + char **aResult); 1.41 + 1.42 +}; 1.43 + 1.44 +#endif 1.45 +