intl/chardet/public/nsIStringCharsetDetector.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5 #ifndef nsIStringCharsetDetector_h__
michael@0 6 #define nsIStringCharsetDetector_h__
michael@0 7
michael@0 8 #include "nsISupports.h"
michael@0 9 #include "nsDetectionConfident.h"
michael@0 10
michael@0 11 // {12BB8F15-2389-11d3-B3BF-00805F8A6670}
michael@0 12 #define NS_ISTRINGCHARSETDETECTOR_IID \
michael@0 13 { 0x12bb8f15, 0x2389, 0x11d3, { 0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
michael@0 14
michael@0 15
michael@0 16 #define NS_STRCDETECTOR_CONTRACTID_BASE "@mozilla.org/intl/stringcharsetdetect;1?type="
michael@0 17
michael@0 18 /*
michael@0 19 This interface is similar to nsICharsetDetector
michael@0 20 The difference is it is for line base detection instead of block based
michael@0 21 detectection.
michael@0 22 */
michael@0 23
michael@0 24
michael@0 25 class nsIStringCharsetDetector : public nsISupports {
michael@0 26 public:
michael@0 27
michael@0 28 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTRINGCHARSETDETECTOR_IID)
michael@0 29 /*
michael@0 30 Perform the charset detection
michael@0 31
michael@0 32 aBytesArray- the bytes
michael@0 33 aLen- the length of the bytes
michael@0 34 oCharset- the charset answer
michael@0 35 oConfident - the confidence of the answer
michael@0 36 */
michael@0 37 NS_IMETHOD DoIt(const char* aBytesArray, uint32_t aLen,
michael@0 38 const char** oCharset, nsDetectionConfident &oConfident) = 0;
michael@0 39 };
michael@0 40
michael@0 41 NS_DEFINE_STATIC_IID_ACCESSOR(nsIStringCharsetDetector,
michael@0 42 NS_ISTRINGCHARSETDETECTOR_IID)
michael@0 43
michael@0 44 #endif /* nsIStringCharsetDetector_h__ */

mercurial