static nsIRDFResource * kNC_EncodersRoot;
MOZ_DECL_CTOR_COUNTER(nsMenuEntry)//----------------------------------------------------------------------------// Class nsCharsetMenu [declaration]/** * The Charset Converter menu. * * God, our GUI programming disgusts me. * * @created         23/Nov/1999 * @author  Catalin Rotaru [CATA] */class nsCharsetMenu : public nsIRDFDataSource, public nsICurrentCharsetListener{  NS_DECL_ISUPPORTSprivate:  static nsIRDFResource * kNC_BrowserAutodetMenuRoot;  static nsIRDFResource * kNC_BrowserCharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMoreCharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMore1CharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMore2CharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMore3CharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMore4CharsetMenuRoot;  static nsIRDFResource * kNC_BrowserMore5CharsetMenuRoot;  static nsIRDFResource * kNC_MaileditCharsetMenuRoot;  static nsIRDFResource * kNC_MailviewCharsetMenuRoot;  static nsIRDFResource * kNC_ComposerCharsetMenuRoot;  static nsIRDFResource * kNC_DecodersRoot;  static nsIRDFResource * kNC_Name;  static nsIRDFResource * kNC_Checked;  static nsIRDFResource * kNC_CharsetDetector;  static nsIRDFResource * kNC_BookmarkSeparator;  static nsIRDFResource * kRDF_type;  static nsIRDFDataSource * mInner;  PRPackedBool mInitialized;  PRPackedBool mBrowserMenuInitialized;  PRPackedBool mMailviewMenuInitialized;  PRPackedBool mComposerMenuInitialized;  PRPackedBool mMaileditMenuInitialized;  PRPackedBool mSecondaryTiersInitialized;  PRPackedBool mAutoDetectInitialized;  PRPackedBool mOthersInitialized;  nsVoidArray   mBrowserMenu;  PRInt32       mBrowserCacheStart;  PRInt32       mBrowserCacheSize;  PRInt32       mBrowserMenuRDFPosition;  nsVoidArray   mMailviewMenu;  PRInt32       mMailviewCacheStart;  PRInt32       mMailviewCacheSize;  PRInt32       mMailviewMenuRDFPosition;  nsVoidArray   mComposerMenu;  PRInt32       mComposerCacheStart;  PRInt32       mComposerCacheSize;  PRInt32       mComposerMenuRDFPosition;  nsCOMPtr<nsIRDFService>               mRDFService;  nsCOMPtr<nsICharsetConverterManager2> mCCManager;  nsCOMPtr<nsIPrefBranch>               mPrefs;  nsCOMPtr<nsIObserver>                 mCharsetMenuObserver;  nsCOMPtr<nsISupportsArray>            mDecoderList;  nsresult Done();  nsresult SetCharsetCheckmark(nsString * aCharset, PRBool aValue);  nsresult FreeResources();  nsresult InitStaticMenu(nsISupportsArray * aDecs,     nsIRDFResource * aResource, const char * aKey, nsVoidArray * aArray);  nsresult InitCacheMenu(nsISupportsArray * aDecs, nsIRDFResource * aResource,    const char * aKey, nsVoidArray * aArray);  nsresult InitMoreMenu(nsISupportsArray * aDecs, nsIRDFResource * aResource,     const char * aFlag);  nsresult InitMoreSubmenus(nsISupportsArray * aDecs);  nsresult AddCharsetToItemArray(nsVoidArray * aArray, nsIAtom * aCharset,     nsMenuEntry ** aResult, PRInt32 aPlace);  nsresult AddCharsetArrayToItemArray(nsVoidArray * aArray,     nsISupportsArray * aCharsets);  nsresult AddMenuItemToContainer(nsIRDFContainer * aContainer,     nsMenuEntry * aItem, nsIRDFResource * aType, const char * aIDPrefix,     PRInt32 aPlace);  nsresult AddMenuItemArrayToContainer(nsIRDFContainer * aContainer,     nsVoidArray * aArray, nsIRDFResource * aType);  nsresult AddCharsetToContainer(nsVoidArray * aArray,     nsIRDFContainer * aContainer, nsIAtom * aCharset, const char * aIDPrefix,     PRInt32 aPlace, PRInt32 aRDFPlace);  nsresult AddFromPrefsToMenu(nsVoidArray * aArray,     nsIRDFContainer * aContainer, const char * aKey, nsISupportsArray * aDecs,    const char * aIDPrefix);  nsresult AddFromNolocPrefsToMenu(nsVoidArray * aArray,     nsIRDFContainer * aContainer, const char * aKey, nsISupportsArray * aDecs,    const char * aIDPrefix);  nsresult AddFromStringToMenu(char * aCharsetList, nsVoidArray * aArray,     nsIRDFContainer * aContainer, nsISupportsArray * aDecs,    const char * aIDPrefix);  nsresult AddSeparatorToContainer(nsIRDFContainer * aContainer);  nsresult AddCharsetToCache(nsIAtom * aCharset, nsVoidArray * aArray,     nsIRDFResource * aRDFResource, PRInt32 aCacheStart, PRInt32 aCacheSize,     PRInt32 aRDFPlace);  nsresult WriteCacheToPrefs(nsVoidArray * aArray, PRInt32 aCacheStart,     const char * aKey);  nsresult UpdateCachePrefs(const char * aCacheKey, const char * aCacheSizeKey,     const char * aStaticKey, const PRUnichar * aCharset);  nsresult ClearMenu(nsIRDFContainer * aContainer, nsVoidArray * aArray);  nsresult RemoveLastMenuItem(nsIRDFContainer * aContainer,     nsVoidArray * aArray);  nsresult RemoveFlaggedCharsets(nsISupportsArray * aList, nsString * aProp);  nsresult NewRDFContainer(nsIRDFDataSource * aDataSource,     nsIRDFResource * aResource, nsIRDFContainer ** aResult);  void FreeMenuItemArray(nsVoidArray * aArray);  PRInt32 FindMenuItemInArray(nsVoidArray * aArray, nsIAtom * aCharset,       nsMenuEntry ** aResult);  nsresult ReorderMenuItemArray(nsVoidArray * aArray);  nsresult GetCollation(nsICollation ** aCollation);public:  nsCharsetMenu();  virtual ~nsCharsetMenu();  nsresult Init();  nsresult InitBrowserMenu();  nsresult InitMaileditMenu();  nsresult InitMailviewMenu();  nsresult InitComposerMenu();  nsresult InitOthers();  nsresult InitSecondaryTiers();  nsresult InitAutodetMenu();  nsresult RefreshBrowserMenu();  nsresult RefreshMailviewMenu();  nsresult RefreshMaileditMenu();  nsresult RefreshComposerMenu();  //--------------------------------------------------------------------------  // Interface nsICurrentCharsetListener [declaration]  NS_IMETHOD SetCurrentCharset(const PRUnichar * aCharset);  NS_IMETHOD SetCurrentMailCharset(const PRUnichar * aCharset);  NS_IMETHOD SetCurrentComposerCharset(const PRUnichar * aCharset);  //--------------------------------------------------------------------------  // Interface nsIRDFDataSource [declaration]  NS_DECL_NSIRDFDATASOURCE};