mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-29 02:17:45 -10:00
GetType() and GetParameter() don't actually modify the nsContentTypeParser object, so we can make them const. It makes it possible to pass the parser as a const-ref, which I think makes sense as getters (even those doing some actual work) are usually const. MozReview-Commit-ID: 9vmqKbmt8y8
29 lines
774 B
C++
29 lines
774 B
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
#ifndef nsContentTypeParser_h
|
|
#define nsContentTypeParser_h
|
|
|
|
#include "nsAString.h"
|
|
|
|
class nsIMIMEHeaderParam;
|
|
|
|
class nsContentTypeParser {
|
|
public:
|
|
explicit nsContentTypeParser(const nsAString& aString);
|
|
~nsContentTypeParser();
|
|
|
|
nsresult GetParameter(const char* aParameterName, nsAString& aResult) const;
|
|
nsresult GetType(nsAString& aResult) const;
|
|
|
|
private:
|
|
NS_ConvertUTF16toUTF8 mString;
|
|
nsIMIMEHeaderParam* mService;
|
|
};
|
|
|
|
#endif
|
|
|