00001 /** 00002 * @File : nsUniversalDetectorImpl.h 00003 * @Author : Jinlei Li 00004 * @Date : 2008-06-03 00005 * 00006 * @brief : A wrapper for internal encoding detector implementations. 00007 * This is the ONLY header file that will be included by plaintext 00008 * plugin implementations. 00009 * 00010 * Copyright (C) 2008, iRex Technologies B.V. 00011 * All rights reserved. 00012 */ 00013 00014 #include <string> 00015 #include "nsUniversalDetector.h" 00016 00017 class nsUniversalDetectorImpl: public nsUniversalDetector 00018 { 00019 public: 00020 nsUniversalDetectorImpl() {} 00021 ~nsUniversalDetectorImpl() {} 00022 00023 public: 00024 const std::string& get_enc() const 00025 { 00026 return enc; 00027 } 00028 00029 protected: 00030 virtual void Report(const char* aCharset) 00031 { 00032 enc = aCharset; 00033 } 00034 00035 private: 00036 std::string enc; 00037 };